Line | |
---|
1 | #include "stdafx.h"
|
---|
2 | #include <jenga/include/jenga.h>
|
---|
3 | #include <abdev/ab_common/include/ab_common.h>
|
---|
4 |
|
---|
5 | TypeDef::TypeDef( const Symbol &symbol, const std::string &baseName, const Type &baseType )
|
---|
6 | : RelationalObjectModuleItem( symbol )
|
---|
7 | , baseName( baseName )
|
---|
8 | , baseType( baseType )
|
---|
9 | {
|
---|
10 | }
|
---|
11 |
|
---|
12 | bool TypeDef::Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors )
|
---|
13 | {
|
---|
14 | this->baseType.Resolve( resolver, resolveErrors );
|
---|
15 | return true;
|
---|
16 | }
|
---|
17 |
|
---|
18 | TypeDefCollection::TypeDefCollection(){
|
---|
19 | }
|
---|
20 | TypeDefCollection::~TypeDefCollection(){
|
---|
21 | }
|
---|
22 | void TypeDefCollection::Add( const Symbol &symbol, const std::string &baseName, int nowLine ){
|
---|
23 | TypeDef typeDef( symbol, baseName, nowLine );
|
---|
24 | this->push_back( typeDef );
|
---|
25 | }
|
---|
26 |
|
---|
27 | const TypeDef *TypeDefCollection::Find( const Symbol &symbol ) const
|
---|
28 | {
|
---|
29 | const TypeDefCollection &typeDefs = *this;
|
---|
30 | foreach( const TypeDef &typeDef, typeDefs )
|
---|
31 | {
|
---|
32 | if( typeDef.IsEqualSymbol( symbol ) )
|
---|
33 | {
|
---|
34 | return &typeDef;
|
---|
35 | }
|
---|
36 | }
|
---|
37 | return NULL;
|
---|
38 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.