source: dev/trunk/jenga/include/smoothie/ObjectModule.h@ 189

Last change on this file since 189 was 187, checked in by dai_9181, 17 years ago
File size: 1.4 KB
Line 
1#pragma once
2
3#include <jenga/include/common/BoostXmlSupport.h>
4
5#include "TypeDef.h"
6#include "Namespace.h"
7#include "Procedure.h"
8#include "Class.h"
9
10// プロジェクト中に存在するメタ情報
11class Meta : public Jenga::Common::BoostXmlSupport<Meta>
12{
13 Classes *pClasses;
14 ProcPointers *pProcPointers;
15public:
16
17 Meta( Classes *pNewClasses, ProcPointers *pNewProcPointers )
18 : pClasses( pNewClasses )
19 , pProcPointers( pNewProcPointers )
20 {
21 }
22 ~Meta()
23 {
24 delete pClasses;
25 delete pProcPointers;
26 }
27
28 // 名前空間
29 NamespaceScopesCollection namespaceScopesCollection;
30
31 // クラス
32 Classes &GetClasses()
33 {
34 return *pClasses;
35 }
36 void SetClasses( Classes *pClasses )
37 {
38 this->pClasses = pClasses;
39 }
40
41 // TypeDef
42 TypeDefCollection typeDefs;
43
44 // 関数ポインタ
45 ProcPointers &GetProcPointers()
46 {
47 return *pProcPointers;
48 }
49
50 // blittable型
51 BlittableTypes blittableTypes;
52
53 // XMLシリアライズ用
54private:
55 virtual const char *RootTagName() const
56 {
57 return "meta";
58 }
59 friend class boost::serialization::access;
60 template<class Archive> void serialize(Archive& ar, const unsigned int version)
61 {
62 //ar & BOOST_SERIALIZATION_NVP( pClasses );
63 }
64};
65
66
67#define DEF_XML_SCHEMA( node ) BOOST_CLASS_IMPLEMENTATION( node, boost::serialization::object_serializable );
68
69// ノード クラスを追加したらここでも定義する
70DEF_XML_SCHEMA( Meta )
71
72#undef DEF_XML_SCHEMA
Note: See TracBrowser for help on using the repository browser.