source: dev/trunk/ab5.0/abdev/BasicCompiler_Common/src/TypeDef.cpp@ 577

Last change on this file since 577 was 577, checked in by dai_9181, 16 years ago

不要なコメントを除去

File size: 1.2 KB
Line 
1#include "stdafx.h"
2
3#include <TypeDef.h>
4#include <Compiler.h>
5
6TypeDef::TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType )
7 : Symbol( namespaceScopes, name )
8 , baseName( baseName )
9 , baseType( baseType )
10{
11}
12
13TypeDefCollection::TypeDefCollection(){
14}
15TypeDefCollection::~TypeDefCollection(){
16}
17void TypeDefCollection::Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine ){
18 TypeDef typeDef( namespaceScopes, name, baseName, nowLine );
19 this->push_back( typeDef );
20}
21
22int TypeDefCollection::GetIndex( const NamespaceScopes &namespaceScopes, const std::string &name ) const{
23 int max = (int)(*this).size();
24 for( int i=0; i<max; i++ ){
25 if( (*this)[i].IsEqualSymbol( namespaceScopes, name ) ){
26 return i;
27 }
28 }
29 return -1;
30}
31int TypeDefCollection::GetIndex( const std::string &fullName ) const{
32 char AreaName[VN_SIZE] = ""; //オブジェクト変数
33 char NestName[VN_SIZE] = ""; //入れ子メンバ
34 bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
35
36 return GetIndex( NamespaceScopes( AreaName ), NestName );
37}
Note: See TracBrowser for help on using the repository browser.