Changeset 344 in dev for trunk/abdev/BasicCompiler_Common/include
- Timestamp:
- Oct 9, 2007, 11:37:45 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/Class.h
r343 r344 12 12 class Delegate; 13 13 14 class ClassPrototype : publicPrototype14 class DynamicMethodsPrototype 15 15 { 16 16 // 動的メソッド … … 22 22 template<class Archive> void serialize(Archive& ar, const unsigned int version) 23 23 { 24 ar & BOOST_SERIALIZATION_NVP( dynamicMethods ); 25 } 26 27 public: 28 DynamicMethodsPrototype(){} 29 DynamicMethodsPrototype( const DynamicMethodsPrototype &dynamicMethodsPrototype ) 30 : dynamicMethods( dynamicMethodsPrototype.dynamicMethods ) 31 { 32 } 33 ~DynamicMethodsPrototype(){} 34 35 const Methods &GetDynamicMethods() const 36 { 37 return dynamicMethods; 38 } 39 Methods &GetDynamicMethods() 40 { 41 return dynamicMethods; 42 } 43 44 void AddDynamicMethods( CMethod *pMethod ) 45 { 46 dynamicMethods.push_back( pMethod ); 47 } 48 }; 49 50 class ClassPrototype : public Prototype, public DynamicMethodsPrototype 51 { 52 // XMLシリアライズ用 53 private: 54 friend class boost::serialization::access; 55 template<class Archive> void serialize(Archive& ar, const unsigned int version) 56 { 24 57 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Prototype ); 25 ar & BOOST_SERIALIZATION_ NVP( dynamicMethods);58 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( DynamicMethodsPrototype ); 26 59 } 27 60 … … 29 62 ClassPrototype( const NamespaceScopes &namespaceScopes, const string &name ) 30 63 : Prototype( namespaceScopes, name ) 64 , DynamicMethodsPrototype() 31 65 { 32 66 } 33 67 ClassPrototype() 34 68 : Prototype() 35 { 36 } 37 const Methods &GetDynamicMethods() const 38 { 39 return dynamicMethods; 40 } 41 Methods &GetDynamicMethods() 42 { 43 return dynamicMethods; 69 , DynamicMethodsPrototype() 70 { 44 71 } 45 72 }; 46 73 47 class Interface : public ClassPrototype74 class Interface : public DynamicMethodsPrototype 48 75 { 49 76 const CClass *pInterfaceClass; 50 77 mutable int vtblOffset; 78 51 79 public: 52 80 Interface( const CClass *pInterfaceClass ); 81 Interface( const Interface &objInterface ) 82 : DynamicMethodsPrototype( objInterface ) 83 , pInterfaceClass( objInterface.pInterfaceClass ) 84 , vtblOffset( objInterface.vtblOffset ) 85 { 86 } 53 87 54 88 const CClass &GetClass() const{
Note:
See TracChangeset
for help on using the changeset viewer.