[270] | 1 | #pragma once
|
---|
| 2 |
|
---|
[587] | 3 | class ObjectModule
|
---|
[270] | 4 | {
|
---|
| 5 | public:
|
---|
[632] | 6 | // オブジェクトモジュール名
|
---|
| 7 | std::string name;
|
---|
| 8 |
|
---|
[636] | 9 | // 関連オブジェクトモジュールの名前リスト
|
---|
| 10 | Jenga::Common::Strings relationalObjectModuleNames;
|
---|
| 11 |
|
---|
[587] | 12 | // メタ情報
|
---|
| 13 | Meta meta;
|
---|
| 14 |
|
---|
[270] | 15 | // グローバル領域のネイティブコード
|
---|
| 16 | NativeCode globalNativeCode;
|
---|
| 17 |
|
---|
| 18 | // データテーブル
|
---|
| 19 | DataTable dataTable;
|
---|
| 20 |
|
---|
[280] | 21 | private:
|
---|
[279] | 22 | // ソースコード
|
---|
[636] | 23 | BasicSource source;
|
---|
[279] | 24 |
|
---|
[270] | 25 | // XMLシリアライズ用
|
---|
| 26 | private:
|
---|
| 27 | virtual const char *RootTagName() const
|
---|
| 28 | {
|
---|
[587] | 29 | return "objectModule";
|
---|
[270] | 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 |
|
---|
[632] | 36 | ar & BOOST_SERIALIZATION_NVP( name );
|
---|
[636] | 37 | ar & BOOST_SERIALIZATION_NVP( relationalObjectModuleNames );
|
---|
[587] | 38 | ar & BOOST_SERIALIZATION_NVP( meta );
|
---|
[270] | 39 | ar & BOOST_SERIALIZATION_NVP( globalNativeCode );
|
---|
| 40 | ar & BOOST_SERIALIZATION_NVP( dataTable );
|
---|
[636] | 41 | ar & BOOST_SERIALIZATION_NVP( source );
|
---|
[270] | 42 | }
|
---|
[273] | 43 |
|
---|
| 44 | public:
|
---|
[816] | 45 | ObjectModule() {}
|
---|
[587] | 46 |
|
---|
[632] | 47 | const std::string &GetName() const
|
---|
| 48 | {
|
---|
| 49 | return name;
|
---|
| 50 | }
|
---|
| 51 | void SetName( const std::string &name )
|
---|
| 52 | {
|
---|
| 53 | this->name = name;
|
---|
| 54 | }
|
---|
[636] | 55 | const BasicSource &GetSource() const
|
---|
[280] | 56 | {
|
---|
[636] | 57 | return source;
|
---|
[280] | 58 | }
|
---|
[636] | 59 | BasicSource &GetSource()
|
---|
[280] | 60 | {
|
---|
[636] | 61 | return source;
|
---|
[280] | 62 | }
|
---|
| 63 |
|
---|
[637] | 64 | // 静的リンクを行う
|
---|
| 65 | void StaticLink( ObjectModule &objectModule, bool isSll );
|
---|
| 66 |
|
---|
| 67 | // 依存関係の解決を行う
|
---|
[640] | 68 | void Resolve( ResolveErrors &resolveErrors );
|
---|
[637] | 69 |
|
---|
[636] | 70 | // 下記の関連になるようなテーブルを取得する
|
---|
| 71 | // 要素 = 古いインデックス、値 = 新しいインデックス
|
---|
| 72 | const std::vector<int> GetRelationTable( const Jenga::Common::Strings &oldRelationalObjectModule );
|
---|
| 73 |
|
---|
[279] | 74 | bool Read( const std::string &filePath );
|
---|
| 75 | bool Write( const std::string &filePath ) const;
|
---|
[587] | 76 | bool ReadString( const std::string &str );
|
---|
| 77 | bool WriteString( std::string &str ) const;
|
---|
[816] | 78 |
|
---|
| 79 | private:
|
---|
| 80 | ObjectModule(ObjectModule const&);
|
---|
| 81 | ObjectModule& operator =(ObjectModule const&);
|
---|
[270] | 82 | };
|
---|
| 83 | typedef std::vector<ObjectModule *> ObjectModules;
|
---|