Changeset 513 in dev for trunk/ab5.0/abdev/BasicCompiler_Common/include
- Timestamp:
- Apr 30, 2008, 8:38:09 PM (17 years ago)
- Location:
- trunk/ab5.0/abdev/BasicCompiler_Common/include
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/BasicCompiler_Common/include/Class.h
r511 r513 3 3 #include <option.h> 4 4 #include <Program.h> 5 #include <Type.h>6 #include <Method.h>7 5 #include <Member.h> 8 6 #include <Source.h> 9 7 10 8 class UserProc; 11 class CClass;12 9 class Delegate; 13 14 class DynamicMethodsPrototype15 {16 // 動的メソッド17 Methods dynamicMethods;18 19 // XMLシリアライズ用20 private:21 friend class boost::serialization::access;22 template<class Archive> void serialize(Archive& ar, const unsigned int version)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() const36 {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 10 50 11 class ClassPrototype : public Prototype, public DynamicMethodsPrototype … … 71 32 } 72 33 }; 73 74 class Interface : public DynamicMethodsPrototype75 {76 const CClass *pInterfaceClass;77 mutable LONG_PTR vtblOffset;78 79 // 型パラメータ(実パラメータ)80 Types actualTypeParameters;81 82 // XMLシリアライズ用83 private:84 friend class boost::serialization::access;85 template<class Archive> void serialize(Archive& ar, const unsigned int version)86 {87 trace_for_serialize( "serializing - Interface" );88 89 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( DynamicMethodsPrototype );90 ar & boost::serialization::make_nvp("pInterfaceClass", const_cast<CClass *&>(pInterfaceClass) );91 ar & BOOST_SERIALIZATION_NVP( vtblOffset );92 ar & BOOST_SERIALIZATION_NVP( actualTypeParameters );93 }94 95 public:96 Interface( const CClass *pInterfaceClass, const Types &actualTypeParameters );97 Interface( const Interface &objInterface )98 : DynamicMethodsPrototype( objInterface )99 , pInterfaceClass( objInterface.pInterfaceClass )100 , vtblOffset( objInterface.vtblOffset )101 {102 }103 Interface()104 {105 }106 107 const CClass &GetClass() const{108 return *pInterfaceClass;109 }110 LONG_PTR GetVtblOffset() const111 {112 return vtblOffset;113 }114 void SetVtblOffset( LONG_PTR vtblOffset ) const115 {116 this->vtblOffset = vtblOffset;117 }118 119 const Types &GetActualTypeParameters() const120 {121 return actualTypeParameters;122 }123 124 std::string GetFullNameWithActualGenericTypeParameters() const;125 };126 typedef std::vector<Interface *> Interfaces;127 34 128 35 class CClass: public ClassPrototype, public Jenga::Common::ObjectInHashmap<CClass>
Note:
See TracChangeset
for help on using the changeset viewer.