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

Last change on this file was 829, checked in by イグトランス (egtra), 12 years ago

svn:eol-styleとsvn:mime-type(文字コード指定含む)の設定

  • Property svn:eol-style set to native
  • Property svn:mime-type set to text/plain; charset=Shift_JIS
File size: 1.9 KB
Line 
1#pragma once
2
3class ObjectModule
4{
5public:
6 // オブジェクトモジュール名
7 std::string name;
8
9 // 関連オブジェクトモジュールの名前リスト
10 Jenga::Common::Strings relationalObjectModuleNames;
11
12 // メタ情報
13 Meta meta;
14
15 // グローバル領域のネイティブコード
16 NativeCode globalNativeCode;
17
18 // データテーブル
19 DataTable dataTable;
20
21private:
22 // ソースコード
23 BasicSource source;
24
25 // XMLシリアライズ用
26private:
27 virtual const char *RootTagName() const
28 {
29 return "objectModule";
30 }
31 friend class boost::serialization::access;
32 template<class Archive> void serialize(Archive& ar, const unsigned int version)
33 {
34 trace_for_serialize( "serializing - objectModule" );
35
36 ar & BOOST_SERIALIZATION_NVP( name );
37 ar & BOOST_SERIALIZATION_NVP( relationalObjectModuleNames );
38 ar & BOOST_SERIALIZATION_NVP( meta );
39 ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
40 ar & BOOST_SERIALIZATION_NVP( dataTable );
41 ar & BOOST_SERIALIZATION_NVP( source );
42 }
43
44public:
45 ObjectModule() {}
46
47 const std::string &GetName() const
48 {
49 return name;
50 }
51 void SetName( const std::string &name )
52 {
53 this->name = name;
54 }
55 const BasicSource &GetSource() const
56 {
57 return source;
58 }
59 BasicSource &GetSource()
60 {
61 return source;
62 }
63
64 // 静的リンクを行う
65 void StaticLink( ObjectModule &objectModule, bool isSll );
66
67 // 依存関係の解決を行う
68 void Resolve( ResolveErrors &resolveErrors );
69
70 // 下記の関連になるようなテーブルを取得する
71 // 要素 = 古いインデックス、値 = 新しいインデックス
72 const std::vector<int> GetRelationTable( const Jenga::Common::Strings &oldRelationalObjectModule );
73
74 bool Read( const std::string &filePath );
75 bool Write( const std::string &filePath ) const;
76 bool ReadString( const std::string &str );
77 bool WriteString( std::string &str ) const;
78
79private:
80 ObjectModule(ObjectModule const&);
81 ObjectModule& operator =(ObjectModule const&);
82};
83typedef std::vector<ObjectModule *> ObjectModules;
Note: See TracBrowser for help on using the repository browser.