[184] | 1 | #pragma once
|
---|
| 2 |
|
---|
| 3 | #include <jenga/include/smoothie/Class.h>
|
---|
| 4 |
|
---|
| 5 | class ClassImpl: public CClass
|
---|
| 6 | {
|
---|
| 7 | public:
|
---|
| 8 | ClassImpl( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name )
|
---|
| 9 | : CClass( namespaceScopes, importedNamespaces, name )
|
---|
| 10 | {
|
---|
| 11 | }
|
---|
[191] | 12 | ClassImpl()
|
---|
| 13 | : CClass()
|
---|
| 14 | {
|
---|
| 15 | }
|
---|
[184] | 16 |
|
---|
[193] | 17 | virtual bool IsEqualSymbol( const NamespaceScopes &namespaceScopes, const string &name ) const;
|
---|
| 18 |
|
---|
[184] | 19 | //継承させる
|
---|
| 20 | virtual bool Inherits( const char *inheritNames, int nowLine );
|
---|
| 21 | virtual bool InheritsClass( const CClass &inheritsClass, int nowLine );
|
---|
| 22 | virtual bool InheritsInterface( const CClass &inheritsClass, int nowLine );
|
---|
| 23 |
|
---|
| 24 | //メンバ、メソッドの追加
|
---|
| 25 | CMember *CreateMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine );
|
---|
| 26 | virtual void AddMember( Prototype::Accessibility accessibility, bool idConst, bool isRef, char *buffer, int nowLine );
|
---|
| 27 | virtual void AddStaticMember( Prototype::Accessibility accessibility, bool isConst, bool isRef, char *buffer, int nowLine );
|
---|
| 28 |
|
---|
| 29 | virtual void AddMethod(CClass *pobj_c, Prototype::Accessibility accessibility, BOOL bStatic, bool isConst, bool isAbstract,
|
---|
| 30 | bool isVirtual, bool isOverride, char *buffer, int nowLine);
|
---|
| 31 |
|
---|
| 32 | virtual LONG_PTR GetVtblGlobalOffset(void) const;
|
---|
| 33 | virtual void ActionVtblSchedule(LONG_PTR ImageBase, LONG_PTR MemPos_CodeSection);
|
---|
[191] | 34 |
|
---|
| 35 |
|
---|
| 36 | // XMLシリアライズ用
|
---|
| 37 | private:
|
---|
| 38 | friend class boost::serialization::access;
|
---|
| 39 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 40 | {
|
---|
| 41 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( CClass );
|
---|
| 42 | }
|
---|
[184] | 43 | };
|
---|
[191] | 44 | BOOST_IS_ABSTRACT( CClass );
|
---|
[184] | 45 |
|
---|
| 46 | class ClassesImpl : public Classes
|
---|
| 47 | {
|
---|
| 48 | public:
|
---|
[191] | 49 | ClassesImpl()
|
---|
| 50 | : Classes()
|
---|
| 51 | {
|
---|
| 52 | }
|
---|
| 53 |
|
---|
[184] | 54 | virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name);
|
---|
| 55 | virtual void CollectClassesForNameOnly( const BasicSource &source );
|
---|
| 56 |
|
---|
| 57 | virtual void InitStaticMember();
|
---|
| 58 |
|
---|
| 59 | private:
|
---|
| 60 | bool MemberVar_LoopRefCheck(const CClass &objClass);
|
---|
| 61 | public:
|
---|
| 62 | virtual void GetClass_recur(const char *lpszInheritsClass);
|
---|
| 63 | virtual void GetAllClassInfo();
|
---|
| 64 | virtual void Compile_System_InitializeUserTypes();
|
---|
| 65 |
|
---|
[193] | 66 | virtual const CClass *Find( const NamespaceScopes &namespaceScopes, const string &name ) const;
|
---|
[191] | 67 |
|
---|
[193] | 68 |
|
---|
[191] | 69 | // XMLシリアライズ用
|
---|
| 70 | private:
|
---|
| 71 | friend class boost::serialization::access;
|
---|
| 72 | BOOST_SERIALIZATION_SPLIT_MEMBER();
|
---|
| 73 | template<class Archive> void load(Archive& ar, const unsigned int version)
|
---|
| 74 | {
|
---|
| 75 | std::vector<ClassImpl *> vectorClasses;
|
---|
| 76 | ar & BOOST_SERIALIZATION_NVP( vectorClasses );
|
---|
| 77 |
|
---|
| 78 | // 読み込み後の処理
|
---|
| 79 | Clear();
|
---|
| 80 | BOOST_FOREACH( CClass *pClass, vectorClasses )
|
---|
| 81 | {
|
---|
| 82 | Insert( pClass );
|
---|
| 83 | }
|
---|
| 84 | }
|
---|
| 85 | template<class Archive> void save(Archive& ar, const unsigned int version) const
|
---|
| 86 | {
|
---|
| 87 | // 保存準備
|
---|
| 88 | std::vector<ClassImpl *> vectorClasses;
|
---|
| 89 | vectorClasses.clear();
|
---|
| 90 | Iterator_Reset();
|
---|
| 91 | while( Iterator_HasNext() )
|
---|
| 92 | {
|
---|
| 93 | vectorClasses.push_back( dynamic_cast<ClassImpl *>(Iterator_GetNext()) );
|
---|
| 94 | }
|
---|
| 95 |
|
---|
| 96 | ar & BOOST_SERIALIZATION_NVP( vectorClasses );
|
---|
| 97 | }
|
---|
[184] | 98 | };
|
---|
[191] | 99 | BOOST_IS_ABSTRACT( Classes );
|
---|