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
RevLine 
[206]1#include "stdafx.h"
2
[193]3#include <TypeDef.h>
4#include <Compiler.h>
5
[542]6TypeDef::TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType )
[206]7 : Symbol( namespaceScopes, name )
[193]8 , baseName( baseName )
[542]9 , baseType( baseType )
[193]10{
11}
12
13TypeDefCollection::TypeDefCollection(){
14}
15TypeDefCollection::~TypeDefCollection(){
16}
[523]17void TypeDefCollection::Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine ){
[193]18 TypeDef typeDef( namespaceScopes, name, baseName, nowLine );
19 this->push_back( typeDef );
20}
[542]21
[523]22int TypeDefCollection::GetIndex( const NamespaceScopes &namespaceScopes, const std::string &name ) const{
[193]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}
[523]31int TypeDefCollection::GetIndex( const std::string &fullName ) const{
[193]32 char AreaName[VN_SIZE] = ""; //オブジェクト変数
33 char NestName[VN_SIZE] = ""; //入れ子メンバ
[206]34 bool isNest = SplitMemberName( fullName.c_str(), AreaName, NestName );
[193]35
36 return GetIndex( NamespaceScopes( AreaName ), NestName );
37}
Note: See TracBrowser for help on using the repository browser.