source: dev/trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp@ 828

Last change on this file since 828 was 828, checked in by イグトランス (egtra), 12 years ago

egtraブランチの内容をマージ。

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