[184] | 1 | #pragma once
|
---|
| 2 |
|
---|
[206] | 3 | class UserProc;
|
---|
[632] | 4 | class UserProcs;
|
---|
[325] | 5 | class Delegate;
|
---|
[632] | 6 | class Classes;
|
---|
[206] | 7 |
|
---|
[344] | 8 | class ClassPrototype : public Prototype, public DynamicMethodsPrototype
|
---|
[342] | 9 | {
|
---|
[344] | 10 | // XMLシリアライズ用
|
---|
| 11 | private:
|
---|
| 12 | friend class boost::serialization::access;
|
---|
| 13 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 14 | {
|
---|
| 15 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Prototype );
|
---|
| 16 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( DynamicMethodsPrototype );
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | public:
|
---|
[637] | 20 | ClassPrototype( const Symbol &symbol )
|
---|
| 21 | : Prototype( symbol )
|
---|
[344] | 22 | , DynamicMethodsPrototype()
|
---|
| 23 | {
|
---|
| 24 | }
|
---|
| 25 | ClassPrototype()
|
---|
| 26 | : Prototype()
|
---|
| 27 | , DynamicMethodsPrototype()
|
---|
| 28 | {
|
---|
| 29 | }
|
---|
| 30 | };
|
---|
| 31 |
|
---|
[342] | 32 | class CClass: public ClassPrototype, public Jenga::Common::ObjectInHashmap<CClass>
|
---|
[206] | 33 | {
|
---|
| 34 | public:
|
---|
| 35 | // 型の種類
|
---|
| 36 | enum ClassType{
|
---|
| 37 | Class,
|
---|
| 38 | Interface,
|
---|
[370] | 39 | ComInterface,
|
---|
[206] | 40 | Enum,
|
---|
| 41 | Delegate,
|
---|
| 42 | Structure,
|
---|
| 43 | };
|
---|
[193] | 44 |
|
---|
[206] | 45 | private:
|
---|
| 46 | ClassType classType;
|
---|
[184] | 47 |
|
---|
[206] | 48 | // importされている名前空間
|
---|
| 49 | NamespaceScopesCollection importedNamespaces;
|
---|
[290] | 50 |
|
---|
| 51 | // 型パラメータ
|
---|
| 52 | GenericTypes formalGenericTypes;
|
---|
| 53 |
|
---|
[382] | 54 | // 基底クラス
|
---|
[206] | 55 | const CClass *pSuperClass;
|
---|
[184] | 56 |
|
---|
[382] | 57 | // 基底クラスの型パラメータ(実パラメータ)
|
---|
[299] | 58 | Types superClassActualTypeParameters;
|
---|
| 59 |
|
---|
[206] | 60 | // Blittable型情報
|
---|
| 61 | Type blittableType;
|
---|
[184] | 62 |
|
---|
[206] | 63 | // 実装するインターフェイス
|
---|
| 64 | Interfaces interfaces;
|
---|
[191] | 65 |
|
---|
[206] | 66 | // 動的メンバ
|
---|
| 67 | Members dynamicMembers;
|
---|
[191] | 68 |
|
---|
[206] | 69 | // 静的メンバ
|
---|
| 70 | Members staticMembers;
|
---|
| 71 |
|
---|
| 72 | // 動的メソッド
|
---|
| 73 | int ConstructorMemberSubIndex;
|
---|
| 74 | int DestructorMemberSubIndex;
|
---|
| 75 | int vtblNum; // 仮想関数の数
|
---|
| 76 |
|
---|
| 77 | // 静的メソッド
|
---|
| 78 | Methods staticMethods;
|
---|
| 79 |
|
---|
[232] | 80 | //アラインメント値
|
---|
| 81 | int fixedAlignment;
|
---|
| 82 |
|
---|
[632] | 83 | public:
|
---|
| 84 | ActiveBasic::Common::Lexical::ExpandedTemplateClasses expandedTemplateClasses;
|
---|
[672] | 85 | Types expandedClassActualTypeParameters;
|
---|
[632] | 86 |
|
---|
[191] | 87 | // XMLシリアライズ用
|
---|
| 88 | private:
|
---|
| 89 | friend class boost::serialization::access;
|
---|
| 90 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 91 | {
|
---|
[206] | 92 | trace_for_serialize( "serializing - CClass" );
|
---|
| 93 |
|
---|
[342] | 94 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( ClassPrototype );
|
---|
[637] | 95 |
|
---|
| 96 | if( ActiveBasic::Common::Environment::IsRemoveExternal() )
|
---|
| 97 | {
|
---|
| 98 | if( this->IsExternal() )
|
---|
| 99 | {
|
---|
| 100 | this->NeedResolve();
|
---|
| 101 | return;
|
---|
| 102 | }
|
---|
| 103 | }
|
---|
| 104 |
|
---|
[206] | 105 | ar & BOOST_SERIALIZATION_NVP( classType );
|
---|
| 106 | ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
|
---|
[293] | 107 | ar & BOOST_SERIALIZATION_NVP( formalGenericTypes );
|
---|
[206] | 108 | ar & boost::serialization::make_nvp( "pSuperClass", const_cast<CClass *&>(pSuperClass) );
|
---|
[299] | 109 | ar & BOOST_SERIALIZATION_NVP( superClassActualTypeParameters );
|
---|
[206] | 110 | ar & BOOST_SERIALIZATION_NVP( blittableType );
|
---|
[353] | 111 | ar & BOOST_SERIALIZATION_NVP( interfaces );
|
---|
[206] | 112 | ar & BOOST_SERIALIZATION_NVP( dynamicMembers );
|
---|
| 113 | ar & BOOST_SERIALIZATION_NVP( staticMembers );
|
---|
| 114 | ar & BOOST_SERIALIZATION_NVP( ConstructorMemberSubIndex );
|
---|
| 115 | ar & BOOST_SERIALIZATION_NVP( DestructorMemberSubIndex );
|
---|
| 116 | ar & BOOST_SERIALIZATION_NVP( vtblNum );
|
---|
| 117 | ar & BOOST_SERIALIZATION_NVP( staticMethods );
|
---|
[232] | 118 | ar & BOOST_SERIALIZATION_NVP( fixedAlignment );
|
---|
[632] | 119 | ar & BOOST_SERIALIZATION_NVP( expandedTemplateClasses );
|
---|
[672] | 120 | ar & BOOST_SERIALIZATION_NVP( expandedClassActualTypeParameters );
|
---|
[191] | 121 | }
|
---|
[184] | 122 |
|
---|
[206] | 123 | bool isReady;
|
---|
[184] | 124 | public:
|
---|
[206] | 125 |
|
---|
[637] | 126 | CClass( const Symbol &symbol, const NamespaceScopesCollection &importedNamespaces );
|
---|
| 127 | CClass( const Symbol &symbol,
|
---|
[632] | 128 | const NamespaceScopesCollection &importedNamespaces,
|
---|
[637] | 129 | ClassType classType,
|
---|
[632] | 130 | const GenericTypes &formalGenericTypes,
|
---|
| 131 | const Types &superClassActualTypeParameters,
|
---|
| 132 | int ConstructorMemberSubIndex,
|
---|
| 133 | int DestructorMemberSubIndex,
|
---|
| 134 | int vtblNum,
|
---|
[672] | 135 | int fixedAlignment,
|
---|
| 136 | const Types &expandedClassActualTypeParameters );
|
---|
[632] | 137 | CClass();
|
---|
| 138 | ~CClass();
|
---|
[191] | 139 |
|
---|
[270] | 140 | virtual const std::string &GetKeyName() const
|
---|
| 141 | {
|
---|
| 142 | return GetName();
|
---|
| 143 | }
|
---|
| 144 | virtual bool IsDuplication( const CClass *pClass ) const
|
---|
| 145 | {
|
---|
| 146 | if( pClass->IsEqualSymbol( *this ) )
|
---|
| 147 | {
|
---|
| 148 | return true;
|
---|
| 149 | }
|
---|
| 150 | return false;
|
---|
| 151 | }
|
---|
[640] | 152 | bool Equals( const CClass *pClass ) const
|
---|
| 153 | {
|
---|
| 154 | // ポインタが等しいかどうかを見てみる
|
---|
| 155 | if( this == pClass )
|
---|
| 156 | {
|
---|
| 157 | return true;
|
---|
| 158 | }
|
---|
| 159 | else if( this->IsNeedResolve() || pClass->IsNeedResolve() )
|
---|
| 160 | {
|
---|
| 161 | // 依存関係解決前の状態であれば、パスが等しいかどうかを見てみる
|
---|
| 162 | if( this->IsDuplication( pClass ) )
|
---|
| 163 | {
|
---|
| 164 | return true;
|
---|
| 165 | }
|
---|
| 166 | }
|
---|
| 167 | return false;
|
---|
| 168 | }
|
---|
[270] | 169 |
|
---|
[540] | 170 | virtual void Using() const;
|
---|
| 171 |
|
---|
[206] | 172 | void Readed(){
|
---|
| 173 | isReady = true;
|
---|
| 174 | }
|
---|
| 175 | bool IsReady() const{
|
---|
| 176 | return isReady;
|
---|
| 177 | }
|
---|
[184] | 178 |
|
---|
[206] | 179 | const NamespaceScopesCollection &GetImportedNamespaces() const
|
---|
| 180 | {
|
---|
| 181 | return importedNamespaces;
|
---|
| 182 | }
|
---|
| 183 |
|
---|
[290] | 184 | // 型パラメータ
|
---|
[424] | 185 | const GenericTypes &GetFormalGenericTypes() const
|
---|
| 186 | {
|
---|
| 187 | return formalGenericTypes;
|
---|
| 188 | }
|
---|
[290] | 189 | void AddFormalGenericType( GenericType genericType )
|
---|
| 190 | {
|
---|
| 191 | this->formalGenericTypes.push_back( genericType );
|
---|
| 192 | }
|
---|
[299] | 193 | int GetFormalGenericTypeParameterIndex( const std::string &name ) const
|
---|
| 194 | {
|
---|
| 195 | int i = 0;
|
---|
| 196 | BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
|
---|
| 197 | {
|
---|
| 198 | if( genericType.GetName() == name )
|
---|
| 199 | {
|
---|
| 200 | return i;
|
---|
| 201 | }
|
---|
| 202 | i++;
|
---|
| 203 | }
|
---|
| 204 | return -1;
|
---|
| 205 | }
|
---|
[290] | 206 | bool IsExistFormalGenericTypeParameter( const std::string &name ) const
|
---|
| 207 | {
|
---|
| 208 | BOOST_FOREACH( const GenericType &genericType, formalGenericTypes )
|
---|
| 209 | {
|
---|
| 210 | if( genericType.GetName() == name )
|
---|
| 211 | {
|
---|
| 212 | return true;
|
---|
| 213 | }
|
---|
| 214 | }
|
---|
| 215 | return false;
|
---|
| 216 | }
|
---|
[379] | 217 | bool IsGeneric() const
|
---|
| 218 | {
|
---|
| 219 | return ( this->formalGenericTypes.size() != 0 );
|
---|
| 220 | }
|
---|
[290] | 221 |
|
---|
[206] | 222 | // 継承元クラス
|
---|
| 223 | bool HasSuperClass() const
|
---|
| 224 | {
|
---|
| 225 | return ( pSuperClass != NULL );
|
---|
| 226 | }
|
---|
| 227 | const CClass &GetSuperClass() const
|
---|
| 228 | {
|
---|
| 229 | return *pSuperClass;
|
---|
| 230 | }
|
---|
| 231 | void SetSuperClass( const CClass *pSuperClass )
|
---|
| 232 | {
|
---|
| 233 | this->pSuperClass = pSuperClass;
|
---|
| 234 | }
|
---|
[299] | 235 | const Types &GetSuperClassActualTypeParameters() const
|
---|
| 236 | {
|
---|
| 237 | return superClassActualTypeParameters;
|
---|
| 238 | }
|
---|
| 239 | void SetSuperClassActualTypeParameters( const Types &actualTypeParameters )
|
---|
| 240 | {
|
---|
| 241 | this->superClassActualTypeParameters = actualTypeParameters;
|
---|
| 242 | }
|
---|
[206] | 243 |
|
---|
| 244 | // Blittable型
|
---|
| 245 | bool IsBlittableType() const
|
---|
| 246 | {
|
---|
| 247 | return !blittableType.IsNull();
|
---|
| 248 | }
|
---|
| 249 | const Type &GetBlittableType() const
|
---|
| 250 | {
|
---|
| 251 | return blittableType;
|
---|
| 252 | }
|
---|
| 253 | void SetBlittableType( const Type &type ){
|
---|
| 254 | blittableType = type;
|
---|
| 255 | }
|
---|
| 256 |
|
---|
| 257 | bool IsClass() const;
|
---|
| 258 | bool IsInterface() const;
|
---|
[370] | 259 | bool IsComInterface() const;
|
---|
[206] | 260 | bool IsEnum() const;
|
---|
| 261 | bool IsDelegate() const;
|
---|
| 262 | bool IsStructure() const;
|
---|
| 263 | void SetClassType( ClassType classType )
|
---|
| 264 | {
|
---|
| 265 | this->classType = classType;
|
---|
| 266 | }
|
---|
[632] | 267 | ClassType GetClassType() const
|
---|
| 268 | {
|
---|
| 269 | return classType;
|
---|
| 270 | }
|
---|
[206] | 271 |
|
---|
| 272 |
|
---|
| 273 | //コンストラクタをコンパイルしているかどうかのチェックフラグ
|
---|
[184] | 274 | private:
|
---|
[206] | 275 | mutable bool isCompilingConstructor;
|
---|
[184] | 276 | public:
|
---|
[206] | 277 | void NotifyStartConstructorCompile() const;
|
---|
| 278 | void NotifyFinishConstructorCompile() const;
|
---|
| 279 | bool IsCompilingConstructor() const;
|
---|
[184] | 280 |
|
---|
[206] | 281 | //デストラクタをコンパイルしているかどうかのチェックフラグ
|
---|
| 282 | private:
|
---|
| 283 | mutable bool isCompilingDestructor;
|
---|
| 284 | public:
|
---|
| 285 | void NotifyStartDestructorCompile() const;
|
---|
| 286 | void NotifyFinishDestructorCompile() const;
|
---|
| 287 | bool IsCompilingDestructor() const;
|
---|
[191] | 288 |
|
---|
[193] | 289 |
|
---|
[206] | 290 | //自身の派生クラスかどうかを確認
|
---|
| 291 | bool IsSubClass( const CClass *pClass ) const;
|
---|
| 292 |
|
---|
| 293 | //自身と等しいまたは派生クラスかどうかを確認
|
---|
| 294 | bool IsEqualsOrSubClass( const CClass *pClass ) const;
|
---|
| 295 |
|
---|
| 296 | // 自身と等しいまたは派生クラス、基底クラスかどうかを確認
|
---|
| 297 | bool IsEqualsOrSubClassOrSuperClass( const CClass &objClass ) const;
|
---|
| 298 |
|
---|
| 299 | // インターフェイス
|
---|
| 300 | bool HasInterfaces() const
|
---|
| 301 | {
|
---|
| 302 | return ( interfaces.size() != 0 );
|
---|
| 303 | }
|
---|
[560] | 304 | void AddInterface( ::Interface *pInterface )
|
---|
| 305 | {
|
---|
| 306 | interfaces.push_back( pInterface );
|
---|
| 307 | }
|
---|
[342] | 308 | const Interfaces &GetInterfaces() const
|
---|
| 309 | {
|
---|
| 310 | return interfaces;
|
---|
| 311 | }
|
---|
[632] | 312 | Interfaces &GetInterfaces()
|
---|
| 313 | {
|
---|
| 314 | return interfaces;
|
---|
| 315 | }
|
---|
[206] | 316 | bool IsInheritsInterface( const CClass *pInterfaceClass ) const;
|
---|
| 317 |
|
---|
[340] | 318 | // クラス継承
|
---|
[299] | 319 | bool InheritsClass( const CClass &inheritsClass, const Types &actualTypeParameters, int nowLine );
|
---|
[206] | 320 |
|
---|
| 321 | //メンバ、メソッドの追加
|
---|
[561] | 322 | void AddDynamicMember( Member *pMember );
|
---|
| 323 | void AddStaticMember( Member *pMember );
|
---|
[206] | 324 |
|
---|
| 325 | //重複チェック
|
---|
[409] | 326 | bool DupliCheckAll(const char *name) const;
|
---|
| 327 | bool DupliCheckMember(const char *name) const;
|
---|
[206] | 328 |
|
---|
| 329 | const Members &GetDynamicMembers() const
|
---|
| 330 | {
|
---|
| 331 | return dynamicMembers;
|
---|
| 332 | }
|
---|
| 333 | const Members &GetStaticMembers() const
|
---|
| 334 | {
|
---|
| 335 | return staticMembers;
|
---|
| 336 | }
|
---|
| 337 | Members &GetDynamicMembers()
|
---|
| 338 | {
|
---|
| 339 | return dynamicMembers;
|
---|
| 340 | }
|
---|
| 341 | Members &GetStaticMembers()
|
---|
| 342 | {
|
---|
| 343 | return staticMembers;
|
---|
| 344 | }
|
---|
[355] | 345 |
|
---|
[561] | 346 | const Member *FindDynamicMember( const char *memberName ) const;
|
---|
[409] | 347 | bool HasDynamicMember( const char *memberName ) const
|
---|
[355] | 348 | {
|
---|
[409] | 349 | return ( FindDynamicMember( memberName ) != NULL );
|
---|
[355] | 350 | }
|
---|
[206] | 351 |
|
---|
[350] | 352 | void EnumDynamicMethodsOrInterfaceMethods( const char *methodName, std::vector<const UserProc *> &subs ) const;
|
---|
| 353 | const CMethod *GetDynamicMethodOrInterfaceMethod( const UserProc *pUserProc ) const;
|
---|
[347] | 354 |
|
---|
[206] | 355 | const Methods &GetStaticMethods() const
|
---|
| 356 | {
|
---|
| 357 | return staticMethods;
|
---|
| 358 | }
|
---|
| 359 | Methods &GetStaticMethods()
|
---|
| 360 | {
|
---|
| 361 | return staticMethods;
|
---|
| 362 | }
|
---|
| 363 |
|
---|
| 364 | //デフォルト コンストラクタ
|
---|
| 365 | const CMethod *GetConstructorMethod() const
|
---|
| 366 | {
|
---|
| 367 | if( ConstructorMemberSubIndex == -1 ) return NULL;
|
---|
[342] | 368 | return GetDynamicMethods()[ConstructorMemberSubIndex];
|
---|
[206] | 369 | }
|
---|
| 370 | void SetConstructorMemberSubIndex( int constructorMemberSubIndex )
|
---|
| 371 | {
|
---|
| 372 | this->ConstructorMemberSubIndex = constructorMemberSubIndex;
|
---|
| 373 | }
|
---|
[632] | 374 | int GetConstructorMemberSubIndex() const
|
---|
| 375 | {
|
---|
| 376 | return ConstructorMemberSubIndex;
|
---|
| 377 | }
|
---|
[206] | 378 |
|
---|
| 379 | //デストラクタ メソッドを取得
|
---|
| 380 | const CMethod *GetDestructorMethod() const
|
---|
| 381 | {
|
---|
| 382 | if( DestructorMemberSubIndex == -1 ) return NULL;
|
---|
[342] | 383 | return GetDynamicMethods()[DestructorMemberSubIndex];
|
---|
[206] | 384 | }
|
---|
| 385 | void SetDestructorMemberSubIndex( int destructorMemberSubIndex )
|
---|
| 386 | {
|
---|
| 387 | this->DestructorMemberSubIndex = destructorMemberSubIndex;
|
---|
| 388 | }
|
---|
[632] | 389 | int GetDestructorMemberSubIndex() const
|
---|
| 390 | {
|
---|
| 391 | return DestructorMemberSubIndex;
|
---|
| 392 | }
|
---|
[206] | 393 |
|
---|
[232] | 394 | // ユーザ指定のアラインメント固定値
|
---|
| 395 | int GetFixedAlignment() const
|
---|
| 396 | {
|
---|
| 397 | return fixedAlignment;
|
---|
| 398 | }
|
---|
| 399 | void SetFixedAlignment( int fixedAlignment )
|
---|
| 400 | {
|
---|
| 401 | this->fixedAlignment = fixedAlignment;
|
---|
| 402 | }
|
---|
| 403 |
|
---|
[672] | 404 | // 展開時の型パラメータ情報
|
---|
| 405 | bool IsExpanded() const
|
---|
| 406 | {
|
---|
| 407 | return !expandedClassActualTypeParameters.empty();
|
---|
| 408 | }
|
---|
| 409 | void ResolveExpandedClassActualTypeParameter( Type &type ) const;
|
---|
| 410 |
|
---|
[206] | 411 | // メンバの総合サイズを取得
|
---|
[409] | 412 | private:
|
---|
| 413 | int cacheSize;
|
---|
| 414 | public:
|
---|
[206] | 415 | int GetSize() const;
|
---|
| 416 |
|
---|
| 417 | // メンバのオフセットを取得
|
---|
[409] | 418 | int GetMemberOffset( const char *memberName ) const;
|
---|
[206] | 419 | private:
|
---|
| 420 | // アラインメント値を取得
|
---|
| 421 | int GetAlignment() const;
|
---|
| 422 |
|
---|
[342] | 423 |
|
---|
| 424 | /////////////////////////////////////////////////////////////////
|
---|
| 425 | // vtbl
|
---|
| 426 | /////////////////////////////////////////////////////////////////
|
---|
[206] | 427 | public:
|
---|
[342] | 428 | // vtblに存在する仮想関数の数
|
---|
| 429 | int GetVtblNum() const
|
---|
| 430 | {
|
---|
| 431 | return vtblNum;
|
---|
| 432 | }
|
---|
| 433 | void SetVtblNum( int vtblNum )
|
---|
| 434 | {
|
---|
| 435 | this->vtblNum = vtblNum;
|
---|
| 436 | }
|
---|
| 437 | void AddVtblNum( int vtblNum )
|
---|
| 438 | {
|
---|
| 439 | this->vtblNum += vtblNum;
|
---|
| 440 | }
|
---|
| 441 | bool IsExistVirtualFunctions() const
|
---|
| 442 | {
|
---|
[409] | 443 | // 構造体以外は仮想関数を持つ
|
---|
| 444 | return !IsStructure();
|
---|
[342] | 445 | }
|
---|
| 446 |
|
---|
| 447 | private:
|
---|
[593] | 448 | int vtbl_offset;
|
---|
| 449 | int comVtblOffset;
|
---|
| 450 | int vtblMasterListOffset;
|
---|
[559] | 451 | public:
|
---|
[345] | 452 | std::vector<long> vtblMasterList;
|
---|
[593] | 453 | int GetVtblOffset() const
|
---|
[559] | 454 | {
|
---|
| 455 | return vtbl_offset;
|
---|
| 456 | }
|
---|
| 457 | void SetVtblOffset( int vtblOffset )
|
---|
| 458 | {
|
---|
| 459 | this->vtbl_offset = vtblOffset;
|
---|
| 460 | }
|
---|
[593] | 461 | int GetComVtblOffset() const
|
---|
[559] | 462 | {
|
---|
| 463 | return comVtblOffset;
|
---|
| 464 | }
|
---|
| 465 | void SetComVtblOffset( int comVtblOffset )
|
---|
| 466 | {
|
---|
| 467 | this->comVtblOffset = comVtblOffset;
|
---|
| 468 | }
|
---|
[348] | 469 | void GetVtblMasterListIndexAndVtblIndex( const UserProc *pUserProc, int &vtblMasterListIndex, int &vtblIndex ) const;
|
---|
[350] | 470 | int GetVtblMasterListIndex( const CClass *pClass ) const;
|
---|
[345] | 471 | long GetVtblMasterListOffset() const;
|
---|
[559] | 472 | void SetVtblMasterListOffset( int vtblMasterListOffset )
|
---|
| 473 | {
|
---|
| 474 | this->vtblMasterListOffset = vtblMasterListOffset;
|
---|
| 475 | }
|
---|
[206] | 476 | bool IsAbstract() const;
|
---|
| 477 |
|
---|
| 478 |
|
---|
[355] | 479 | // TypeInfo用
|
---|
| 480 | mutable int typeInfoDataTableOffset;
|
---|
| 481 | void SetTypeInfoDataTableOffset( int typeInfoDataTableOffset ) const
|
---|
| 482 | {
|
---|
| 483 | this->typeInfoDataTableOffset = typeInfoDataTableOffset;
|
---|
| 484 | }
|
---|
| 485 | int GetTypeInfoDataTableOffset() const
|
---|
| 486 | {
|
---|
| 487 | return typeInfoDataTableOffset;
|
---|
| 488 | }
|
---|
| 489 |
|
---|
[387] | 490 | // 動的型データ用のメンバデータを取得
|
---|
| 491 | std::string GetStaticDefiningStringAsMemberNames() const;
|
---|
[412] | 492 | std::string GetStaticDefiningStringAsMemberOffsets() const;
|
---|
[417] | 493 | void GetReferenceOffsetsInitializeBuffer( std::string &referenceOffsetsBuffer, int &numOfReference, int baseOffset = 0 ) const;
|
---|
[637] | 494 |
|
---|
[640] | 495 | virtual bool Resolve( const ObjectModule &resolver, ResolveErrors &resolveErrors );
|
---|
[206] | 496 | };
|
---|
| 497 |
|
---|
[270] | 498 | class Classes : public Jenga::Common::Hashmap<CClass>
|
---|
[206] | 499 | {
|
---|
[191] | 500 | // XMLシリアライズ用
|
---|
[206] | 501 | public:
|
---|
| 502 | Classes()
|
---|
[538] | 503 | : pStringClass( NULL )
|
---|
[206] | 504 | , pObjectClass( NULL )
|
---|
[350] | 505 | , pInterfaceInfo( NULL )
|
---|
[206] | 506 | {
|
---|
| 507 | }
|
---|
| 508 | ~Classes()
|
---|
| 509 | {
|
---|
| 510 | }
|
---|
| 511 |
|
---|
[369] | 512 | bool Insert( CClass *pClass, int nowLine );
|
---|
[206] | 513 | CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine);
|
---|
| 514 |
|
---|
[598] | 515 | const CClass *FindEx( const Symbol &symbol ) const;
|
---|
[206] | 516 |
|
---|
| 517 |
|
---|
| 518 | /////////////////////////////
|
---|
| 519 | // 特殊クラス
|
---|
| 520 | /////////////////////////////
|
---|
[272] | 521 | mutable const CClass *pStringClass;
|
---|
| 522 | mutable const CClass *pObjectClass;
|
---|
[349] | 523 | mutable const CClass *pInterfaceInfo;
|
---|
[272] | 524 | const CClass *GetStringClassPtr() const;
|
---|
| 525 | const CClass *GetObjectClassPtr() const;
|
---|
[349] | 526 | const CClass *GetInterfaceInfoClassPtr() const;
|
---|
[184] | 527 | };
|
---|