Changeset 636 in dev for trunk/ab5.0/abdev/ab_common/include
- Timestamp:
- Jun 10, 2008, 11:40:17 PM (16 years ago)
- Location:
- trunk/ab5.0/abdev/ab_common/include/Lexical
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ab5.0/abdev/ab_common/include/Lexical/Interface.h
r603 r636 72 72 } 73 73 74 const CClass &GetClass() const{ 74 const CClass &GetClass() const 75 { 75 76 return *pInterfaceClass; 76 77 } -
trunk/ab5.0/abdev/ab_common/include/Lexical/Meta.h
r603 r636 69 69 70 70 // 静的リンク 71 void StaticLink( Meta &meta, long dataSectionBaseOffset, int sourceIndexBase );71 void StaticLink( Meta &meta, long dataSectionBaseOffset, const std::vector<int> &relationTable ); 72 72 73 73 const NamespaceScopesCollection &GetNamespaces() const -
trunk/ab5.0/abdev/ab_common/include/Lexical/NativeCode.h
r603 r636 125 125 int lineNum; 126 126 long nativeCodePos; 127 int sourceIndex;127 int relationalObjectModuleIndex; 128 128 long sourceCodePos; 129 129 DWORD codeType; … … 138 138 ar & BOOST_SERIALIZATION_NVP( lineNum ); 139 139 ar & BOOST_SERIALIZATION_NVP( nativeCodePos ); 140 ar & BOOST_SERIALIZATION_NVP( sourceIndex );140 ar & BOOST_SERIALIZATION_NVP( relationalObjectModuleIndex ); 141 141 ar & BOOST_SERIALIZATION_NVP( sourceCodePos ); 142 142 ar & BOOST_SERIALIZATION_NVP( codeType ); … … 144 144 145 145 public: 146 SourceLine( int lineNum, int nativeCodePos, int sourceIndex, int sourceCodePos, DWORD codeType )146 SourceLine( int lineNum, int nativeCodePos, int relationalObjectModuleIndex, int sourceCodePos, DWORD codeType ) 147 147 : lineNum( lineNum ) 148 148 , nativeCodePos( nativeCodePos ) 149 , sourceIndex( sourceIndex )149 , relationalObjectModuleIndex( relationalObjectModuleIndex ) 150 150 , sourceCodePos( sourceCodePos ) 151 151 , codeType( codeType ) … … 164 164 return nativeCodePos; 165 165 } 166 int Get SourceIndex() const167 { 168 return sourceIndex;169 } 170 void Set SourceIndex( int sourceIndex )171 { 172 this-> sourceIndex = sourceIndex;166 int GetRelationalObjectModuleIndex() const 167 { 168 return relationalObjectModuleIndex; 169 } 170 void SetRelationalObjectModuleIndex( int relationalObjectModuleIndex ) 171 { 172 this->relationalObjectModuleIndex = relationalObjectModuleIndex; 173 173 } 174 174 long GetSourceCodePos() const … … 259 259 260 260 void ResetDataSectionBaseOffset( long dataSectionBaseOffset ); 261 void ResetSourceIndexes( long sourceIndexBase );261 void ResetSourceIndexes( const std::vector<int> &relationTable ); 262 262 }; -
trunk/ab5.0/abdev/ab_common/include/Lexical/ObjectModule.h
r632 r636 6 6 // オブジェクトモジュール名 7 7 std::string name; 8 9 // 関連オブジェクトモジュールの名前リスト 10 Jenga::Common::Strings relationalObjectModuleNames; 8 11 9 12 // メタ情報 … … 18 21 private: 19 22 // ソースコード 20 int currentSourceIndex; 21 BasicSources sources; 23 BasicSource source; 22 24 23 25 // XMLシリアライズ用 … … 33 35 34 36 ar & BOOST_SERIALIZATION_NVP( name ); 37 ar & BOOST_SERIALIZATION_NVP( relationalObjectModuleNames ); 35 38 ar & BOOST_SERIALIZATION_NVP( meta ); 36 39 ar & BOOST_SERIALIZATION_NVP( globalNativeCode ); 37 40 ar & BOOST_SERIALIZATION_NVP( dataTable ); 38 ar & BOOST_SERIALIZATION_NVP( currentSourceIndex ); 39 ar & BOOST_SERIALIZATION_NVP( sources ); 41 ar & BOOST_SERIALIZATION_NVP( source ); 40 42 } 41 43 … … 51 53 this->name = name; 52 54 } 53 int GetCurrentSourceIndex() const55 const BasicSource &GetSource() const 54 56 { 55 return currentSourceIndex;57 return source; 56 58 } 57 const BasicSource &GetCurrentSource() const59 BasicSource &GetSource() 58 60 { 59 return source s[currentSourceIndex];61 return source; 60 62 } 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 } 63 64 // 下記の関連になるようなテーブルを取得する 65 // 要素 = 古いインデックス、値 = 新しいインデックス 66 const std::vector<int> GetRelationTable( const Jenga::Common::Strings &oldRelationalObjectModule ); 77 67 78 68 bool Read( const std::string &filePath ); -
trunk/ab5.0/abdev/ab_common/include/Lexical/Source.h
r632 r636 11 11 template<class Archive> void serialize(Archive& ar, const unsigned int version) 12 12 { 13 trace_for_serialize( "serializing - IncludedFilesRelation" );14 15 13 ar & BOOST_SERIALIZATION_NVP( filePaths ); 16 14 ar & BOOST_SERIALIZATION_NVP( lineFileNumbers ); … … 119 117 template<class Archive> void load(Archive& ar, const unsigned int version) 120 118 { 121 trace_for_serialize( "serializing(load) - BasicSource" );122 123 119 std::string _buffer; 124 120 ar & BOOST_SERIALIZATION_NVP( _buffer ); … … 139 135 template<class Archive> void save(Archive& ar, const unsigned int version) const 140 136 { 141 trace_for_serialize( "serializing(save) - BasicSource" );142 143 137 // 保存準備 144 138 char *tempCode = (char *)calloc( (length+1) * 3, 1 ); … … 252 246 int cannotIncludeSourcePos; 253 247 }; 254 typedef std::vector<BasicSource> BasicSources; 248 class BasicSources 249 : public std::vector<BasicSource> 250 , public Jenga::Common::BoostSerializationSupport<BasicSources> 251 { 252 // XMLシリアライズ用 253 private: 254 virtual const char *RootTagName() const 255 { 256 return "basicSources"; 257 } 258 friend class boost::serialization::access; 259 template<class Archive> void serialize(Archive& ar, const unsigned int version) 260 { 261 ar & boost::serialization::make_nvp("vector_BasicSource", boost::serialization::base_object<std::vector<BasicSource>>(*this)); 262 } 263 }; 255 264 256 265 class SourceCodePosition
Note:
See TracChangeset
for help on using the changeset viewer.