Changeset 191 in dev for trunk/abdev/BasicCompiler_Common/include
- Timestamp:
- Jun 26, 2007, 12:06:12 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/include
- Files:
-
- 2 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/ClassImpl.h
r184 r191 8 8 ClassImpl( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name ) 9 9 : CClass( namespaceScopes, importedNamespaces, name ) 10 { 11 } 12 ClassImpl() 13 : CClass() 10 14 { 11 15 } … … 26 30 virtual LONG_PTR GetVtblGlobalOffset(void) const; 27 31 virtual void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection); 32 33 34 // XMLシリアライズ用 35 private: 36 friend class boost::serialization::access; 37 template<class Archive> void serialize(Archive& ar, const unsigned int version) 38 { 39 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( CClass ); 40 } 28 41 }; 42 BOOST_IS_ABSTRACT( CClass ); 29 43 30 44 class ClassesImpl : public Classes 31 45 { 32 46 public: 47 ClassesImpl() 48 : Classes() 49 { 50 } 51 33 52 virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name); 34 53 virtual void CollectClassesForNameOnly( const BasicSource &source ); … … 43 62 virtual void Compile_System_InitializeUserTypes(); 44 63 64 65 // XMLシリアライズ用 66 private: 67 friend class boost::serialization::access; 68 BOOST_SERIALIZATION_SPLIT_MEMBER(); 69 template<class Archive> void load(Archive& ar, const unsigned int version) 70 { 71 std::vector<ClassImpl *> vectorClasses; 72 ar & BOOST_SERIALIZATION_NVP( vectorClasses ); 73 74 // 読み込み後の処理 75 Clear(); 76 BOOST_FOREACH( CClass *pClass, vectorClasses ) 77 { 78 Insert( pClass ); 79 } 80 } 81 template<class Archive> void save(Archive& ar, const unsigned int version) const 82 { 83 // 保存準備 84 std::vector<ClassImpl *> vectorClasses; 85 vectorClasses.clear(); 86 Iterator_Reset(); 87 while( Iterator_HasNext() ) 88 { 89 vectorClasses.push_back( dynamic_cast<ClassImpl *>(Iterator_GetNext()) ); 90 } 91 92 ar & BOOST_SERIALIZATION_NVP( vectorClasses ); 93 } 45 94 }; 95 BOOST_IS_ABSTRACT( Classes );
Note:
See TracChangeset
for help on using the changeset viewer.