Ignore:
Timestamp:
Aug 8, 2007, 3:22:49 AM (17 years ago)
Author:
dai_9181
Message:
 
Location:
trunk/abdev/BasicCompiler_Common/include
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/abdev/BasicCompiler_Common/include/Compiler.h

    r266 r268  
    3434        return namespaceSupporter;
    3535    }
     36
     37    // ソースコード
     38    BasicSource source;
    3639
    3740    // コード生成機構
  • trunk/abdev/BasicCompiler_Common/include/Linker.h

    r266 r268  
    1212    // データテーブル
    1313    DataTable dataTable;
    14 
    15     // ソースコード
    16     BasicSource source;
    1714
    1815    // XMLシリアライズ用
     
    3027        ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
    3128        ar & BOOST_SERIALIZATION_NVP( dataTable );
    32         ar & BOOST_SERIALIZATION_NVP( source );
    3329    }
    3430};
  • trunk/abdev/BasicCompiler_Common/include/Source.h

    r266 r268  
    2525    int length;
    2626
    27     // XMLシリアライズ用
    28 private:
    29     friend class boost::serialization::access;
    30     BOOST_SERIALIZATION_SPLIT_MEMBER();
    31     template<class Archive> void load(Archive& ar, const unsigned int version)
    32     {
    33         trace_for_serialize( "serializing(load) - Text" );
    34 
    35         std::string str;
    36         ar & BOOST_SERIALIZATION_NVP( str );
    37 
    38         // 読み込み後の処理
    39         Clear();
    40         Add( str );
    41     }
    42     template<class Archive> void save(Archive& ar, const unsigned int version) const
    43     {
    44         trace_for_serialize( "serializing(save) - Text" );
    45 
    46         // 保存準備
    47         std::string str( buffer, length );
    48 
    49         ar & BOOST_SERIALIZATION_NVP( str );
    50     }
    5127public:
    5228
     
    6844        length += (int)str.size();
    6945    }
     46    void Add( const std::vector<char> &str )
     47    {
     48        buffer = (char *)realloc( buffer, length + str.size() + 1 );
     49        lstrcpy( buffer + length, &str[0] );
     50        length += (int)str.size();
     51    }
    7052
    7153    bool ReadFile( const string &filePath );
     
    8264class BasicSource : public Text
    8365{
    84     // XMLシリアライズ用
    85 private:
    86     friend class boost::serialization::access;
    87     template<class Archive> void serialize(Archive& ar, const unsigned int version)
    88     {
    89         trace_for_serialize( "serializing - BasicSource" );
    90 
    91         ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Text );
    92     }
    93 
    9466    static const string generateDirectiveName;
    9567
Note: See TracChangeset for help on using the changeset viewer.