Ignore:
Timestamp:
May 5, 2008, 1:23:46 AM (16 years ago)
Author:
dai_9181
Message:

CDefine::Initメソッドで使用するCompilerクラス依存のフラグを外部から引き渡すようにした。

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ab5.0/abdev/BasicCompiler_Common/src/Source.cpp

    r553 r554  
    77    std::vector<std::string> names;
    88public:
    9     CDefine( int majorVer );
    10     ~CDefine();
    119    void Free();
    12     void Init( int majorVer );
     10    void Init( bool isDebug, bool isDll, bool isUnicode, int majorVer );
    1311
    1412    BOOL add(char *name);
     
    1816    void DirectiveIfdef(char *buffer);
    1917};
    20 // TODO: バージョン番号の識別子defineが未完成
    21 CDefine objDefine(0);
     18CDefine objDefine;
    2219
    2320
     
    9289//////////////////////////////////////
    9390
    94 CDefine::CDefine( int majorVer )
    95 {
    96     Init( majorVer );
    97 }
    98 CDefine::~CDefine()
    99 {
    100 }
    101 void CDefine::Init( int majorVer )
     91void CDefine::Init( bool isDebug, bool isDll, bool isUnicode, int majorVer )
    10292{
    10393    names.clear();
    10494
    105     if( compiler.IsDebug() )
     95    if( isDebug )
    10696    {
    10797        add("_DEBUG");
     
    112102#endif
    113103
    114     if( compiler.IsDll() )
     104    if( isDll )
    115105    {
    116106        add("_DLL");
    117107    }
    118108
    119     if( compiler.IsUnicode() )
     109    if( isUnicode )
    120110    {
    121111        add( "UNICODE" );
     
    854844}
    855845
    856 bool BasicSource::ReadFile( const std::string &filePath ){
     846bool BasicSource::ReadFile( const std::string &filePath, bool isDebug, bool isDll, bool isUnicode, int majorVer ){
    857847    if( !Text::ReadFile( filePath ) ){
    858848        return false;
     
    871861    // #defineと#requireを初期化
    872862    // TODO: バージョン番号の識別子defineが未完成
    873     objDefine.Init(0);
     863    objDefine.Init( isDebug, isDll, isUnicode, majorVer );
    874864    requireFiles.clear();
    875865
Note: See TracChangeset for help on using the changeset viewer.