Ignore:
Timestamp:
Jun 11, 2008, 10:10:26 PM (16 years ago)
Author:
dai_9181
Message:

リンカの依存関係解決モジュールを製作中

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/ab_common/include/Lexical/Const.h

    r603 r637  
    22
    33//定数
    4 class CConst : public Symbol, public Jenga::Common::ObjectInHashmap<CConst>
     4class CConst
     5    : public RelationalObjectModuleItem
     6    , public Jenga::Common::ObjectInHashmap<CConst>
    57{
    68    Type type;
     
    1416        trace_for_serialize( "serializing - CConst" );
    1517
    16         ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
     18        ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( RelationalObjectModuleItem );
     19
     20        if( ActiveBasic::Common::Environment::IsRemoveExternal() )
     21        {
     22            if( this->IsExternal() )
     23            {
     24                this->NeedResolve();
     25                return;
     26            }
     27        }
     28
    1729        ar & BOOST_SERIALIZATION_NVP( type );
    1830        ar & BOOST_SERIALIZATION_NVP( i64data );
     
    2032
    2133public:
    22     CConst( const NamespaceScopes &namespaceScopes, const std::string &name, const Type &newType, _int64 i64data)
    23         : Symbol( namespaceScopes, name )
     34    CConst( const Symbol &symbol, const Type &newType, _int64 i64data)
     35        : RelationalObjectModuleItem( symbol )
    2436        , type( newType )
    2537        , i64data( i64data )
    2638    {
    2739    }
    28     CConst( const NamespaceScopes &namespaceScopes, const std::string &name, int value)
    29         : Symbol( namespaceScopes, name )
     40    CConst( const Symbol &symbol, int value)
     41        : RelationalObjectModuleItem( symbol )
    3042        , type( Type(DEF_LONG) )
    3143        , i64data( value )
     
    5365    }
    5466    double GetDoubleData();
     67
     68    virtual bool Resolve();
    5569};
    5670class Consts : public Jenga::Common::Hashmap<CConst>
     
    6983public:
    7084
    71     void Add( const NamespaceScopes &namespaceScopes, const std::string &name, _int64 i64data, const Type &type );
    72     void Add( const NamespaceScopes &namespaceScopes, const std::string &name, int value);
     85    void Add( const Symbol &symbol, _int64 i64data, const Type &type );
     86    void Add( const Symbol &symbol, int value);
    7387
    7488private:
     
    8397
    8498//定数マクロ
    85 class ConstMacro : public Symbol, public Jenga::Common::ObjectInHashmap<ConstMacro>
     99class ConstMacro
     100    : public RelationalObjectModuleItem
     101    , public Jenga::Common::ObjectInHashmap<ConstMacro>
    86102{
    87103    std::vector<std::string> parameters;
     
    95111        trace_for_serialize( "serializing - ConstMacro" );
    96112
    97         ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
     113        ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( RelationalObjectModuleItem );
     114
     115        if( ActiveBasic::Common::Environment::IsRemoveExternal() )
     116        {
     117            if( this->IsExternal() )
     118            {
     119                this->NeedResolve();
     120                return;
     121            }
     122        }
     123
    98124        ar & BOOST_SERIALIZATION_NVP( parameters );
    99125        ar & BOOST_SERIALIZATION_NVP( expression );
     
    101127
    102128public:
    103     ConstMacro( const NamespaceScopes &namespaceScopes, const std::string &name, const std::vector<std::string> &parameters, const std::string &expression )
    104         : Symbol( namespaceScopes, name )
     129    ConstMacro( const Symbol &symbol, const std::vector<std::string> &parameters, const std::string &expression )
     130        : RelationalObjectModuleItem( symbol )
    105131        , parameters( parameters )
    106132        , expression( expression )
     
    127153        return expression;
    128154    }
     155
     156    virtual bool Resolve();
    129157};
    130 class ConstMacros : public Jenga::Common::Hashmap<ConstMacro>
     158class ConstMacros
     159    : public Jenga::Common::Hashmap<ConstMacro>
    131160{
    132161    // XMLシリアライズ用
     
    142171
    143172public:
    144     bool Add( const NamespaceScopes &namespaceScopes, const std::string &name, const char *parameterStr );
     173    bool Add( const Symbol &symbol, const char *parameterStr );
    145174    ConstMacro *Find( const Symbol &name );
    146175};
Note: See TracChangeset for help on using the changeset viewer.