Changeset 209 in dev for trunk/abdev/BasicCompiler_Common/include
- Timestamp:
- Jul 13, 2007, 4:22:02 AM (17 years ago)
- Location:
- trunk/abdev/BasicCompiler_Common/include
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/abdev/BasicCompiler_Common/include/MetaImpl.h
r206 r209 18 18 // 関数・メソッド 19 19 UserProcs userProcs; 20 21 // DLL関数 22 DllProcs dllProcs; 20 23 21 24 // クラス … … 53 56 ar & BOOST_SERIALIZATION_NVP( namespaceScopesCollection ); 54 57 ar & BOOST_SERIALIZATION_NVP( userProcs ); 58 ar & BOOST_SERIALIZATION_NVP( dllProcs ); 55 59 ar & BOOST_SERIALIZATION_NVP( classesImpl ); 56 60 ar & BOOST_SERIALIZATION_NVP( globalVars ); … … 87 91 { 88 92 return userProcs; 93 } 94 95 const DllProcs &GetDllProcs() const 96 { 97 return dllProcs; 98 } 99 DllProcs &GetDllProcs() 100 { 101 return dllProcs; 89 102 } 90 103 -
trunk/abdev/BasicCompiler_Common/include/Procedure.h
r208 r209 205 205 } 206 206 207 bool IsMacro() const208 {209 return isMacro;210 }211 212 int GetSecondParmNum() const213 {214 return secondParmNum;215 }216 const Parameters &RealParams() const217 {218 return realParams;219 }220 int GetRealSecondParmNum() const221 {222 return realSecondParmNum;223 }224 225 void ExportOff(){226 isExport = false;227 }228 bool IsExport() const229 {230 return isExport;231 }232 void ThisIsSystemProc() const233 {234 isSystem = true;235 }236 bool IsSystem() const237 {238 return isSystem;239 }240 void ThisIsAutoGenerationProc() const241 {242 isAutoGeneration = true;243 }244 bool IsAutoGeneration() const245 {246 return isAutoGeneration;247 }248 void CompleteCompile() const249 {250 isCompiled = true;251 }252 void KillCompileStatus() const253 {254 isCompiled = false;255 }256 bool IsCompiled() const257 {258 return isCompiled;259 }260 bool IsDestructor() const261 {262 return ( GetName()[0] == '~' );263 }264 265 // バイナリコード位置とサイズ266 DWORD GetBeginOpAddress() const267 {268 return beginOpAddress;269 }270 void SetBeginOpAddress( DWORD beginOpAddress ) const271 {272 this->beginOpAddress = beginOpAddress;273 }274 DWORD GetEndOpAddress() const275 {276 return endOpAddress;277 }278 void SetEndOpAddress( DWORD endOpAddress ) const279 {280 this->endOpAddress = endOpAddress;281 }282 int GetCodeSize() const283 {284 return endOpAddress - beginOpAddress;285 }286 287 virtual const NamespaceScopes &GetNamespaceScopes() const;288 const NamespaceScopesCollection &GetImportedNamespaces() const;289 290 Variables &GetLocalVars() const291 {292 return localVars;293 }294 295 int GetId() const296 {297 return id;298 }299 300 std::string GetFullName() const;301 302 207 virtual bool IsDuplication( const UserProc *pUserProc ) const 303 208 { … … 311 216 } 312 217 218 bool IsMacro() const 219 { 220 return isMacro; 221 } 222 223 int GetSecondParmNum() const 224 { 225 return secondParmNum; 226 } 227 const Parameters &RealParams() const 228 { 229 return realParams; 230 } 231 int GetRealSecondParmNum() const 232 { 233 return realSecondParmNum; 234 } 235 236 void ExportOff(){ 237 isExport = false; 238 } 239 bool IsExport() const 240 { 241 return isExport; 242 } 243 void ThisIsSystemProc() const 244 { 245 isSystem = true; 246 } 247 bool IsSystem() const 248 { 249 return isSystem; 250 } 251 void ThisIsAutoGenerationProc() const 252 { 253 isAutoGeneration = true; 254 } 255 bool IsAutoGeneration() const 256 { 257 return isAutoGeneration; 258 } 259 void CompleteCompile() const 260 { 261 isCompiled = true; 262 } 263 void KillCompileStatus() const 264 { 265 isCompiled = false; 266 } 267 bool IsCompiled() const 268 { 269 return isCompiled; 270 } 271 bool IsDestructor() const 272 { 273 return ( GetName()[0] == '~' ); 274 } 275 276 // バイナリコード位置とサイズ 277 DWORD GetBeginOpAddress() const 278 { 279 return beginOpAddress; 280 } 281 void SetBeginOpAddress( DWORD beginOpAddress ) const 282 { 283 this->beginOpAddress = beginOpAddress; 284 } 285 DWORD GetEndOpAddress() const 286 { 287 return endOpAddress; 288 } 289 void SetEndOpAddress( DWORD endOpAddress ) const 290 { 291 this->endOpAddress = endOpAddress; 292 } 293 int GetCodeSize() const 294 { 295 return endOpAddress - beginOpAddress; 296 } 297 298 virtual const NamespaceScopes &GetNamespaceScopes() const; 299 const NamespaceScopesCollection &GetImportedNamespaces() const; 300 301 Variables &GetLocalVars() const 302 { 303 return localVars; 304 } 305 306 int GetId() const 307 { 308 return id; 309 } 310 311 std::string GetFullName() const; 312 313 313 bool IsVirtual() const; 314 314 … … 393 393 394 394 void EnumGlobalProcs( const char *simpleName, const char *localName, std::vector<const UserProc *> &subs ); 395 396 static void CollectUserProcs( const BasicSource &source, UserProcs &userProcs ); 397 }; 398 399 class DllProc : public Procedure 395 }; 396 397 class DllProc : public Procedure, public Jenga::Common::ObjectInHashmap<DllProc> 400 398 { 401 399 string dllFileName; … … 428 426 { 429 427 } 430 ~DllProc(){} 428 ~DllProc() 429 { 430 } 431 432 virtual const std::string &GetKeyName() const 433 { 434 return GetName(); 435 } 436 437 virtual bool IsDuplication( const DllProc *pDllProc ) const 438 { 439 if( pDllProc->IsEqualSymbol( *this ) 440 && this->Params().Equals( pDllProc->Params() ) ) 441 { 442 return true; 443 } 444 return false; 445 } 431 446 432 447 const string &GetDllFileName() const … … 449 464 bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine ); 450 465 }; 466 class DllProcs : public Jenga::Common::Hashmap<DllProc> 467 { 468 // XMLシリアライズ用 469 private: 470 friend class boost::serialization::access; 471 template<class Archive> void serialize(Archive& ar, const unsigned int version) 472 { 473 trace_for_serialize( "serializing - DllProcs" ); 474 475 ar & boost::serialization::make_nvp("Hashmap_DllProc", 476 boost::serialization::base_object<Jenga::Common::Hashmap<DllProc>>(*this)); 477 } 478 479 public: 480 void Add(const NamespaceScopes &namespaceScopes, char *buffer,int nowLine); 481 }; 482 483 void CollectProcedures( const BasicSource &source, UserProcs &userProcs, DllProcs &dllProcs ); 451 484 452 485 class ProcPointer : public Procedure
Note:
See TracChangeset
for help on using the changeset viewer.