Changeset 268 in dev for trunk/abdev/BasicCompiler_Common/include
- Timestamp:
- Aug 8, 2007, 3:22:49 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/include
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/Compiler.h
r266 r268 34 34 return namespaceSupporter; 35 35 } 36 37 // ソースコード 38 BasicSource source; 36 39 37 40 // コード生成機構 -
trunk/abdev/BasicCompiler_Common/include/Linker.h
r266 r268 12 12 // データテーブル 13 13 DataTable dataTable; 14 15 // ソースコード16 BasicSource source;17 14 18 15 // XMLシリアライズ用 … … 30 27 ar & BOOST_SERIALIZATION_NVP( globalNativeCode ); 31 28 ar & BOOST_SERIALIZATION_NVP( dataTable ); 32 ar & BOOST_SERIALIZATION_NVP( source );33 29 } 34 30 }; -
trunk/abdev/BasicCompiler_Common/include/Source.h
r266 r268 25 25 int length; 26 26 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) const43 {44 trace_for_serialize( "serializing(save) - Text" );45 46 // 保存準備47 std::string str( buffer, length );48 49 ar & BOOST_SERIALIZATION_NVP( str );50 }51 27 public: 52 28 … … 68 44 length += (int)str.size(); 69 45 } 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 } 70 52 71 53 bool ReadFile( const string &filePath ); … … 82 64 class BasicSource : public Text 83 65 { 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 94 66 static const string generateDirectiveName; 95 67
Note:
See TracChangeset
for help on using the changeset viewer.