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