source: dev/trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h@ 632

Last change on this file since 632 was 632, checked in by dai_9181, 16 years ago

ジェネリッククラスの型パラメータに値型が指定されたときに限り、テンプレート展開を行うようにした。

TODO: libファイルを跨ってテンプレート展開ができていないため、ソースコード管理部分に手を加える必要あり。

File size: 1.8 KB
Line 
1#pragma once
2
3class ObjectModule
4{
5public:
6 // オブジェクトモジュール名
7 std::string name;
8
9 // メタ情報
10 Meta meta;
11
12 // グローバル領域のネイティブコード
13 NativeCode globalNativeCode;
14
15 // データテーブル
16 DataTable dataTable;
17
18private:
19 // ソースコード
20 int currentSourceIndex;
21 BasicSources sources;
22
23 // XMLシリアライズ用
24private:
25 virtual const char *RootTagName() const
26 {
27 return "objectModule";
28 }
29 friend class boost::serialization::access;
30 template<class Archive> void serialize(Archive& ar, const unsigned int version)
31 {
32 trace_for_serialize( "serializing - objectModule" );
33
34 ar & BOOST_SERIALIZATION_NVP( name );
35 ar & BOOST_SERIALIZATION_NVP( meta );
36 ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
37 ar & BOOST_SERIALIZATION_NVP( dataTable );
38 ar & BOOST_SERIALIZATION_NVP( currentSourceIndex );
39 ar & BOOST_SERIALIZATION_NVP( sources );
40 }
41
42public:
43 void StaticLink( ObjectModule &objectModule );
44
45 const std::string &GetName() const
46 {
47 return name;
48 }
49 void SetName( const std::string &name )
50 {
51 this->name = name;
52 }
53 int GetCurrentSourceIndex() const
54 {
55 return currentSourceIndex;
56 }
57 const BasicSource &GetCurrentSource() const
58 {
59 return sources[currentSourceIndex];
60 }
61 BasicSource &GetCurrentSource()
62 {
63 return sources[currentSourceIndex];
64 }
65 void SetCurrentSourceIndex( int currentSourceIndex )
66 {
67 this->currentSourceIndex = currentSourceIndex;
68 }
69 const BasicSource &GetSource( int sourceIndex ) const
70 {
71 return sources[sourceIndex];
72 }
73 BasicSources &GetSources()
74 {
75 return sources;
76 }
77
78 bool Read( const std::string &filePath );
79 bool Write( const std::string &filePath ) const;
80 bool ReadString( const std::string &str );
81 bool WriteString( std::string &str ) const;
82};
83typedef std::vector<ObjectModule *> ObjectModules;
Note: See TracBrowser for help on using the repository browser.