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

Last change on this file since 632 was 632, checked in by dai_9181, 16 years ago

ジェネリッククラスの型パラメータに値型が指定されたときに限り、テンプレート展開を行うようにした。

TODO: libファイルを跨ってテンプレート展開ができていないため、ソースコード管理部分に手を加える必要あり。

File size: 847 bytes
Line 
1#include "stdafx.h"
2
3TypeDef::TypeDef( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, const Type &baseType )
4 : Symbol( namespaceScopes, name )
5 , baseName( baseName )
6 , baseType( baseType )
7{
8}
9
10TypeDefCollection::TypeDefCollection(){
11}
12TypeDefCollection::~TypeDefCollection(){
13}
14void TypeDefCollection::Add( const NamespaceScopes &namespaceScopes, const std::string &name, const std::string &baseName, int nowLine ){
15 TypeDef typeDef( namespaceScopes, name, baseName, nowLine );
16 this->push_back( typeDef );
17}
18
19const TypeDef *TypeDefCollection::Find( const Symbol &symbol ) const
20{
21 const TypeDefCollection &typeDefs = *this;
22 BOOST_FOREACH( const TypeDef &typeDef, typeDefs )
23 {
24 if( typeDef.IsEqualSymbol( symbol ) )
25 {
26 return &typeDef;
27 }
28 }
29 return NULL;
30}
Note: See TracBrowser for help on using the repository browser.