Ignore:
Timestamp:
Jun 5, 2008, 10:04:39 PM (16 years ago)
Author:
dai_9181
Message:

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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/src/Lexical/TypeDef.cpp

    r603 r632  
    1717}
    1818
    19 int TypeDefCollection::GetIndex( const Symbol &symbol ) const{
    20     int max = (int)(*this).size();
    21     for( int i=0; i<max; i++ ){
    22         if( (*this)[i].IsEqualSymbol( symbol ) ){
    23             return i;
     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;
    2427        }
    2528    }
    26     return -1;
     29    return NULL;
    2730}
Note: See TracChangeset for help on using the changeset viewer.