source: dev/trunk/ab5.0/abdev/ab_common/include/Lexical/RelationalObjectModuleItem.h@ 638

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

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

File size: 1.6 KB
Line 
1#pragma once
2
3namespace ActiveBasic{ namespace Common{ namespace Lexical{
4
5
6class RelationalObjectModuleItem
7 : public Symbol
8{
9 int relationalObjectModuleIndex;
10
11 // XMLシリアライズ用
12private:
13 friend class boost::serialization::access;
14 template<class Archive> void serialize(Archive& ar, const unsigned int version)
15 {
16 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
17 ar & BOOST_SERIALIZATION_NVP( relationalObjectModuleIndex );
18 }
19
20public:
21 RelationalObjectModuleItem( const RelationalObjectModuleItem &relationalObjectModuleItem )
22 : Symbol( relationalObjectModuleItem )
23 , relationalObjectModuleIndex( relationalObjectModuleItem.relationalObjectModuleIndex )
24 , isNeedResolve( false )
25 {
26 }
27 RelationalObjectModuleItem( const Symbol &symbol )
28 : Symbol( symbol )
29 , relationalObjectModuleIndex( 0 )
30 , isNeedResolve( false )
31 {
32 }
33 RelationalObjectModuleItem()
34 : relationalObjectModuleIndex( -1 )
35 , isNeedResolve( false )
36 {
37 }
38
39 int GetRelationalObjectModuleIndex() const
40 {
41 return relationalObjectModuleIndex;
42 }
43 void SetRelationalObjectModuleIndex( int relationalObjectModuleIndex )
44 {
45 this->relationalObjectModuleIndex = relationalObjectModuleIndex;
46 }
47
48 virtual void ResetRelationalObjectModuleIndex( const std::vector<int> &relationTable )
49 {
50 this->relationalObjectModuleIndex = relationTable[this->relationalObjectModuleIndex];
51 }
52
53 bool IsExternal() const
54 {
55 return ( relationalObjectModuleIndex != 0 );
56 }
57
58 bool isNeedResolve;
59 bool IsNeedResolve() const
60 {
61 return isNeedResolve;
62 }
63 void NeedResolve()
64 {
65 isNeedResolve = true;
66 }
67
68 virtual bool Resolve() = 0;
69};
70
71
72}}}
Note: See TracBrowser for help on using the repository browser.