Rev | Line | |
---|
[206] | 1 | #include "stdafx.h"
|
---|
| 2 |
|
---|
[193] | 3 | #include <TypeDef.h>
|
---|
| 4 | #include <Compiler.h>
|
---|
| 5 |
|
---|
[542] | 6 | TypeDef::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 |
|
---|
| 13 | TypeDefCollection::TypeDefCollection(){
|
---|
| 14 | }
|
---|
| 15 | TypeDefCollection::~TypeDefCollection(){
|
---|
| 16 | }
|
---|
[523] | 17 | void 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] | 22 | int 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] | 31 | int 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.