Changeset 190 in dev for trunk/jenga/include/smoothie
- Timestamp:
- Jun 26, 2007, 12:05:36 AM (17 years ago)
- Location:
- trunk/jenga/include/smoothie
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/jenga/include/smoothie/Class.h
r181 r190 1 1 #pragma once 2 3 #include <jenga/include/common/BoostXmlSupport.h> 2 4 3 5 #include "Prototype.h" … … 83 85 84 86 CClass( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const string &name ); 87 CClass() 88 : Prototype() 89 { 90 } 85 91 ~CClass(); 86 92 … … 259 265 CClass *pobj_NextClass; 260 266 261 267 // XMLシリアライズ用 268 private: 269 friend class boost::serialization::access; 270 template<class Archive> void serialize(Archive& ar, const unsigned int version) 271 { 272 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Prototype ); 273 ar & BOOST_SERIALIZATION_NVP( classType ); 274 } 275 276 277 public: 262 278 static bool SplitName( const char *desc, char *object, char *member, CClass::RefType &refType ){ 263 279 int lastIndex = -1; … … 305 321 class Classes 306 322 { 307 int hash(const char *name) const;323 int GetHashCode(const char *name) const; 308 324 void DestroyClass(CClass *pobj_c); 309 325 public: … … 318 334 319 335 virtual CClass *Create( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name) = 0; 336 bool Insert( CClass *pClass ); 320 337 CClass *Add( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const char *name,int nowLine); 321 338 … … 360 377 ///////////////////// 361 378 private: 362 CClass **ppobj_IteClass;363 int iIteMaxNum;364 int iIteNextNum;365 public: 366 void Iterator_Init( void);367 void Iterator_Reset( void);368 BOOL Iterator_HasNext( void);369 CClass *Iterator_GetNext( void);370 int Iterator_GetMaxCount( void);379 mutable CClass **ppobj_IteClass; 380 mutable int iIteMaxNum; 381 mutable int iIteNextNum; 382 public: 383 void Iterator_Init() const; 384 void Iterator_Reset() const; 385 BOOL Iterator_HasNext() const; 386 CClass *Iterator_GetNext() const; 387 int Iterator_GetMaxCount() const; 371 388 }; -
trunk/jenga/include/smoothie/ObjectModule.h
r187 r190 1 1 #pragma once 2 3 #include <jenga/include/common/BoostXmlSupport.h>4 2 5 3 #include "TypeDef.h" … … 9 7 10 8 // プロジェクト中に存在するメタ情報 11 class Meta : public Jenga::Common::BoostXmlSupport<Meta>9 class Meta 12 10 { 13 Classes *pClasses;14 11 ProcPointers *pProcPointers; 15 12 public: 16 13 17 Meta( Classes *pNewClasses, ProcPointers *pNewProcPointers ) 18 : pClasses( pNewClasses ) 19 , pProcPointers( pNewProcPointers ) 14 Meta( ProcPointers *pNewProcPointers ) 15 : pProcPointers( pNewProcPointers ) 16 { 17 } 18 Meta() 20 19 { 21 20 } 22 21 ~Meta() 23 22 { 24 delete pClasses;25 23 delete pProcPointers; 26 24 } … … 30 28 31 29 // クラス 32 Classes &GetClasses() 33 { 34 return *pClasses; 35 } 36 void SetClasses( Classes *pClasses ) 37 { 38 this->pClasses = pClasses; 39 } 30 virtual Classes &GetClasses() = 0; 31 virtual void SetClasses( Classes *pClasses ) = 0; 32 virtual bool AutoWrite( const std::string &filePath ) = 0; 40 33 41 34 // TypeDef … … 53 46 // XMLシリアライズ用 54 47 private: 55 virtual const char *RootTagName() const56 {57 return "meta";58 }59 48 friend class boost::serialization::access; 60 49 template<class Archive> void serialize(Archive& ar, const unsigned int version) 61 50 { 62 //ar & BOOST_SERIALIZATION_NVP( pClasses );63 51 } 64 52 }; 65 66 67 #define DEF_XML_SCHEMA( node ) BOOST_CLASS_IMPLEMENTATION( node, boost::serialization::object_serializable );68 69 // ノード クラスを追加したらここでも定義する70 DEF_XML_SCHEMA( Meta )71 72 #undef DEF_XML_SCHEMA -
trunk/jenga/include/smoothie/Prototype.h
r170 r190 4 4 #include <vector> 5 5 6 #include "Namespace.h" 6 #include <jenga/include/common/BoostXmlSupport.h> 7 8 #include "Symbol.h" 7 9 8 10 using namespace std; … … 11 13 class UserProc; 12 14 13 class Prototype 15 class Prototype : public Symbol 14 16 { 15 17 public: … … 22 24 23 25 private: 24 // 名前空間25 NamespaceScopes namespaceScopes;26 27 //名前28 string name;29 30 26 mutable bool isUsing; 31 27 … … 33 29 34 30 Prototype( const NamespaceScopes &namespaceScopes, const string &name ) 35 : namespaceScopes( namespaceScopes ) 36 , name( name ) 31 : Symbol( namespaceScopes, name ) 37 32 , isUsing( false ) 33 { 34 } 35 Prototype() 36 : Symbol() 38 37 { 39 38 } 40 39 ~Prototype() 41 40 { 42 }43 44 // 名前空間45 const NamespaceScopes &GetNamespaceScopes() const46 {47 return namespaceScopes;48 }49 50 const string &GetName() const51 {52 return name;53 41 } 54 42 … … 75 63 { 76 64 isUsing = true; 65 } 66 67 // XMLシリアライズ用 68 private: 69 friend class boost::serialization::access; 70 template<class Archive> void serialize(Archive& ar, const unsigned int version) 71 { 72 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol ); 77 73 } 78 74 -
trunk/jenga/include/smoothie/Smoothie.h
r181 r190 7 7 class Smoothie{ 8 8 static bool isUnicode; 9 10 static Meta meta;11 9 public: 12 10 … … 20 18 } 21 19 22 static Meta &GetMeta() 23 { 24 return meta; 25 } 20 static Meta &GetMeta(); 26 21 27 22 class Lexical{ -
trunk/jenga/include/smoothie/Symbol.h
r170 r190 3 3 #include <vector> 4 4 #include <string> 5 6 #include <jenga/include/common/BoostXmlSupport.h> 5 7 6 8 #include "Namespace.h" … … 20 22 Symbol( const char *fullName ); 21 23 Symbol( const string &fullName ); 24 Symbol() 25 { 26 } 22 27 23 28 const NamespaceScopes &GetNamespaceScopes() const … … 29 34 return name; 30 35 } 36 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_NVP( namespaceScopes ); 42 ar & BOOST_SERIALIZATION_NVP( name ); 43 } 31 44 };
Note:
See TracChangeset
for help on using the changeset viewer.