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