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

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

リンカの依存関係解決モジュールを製作中

File size: 1.8 KB
RevLine 
[270]1#pragma once
2
[587]3class ObjectModule
[270]4{
5public:
[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]21private:
[279]22 // ソースコード
[636]23 BasicSource source;
[279]24
[270]25 // XMLシリアライズ用
26private:
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
44public:
[587]45
[632]46 const std::string &GetName() const
47 {
48 return name;
49 }
50 void SetName( const std::string &name )
51 {
52 this->name = name;
53 }
[636]54 const BasicSource &GetSource() const
[280]55 {
[636]56 return source;
[280]57 }
[636]58 BasicSource &GetSource()
[280]59 {
[636]60 return source;
[280]61 }
62
[637]63 // 静的リンクを行う
64 void StaticLink( ObjectModule &objectModule, bool isSll );
65
66 // 依存関係の解決を行う
67 void Resolve();
68
[636]69 // 下記の関連になるようなテーブルを取得する
70 // 要素 = 古いインデックス、値 = 新しいインデックス
71 const std::vector<int> GetRelationTable( const Jenga::Common::Strings &oldRelationalObjectModule );
72
[279]73 bool Read( const std::string &filePath );
74 bool Write( const std::string &filePath ) const;
[587]75 bool ReadString( const std::string &str );
76 bool WriteString( std::string &str ) const;
[270]77};
78typedef std::vector<ObjectModule *> ObjectModules;
Note: See TracBrowser for help on using the repository browser.