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

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

インクルード順序を整理

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