[184] | 1 | #pragma once
|
---|
| 2 |
|
---|
[206] | 3 | class CClass;
|
---|
[353] | 4 | class Interface;
|
---|
[206] | 5 | class CMethod;
|
---|
| 6 |
|
---|
[208] | 7 | class Procedure : public Symbol
|
---|
[184] | 8 | {
|
---|
| 9 | public:
|
---|
[206] | 10 | // 種類
|
---|
| 11 | enum Kind{
|
---|
| 12 | Sub,
|
---|
| 13 | Function,
|
---|
| 14 | };
|
---|
| 15 |
|
---|
| 16 | private:
|
---|
| 17 | Kind kind;
|
---|
| 18 |
|
---|
| 19 | bool isCdecl;
|
---|
| 20 | mutable bool isUsing;
|
---|
| 21 |
|
---|
| 22 | protected:
|
---|
| 23 |
|
---|
| 24 | // パラメータ
|
---|
| 25 | Parameters params;
|
---|
| 26 |
|
---|
| 27 | // 戻り値の型
|
---|
| 28 | Type returnType;
|
---|
| 29 |
|
---|
| 30 | // ソースコードの位置
|
---|
| 31 | int codePos;
|
---|
| 32 |
|
---|
| 33 | // XMLシリアライズ用
|
---|
| 34 | private:
|
---|
| 35 | friend class boost::serialization::access;
|
---|
[208] | 36 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
[184] | 37 | {
|
---|
[206] | 38 | trace_for_serialize( "serializing - Procedure" );
|
---|
| 39 |
|
---|
[208] | 40 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Symbol );
|
---|
[206] | 41 | ar & BOOST_SERIALIZATION_NVP( kind );
|
---|
| 42 | ar & BOOST_SERIALIZATION_NVP( isCdecl );
|
---|
| 43 | ar & BOOST_SERIALIZATION_NVP( isUsing );
|
---|
| 44 | ar & BOOST_SERIALIZATION_NVP( params );
|
---|
| 45 | ar & BOOST_SERIALIZATION_NVP( returnType );
|
---|
| 46 | ar & BOOST_SERIALIZATION_NVP( codePos );
|
---|
[184] | 47 | }
|
---|
[206] | 48 |
|
---|
| 49 | public:
|
---|
[523] | 50 | Procedure( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl )
|
---|
[208] | 51 | : Symbol( namespaceScopes, name )
|
---|
[206] | 52 | , kind( kind )
|
---|
| 53 | , isCdecl( isCdecl )
|
---|
| 54 | , isUsing( false )
|
---|
| 55 | , codePos( -1 )
|
---|
| 56 | {
|
---|
| 57 | }
|
---|
| 58 | Procedure()
|
---|
| 59 | {
|
---|
| 60 | }
|
---|
| 61 | ~Procedure(){
|
---|
| 62 | BOOST_FOREACH( Parameter *pParam, params ){
|
---|
| 63 | delete pParam;
|
---|
| 64 | }
|
---|
| 65 | }
|
---|
| 66 |
|
---|
| 67 | bool IsSub() const
|
---|
| 68 | {
|
---|
| 69 | return ( kind == Sub );
|
---|
| 70 | }
|
---|
| 71 | bool IsFunction() const
|
---|
| 72 | {
|
---|
| 73 | return ( kind == Function );
|
---|
| 74 | }
|
---|
| 75 |
|
---|
| 76 | bool IsCdecl() const
|
---|
| 77 | {
|
---|
| 78 | return isCdecl;
|
---|
| 79 | }
|
---|
| 80 | void Using() const
|
---|
| 81 | {
|
---|
| 82 | isUsing = true;
|
---|
| 83 | }
|
---|
| 84 | bool IsUsing() const
|
---|
| 85 | {
|
---|
| 86 | return isUsing;
|
---|
| 87 | }
|
---|
| 88 |
|
---|
| 89 | int GetCodePos() const
|
---|
| 90 | {
|
---|
| 91 | return codePos;
|
---|
| 92 | }
|
---|
| 93 |
|
---|
| 94 | const Parameters &Params() const
|
---|
| 95 | {
|
---|
| 96 | return params;
|
---|
| 97 | }
|
---|
| 98 | const Type &ReturnType() const
|
---|
| 99 | {
|
---|
| 100 | return returnType;
|
---|
| 101 | }
|
---|
[184] | 102 | };
|
---|
| 103 |
|
---|
[206] | 104 | class UserProc : public Procedure, public Jenga::Common::ObjectInHashmap<UserProc>
|
---|
[184] | 105 | {
|
---|
| 106 | public:
|
---|
[523] | 107 | std::string _paramStr;
|
---|
[184] | 108 |
|
---|
[206] | 109 | private:
|
---|
| 110 | NamespaceScopesCollection importedNamespaces;
|
---|
[184] | 111 |
|
---|
[206] | 112 | // 親クラスと対応するメソッド
|
---|
| 113 | const CClass *pParentClass;
|
---|
[353] | 114 | const Interface *pInterface;
|
---|
[206] | 115 | CMethod *pMethod;
|
---|
| 116 |
|
---|
| 117 | bool isMacro;
|
---|
| 118 |
|
---|
| 119 | // パラメータの追加情報
|
---|
| 120 | int secondParmNum;
|
---|
| 121 | Parameters realParams;
|
---|
| 122 | int realSecondParmNum;
|
---|
| 123 |
|
---|
| 124 | // 各種フラグ
|
---|
| 125 | bool isExport;
|
---|
| 126 | mutable bool isSystem;
|
---|
| 127 | mutable bool isAutoGeneration;
|
---|
| 128 | mutable bool isCompiled;
|
---|
| 129 |
|
---|
| 130 | mutable DWORD beginOpAddress;
|
---|
| 131 | mutable DWORD endOpAddress;
|
---|
| 132 |
|
---|
| 133 | // ローカル変数
|
---|
| 134 | mutable Variables localVars;
|
---|
| 135 |
|
---|
| 136 | // 識別ID
|
---|
| 137 | int id;
|
---|
| 138 |
|
---|
[224] | 139 | // ネイティブコード
|
---|
| 140 | NativeCode nativeCode;
|
---|
| 141 |
|
---|
[206] | 142 | // XMLシリアライズ用
|
---|
| 143 | private:
|
---|
| 144 | friend class boost::serialization::access;
|
---|
| 145 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
[184] | 146 | {
|
---|
[206] | 147 | trace_for_serialize( "serializing - UserProc" );
|
---|
| 148 |
|
---|
| 149 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
|
---|
| 150 | ar & BOOST_SERIALIZATION_NVP( _paramStr );
|
---|
| 151 | ar & BOOST_SERIALIZATION_NVP( importedNamespaces );
|
---|
| 152 | ar & boost::serialization::make_nvp("pParentClass", const_cast<CClass *&>(pParentClass) );
|
---|
[353] | 153 | ar & boost::serialization::make_nvp("pInterface", const_cast<Interface *&>(pInterface) );
|
---|
[206] | 154 | ar & BOOST_SERIALIZATION_NVP( pMethod );
|
---|
| 155 | ar & BOOST_SERIALIZATION_NVP( isMacro );
|
---|
| 156 | ar & BOOST_SERIALIZATION_NVP( secondParmNum );
|
---|
| 157 | ar & BOOST_SERIALIZATION_NVP( realParams );
|
---|
| 158 | ar & BOOST_SERIALIZATION_NVP( realSecondParmNum );
|
---|
| 159 | ar & BOOST_SERIALIZATION_NVP( isExport );
|
---|
| 160 | ar & BOOST_SERIALIZATION_NVP( isSystem );
|
---|
| 161 | ar & BOOST_SERIALIZATION_NVP( isAutoGeneration );
|
---|
| 162 | ar & BOOST_SERIALIZATION_NVP( isCompiled );
|
---|
| 163 | ar & BOOST_SERIALIZATION_NVP( beginOpAddress );
|
---|
| 164 | ar & BOOST_SERIALIZATION_NVP( endOpAddress );
|
---|
| 165 | ar & BOOST_SERIALIZATION_NVP( localVars );
|
---|
| 166 | ar & BOOST_SERIALIZATION_NVP( id );
|
---|
[224] | 167 | ar & BOOST_SERIALIZATION_NVP( nativeCode );
|
---|
[184] | 168 | }
|
---|
| 169 |
|
---|
[206] | 170 | public:
|
---|
| 171 |
|
---|
[523] | 172 | UserProc( const NamespaceScopes &namespaceScopes, const NamespaceScopesCollection &importedNamespaces, const std::string &name, Kind kind, bool isMacro, bool isCdecl, bool isExport )
|
---|
[208] | 173 | : Procedure( namespaceScopes, name, kind, isCdecl )
|
---|
[206] | 174 | , importedNamespaces( importedNamespaces )
|
---|
| 175 | , pParentClass( NULL )
|
---|
[353] | 176 | , pInterface( NULL )
|
---|
[206] | 177 | , pMethod( NULL )
|
---|
| 178 | , isMacro( isMacro )
|
---|
[511] | 179 | , secondParmNum( 0 )
|
---|
| 180 | , realSecondParmNum( 1 )
|
---|
[206] | 181 | , isExport( isExport )
|
---|
| 182 | , isSystem( false )
|
---|
| 183 | , isAutoGeneration( false )
|
---|
| 184 | , isCompiled( false )
|
---|
| 185 | , beginOpAddress( 0 )
|
---|
| 186 | , endOpAddress( 0 )
|
---|
| 187 | {
|
---|
[511] | 188 | static int id_base=0;
|
---|
| 189 | id = ( id_base ++ );
|
---|
[206] | 190 | }
|
---|
| 191 | UserProc()
|
---|
| 192 | {
|
---|
| 193 | }
|
---|
| 194 | ~UserProc()
|
---|
| 195 | {
|
---|
| 196 | BOOST_FOREACH( Parameter *pParam, realParams ){
|
---|
| 197 | delete pParam;
|
---|
| 198 | }
|
---|
| 199 | }
|
---|
| 200 |
|
---|
[511] | 201 | void SetReturnType( const Type &newReturnType )
|
---|
| 202 | {
|
---|
| 203 | returnType = newReturnType;
|
---|
| 204 | }
|
---|
| 205 |
|
---|
[206] | 206 | virtual const std::string &GetKeyName() const
|
---|
| 207 | {
|
---|
| 208 | return GetName();
|
---|
| 209 | }
|
---|
| 210 |
|
---|
[209] | 211 | virtual bool IsDuplication( const UserProc *pUserProc ) const
|
---|
| 212 | {
|
---|
[326] | 213 | if( this->GetParentClassPtr() == pUserProc->GetParentClassPtr() // 親クラスが等しい
|
---|
[353] | 214 | && this->pInterface == pUserProc->pInterface // インターフェイスが等しい
|
---|
[326] | 215 | && pUserProc->IsEqualSymbol( *this ) // 名前空間及び名前が等しい
|
---|
| 216 | && this->Params().Equals( pUserProc->Params() ) // パラメータが等しい
|
---|
| 217 | && this->returnType.Equals( pUserProc->returnType ) ) // 戻り値が等しい
|
---|
[209] | 218 | {
|
---|
| 219 | return true;
|
---|
| 220 | }
|
---|
| 221 | return false;
|
---|
| 222 | }
|
---|
| 223 |
|
---|
[382] | 224 | /*!
|
---|
| 225 | @brief オーバーライド用に関数同士が等しいかどうかをチェックする
|
---|
| 226 | @param actualTypeParametersForThisProc thisオブジェクトで保有するメソッドを対象とした実型パラメータ
|
---|
| 227 | pUserProc 照らし合わせる関数
|
---|
| 228 | */
|
---|
| 229 | bool IsEqualForOverride( const Types &actualTypeParametersForThisProc, const UserProc *pUserProc ) const;
|
---|
[351] | 230 |
|
---|
[206] | 231 | bool IsMacro() const
|
---|
| 232 | {
|
---|
| 233 | return isMacro;
|
---|
| 234 | }
|
---|
| 235 |
|
---|
| 236 | int GetSecondParmNum() const
|
---|
| 237 | {
|
---|
| 238 | return secondParmNum;
|
---|
| 239 | }
|
---|
| 240 | const Parameters &RealParams() const
|
---|
| 241 | {
|
---|
| 242 | return realParams;
|
---|
| 243 | }
|
---|
[511] | 244 | void SetRealParams( const Parameters ¶ms )
|
---|
| 245 | {
|
---|
| 246 | realParams = params;
|
---|
| 247 | }
|
---|
[206] | 248 | int GetRealSecondParmNum() const
|
---|
| 249 | {
|
---|
| 250 | return realSecondParmNum;
|
---|
| 251 | }
|
---|
| 252 |
|
---|
| 253 | void ExportOff(){
|
---|
| 254 | isExport = false;
|
---|
| 255 | }
|
---|
| 256 | bool IsExport() const
|
---|
| 257 | {
|
---|
| 258 | return isExport;
|
---|
| 259 | }
|
---|
| 260 | void ThisIsSystemProc() const
|
---|
| 261 | {
|
---|
| 262 | isSystem = true;
|
---|
| 263 | }
|
---|
| 264 | bool IsSystem() const
|
---|
| 265 | {
|
---|
| 266 | return isSystem;
|
---|
| 267 | }
|
---|
| 268 | void ThisIsAutoGenerationProc() const
|
---|
| 269 | {
|
---|
| 270 | isAutoGeneration = true;
|
---|
| 271 | }
|
---|
| 272 | bool IsAutoGeneration() const
|
---|
| 273 | {
|
---|
| 274 | return isAutoGeneration;
|
---|
| 275 | }
|
---|
| 276 | void CompleteCompile() const
|
---|
| 277 | {
|
---|
| 278 | isCompiled = true;
|
---|
| 279 | }
|
---|
| 280 | void KillCompileStatus() const
|
---|
| 281 | {
|
---|
| 282 | isCompiled = false;
|
---|
| 283 | }
|
---|
| 284 | bool IsCompiled() const
|
---|
| 285 | {
|
---|
| 286 | return isCompiled;
|
---|
| 287 | }
|
---|
| 288 | bool IsDestructor() const
|
---|
| 289 | {
|
---|
| 290 | return ( GetName()[0] == '~' );
|
---|
| 291 | }
|
---|
| 292 |
|
---|
| 293 | // バイナリコード位置とサイズ
|
---|
| 294 | DWORD GetBeginOpAddress() const
|
---|
| 295 | {
|
---|
| 296 | return beginOpAddress;
|
---|
| 297 | }
|
---|
| 298 | void SetBeginOpAddress( DWORD beginOpAddress ) const
|
---|
| 299 | {
|
---|
| 300 | this->beginOpAddress = beginOpAddress;
|
---|
| 301 | }
|
---|
| 302 | DWORD GetEndOpAddress() const
|
---|
| 303 | {
|
---|
| 304 | return endOpAddress;
|
---|
| 305 | }
|
---|
| 306 | void SetEndOpAddress( DWORD endOpAddress ) const
|
---|
| 307 | {
|
---|
| 308 | this->endOpAddress = endOpAddress;
|
---|
| 309 | }
|
---|
| 310 | int GetCodeSize() const
|
---|
| 311 | {
|
---|
| 312 | return endOpAddress - beginOpAddress;
|
---|
| 313 | }
|
---|
| 314 |
|
---|
[208] | 315 | virtual const NamespaceScopes &GetNamespaceScopes() const;
|
---|
[206] | 316 | const NamespaceScopesCollection &GetImportedNamespaces() const;
|
---|
| 317 |
|
---|
| 318 | Variables &GetLocalVars() const
|
---|
| 319 | {
|
---|
| 320 | return localVars;
|
---|
| 321 | }
|
---|
| 322 |
|
---|
| 323 | int GetId() const
|
---|
| 324 | {
|
---|
| 325 | return id;
|
---|
| 326 | }
|
---|
| 327 |
|
---|
[257] | 328 | const NativeCode &GetNativeCode() const
|
---|
| 329 | {
|
---|
| 330 | return nativeCode;
|
---|
| 331 | }
|
---|
[225] | 332 | NativeCode &GetNativeCode()
|
---|
| 333 | {
|
---|
| 334 | return nativeCode;
|
---|
| 335 | }
|
---|
| 336 |
|
---|
[206] | 337 | std::string GetFullName() const;
|
---|
[350] | 338 | bool IsCastOperator() const;
|
---|
[206] | 339 |
|
---|
| 340 | bool IsVirtual() const;
|
---|
| 341 |
|
---|
| 342 | void SetParentClass( const CClass *pParentClass ){
|
---|
| 343 | this->pParentClass = pParentClass;
|
---|
| 344 | }
|
---|
| 345 | const CClass *GetParentClassPtr() const
|
---|
| 346 | {
|
---|
| 347 | return pParentClass;
|
---|
| 348 | }
|
---|
| 349 | const CClass &GetParentClass() const
|
---|
| 350 | {
|
---|
| 351 | return *pParentClass;
|
---|
| 352 | }
|
---|
| 353 | bool HasParentClass() const
|
---|
| 354 | {
|
---|
| 355 | return ( pParentClass != NULL );
|
---|
| 356 | }
|
---|
[208] | 357 | bool IsGlobalProcedure() const
|
---|
| 358 | {
|
---|
| 359 | return ( pParentClass == NULL );
|
---|
| 360 | }
|
---|
[353] | 361 | void SetInterface( const Interface *pInterface )
|
---|
| 362 | {
|
---|
| 363 | this->pInterface = pInterface;
|
---|
| 364 | }
|
---|
[206] | 365 | void SetMethod( CMethod *pMethod ){
|
---|
| 366 | this->pMethod = pMethod;
|
---|
| 367 | }
|
---|
[336] | 368 | const CMethod &GetMethod() const;
|
---|
[206] | 369 |
|
---|
| 370 | bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine, bool isStatic );
|
---|
| 371 |
|
---|
| 372 |
|
---|
[364] | 373 | static const UserProc *pGlobalProc;
|
---|
[184] | 374 | };
|
---|
| 375 |
|
---|
[206] | 376 | class UserProcs : public Jenga::Common::Hashmap<UserProc>
|
---|
[184] | 377 | {
|
---|
[206] | 378 | // XMLシリアライズ用
|
---|
| 379 | private:
|
---|
| 380 | friend class boost::serialization::access;
|
---|
| 381 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 382 | {
|
---|
| 383 | trace_for_serialize( "serializing - UserProcs" );
|
---|
| 384 |
|
---|
| 385 | ar & boost::serialization::make_nvp("Hashmap_UserProcImpl",
|
---|
| 386 | boost::serialization::base_object<Jenga::Common::Hashmap<UserProc>>(*this));
|
---|
| 387 | }
|
---|
| 388 |
|
---|
| 389 |
|
---|
[184] | 390 | public:
|
---|
[206] | 391 | UserProcs()
|
---|
[184] | 392 | {
|
---|
| 393 | }
|
---|
[206] | 394 | ~UserProcs()
|
---|
| 395 | {
|
---|
| 396 | }
|
---|
[184] | 397 |
|
---|
[206] | 398 | bool Insert( UserProc *pUserProc, int nowLine );
|
---|
| 399 |
|
---|
| 400 | void EnumGlobalProcs( const char *simpleName, const char *localName, std::vector<const UserProc *> &subs );
|
---|
| 401 | };
|
---|
| 402 |
|
---|
[209] | 403 | class DllProc : public Procedure, public Jenga::Common::ObjectInHashmap<DllProc>
|
---|
[206] | 404 | {
|
---|
[523] | 405 | std::string dllFileName;
|
---|
| 406 | std::string alias;
|
---|
[206] | 407 | int lookupAddress;
|
---|
| 408 |
|
---|
| 409 | // XMLシリアライズ用
|
---|
| 410 | private:
|
---|
| 411 | friend class boost::serialization::access;
|
---|
| 412 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 413 | {
|
---|
| 414 | trace_for_serialize( "serializing - DllProc" );
|
---|
| 415 |
|
---|
| 416 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
|
---|
| 417 | ar & BOOST_SERIALIZATION_NVP( dllFileName );
|
---|
| 418 | ar & BOOST_SERIALIZATION_NVP( alias );
|
---|
| 419 | ar & BOOST_SERIALIZATION_NVP( lookupAddress );
|
---|
| 420 | }
|
---|
| 421 |
|
---|
| 422 | public:
|
---|
[523] | 423 | DllProc( const NamespaceScopes &namespaceScopes, const std::string &name, Kind kind, bool isCdecl, const std::string &dllFileName, const std::string &alias )
|
---|
[210] | 424 | : Procedure( namespaceScopes, name, kind, isCdecl )
|
---|
| 425 | , dllFileName( dllFileName )
|
---|
| 426 | , alias( alias )
|
---|
| 427 | , lookupAddress( 0 )
|
---|
[206] | 428 | {
|
---|
| 429 | }
|
---|
[210] | 430 | DllProc()
|
---|
| 431 | {
|
---|
| 432 | }
|
---|
[209] | 433 | ~DllProc()
|
---|
| 434 | {
|
---|
| 435 | }
|
---|
[206] | 436 |
|
---|
[209] | 437 | virtual const std::string &GetKeyName() const
|
---|
| 438 | {
|
---|
| 439 | return GetName();
|
---|
| 440 | }
|
---|
| 441 |
|
---|
| 442 | virtual bool IsDuplication( const DllProc *pDllProc ) const
|
---|
| 443 | {
|
---|
| 444 | if( pDllProc->IsEqualSymbol( *this )
|
---|
| 445 | && this->Params().Equals( pDllProc->Params() ) )
|
---|
| 446 | {
|
---|
| 447 | return true;
|
---|
| 448 | }
|
---|
| 449 | return false;
|
---|
| 450 | }
|
---|
| 451 |
|
---|
[523] | 452 | const std::string &GetDllFileName() const
|
---|
[206] | 453 | {
|
---|
| 454 | return dllFileName;
|
---|
| 455 | }
|
---|
[523] | 456 | const std::string &GetAlias() const
|
---|
[206] | 457 | {
|
---|
| 458 | return alias;
|
---|
| 459 | }
|
---|
| 460 |
|
---|
| 461 | void SetLookupAddress( int lookupAddress ){
|
---|
| 462 | this->lookupAddress = lookupAddress;
|
---|
| 463 | }
|
---|
| 464 | int GetLookupAddress() const
|
---|
| 465 | {
|
---|
| 466 | return lookupAddress;
|
---|
| 467 | }
|
---|
| 468 |
|
---|
| 469 | bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine );
|
---|
[184] | 470 | };
|
---|
[209] | 471 | class DllProcs : public Jenga::Common::Hashmap<DllProc>
|
---|
| 472 | {
|
---|
| 473 | // XMLシリアライズ用
|
---|
| 474 | private:
|
---|
| 475 | friend class boost::serialization::access;
|
---|
| 476 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 477 | {
|
---|
| 478 | trace_for_serialize( "serializing - DllProcs" );
|
---|
[184] | 479 |
|
---|
[209] | 480 | ar & boost::serialization::make_nvp("Hashmap_DllProc",
|
---|
| 481 | boost::serialization::base_object<Jenga::Common::Hashmap<DllProc>>(*this));
|
---|
| 482 | }
|
---|
| 483 |
|
---|
| 484 | public:
|
---|
| 485 | void Add(const NamespaceScopes &namespaceScopes, char *buffer,int nowLine);
|
---|
| 486 | };
|
---|
| 487 |
|
---|
[206] | 488 | class ProcPointer : public Procedure
|
---|
[184] | 489 | {
|
---|
[206] | 490 | // XMLシリアライズ用
|
---|
| 491 | private:
|
---|
| 492 | friend class boost::serialization::access;
|
---|
| 493 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 494 | {
|
---|
| 495 | trace_for_serialize( "serializing - ProcPointer" );
|
---|
| 496 |
|
---|
| 497 | ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP( Procedure );
|
---|
| 498 | }
|
---|
| 499 |
|
---|
[184] | 500 | public:
|
---|
[206] | 501 | ProcPointer( Kind kind )
|
---|
[208] | 502 | : Procedure( NamespaceScopes(), std::string(), kind, false )
|
---|
[184] | 503 | {
|
---|
| 504 | }
|
---|
[206] | 505 | ProcPointer()
|
---|
| 506 | {
|
---|
| 507 | }
|
---|
| 508 | ~ProcPointer(){}
|
---|
[184] | 509 |
|
---|
| 510 | virtual bool SetParamsAndReturnType( const char *sourceOfParams, int nowLine );
|
---|
| 511 | };
|
---|
| 512 |
|
---|
[523] | 513 | class ProcPointers : public std::vector<ProcPointer *>
|
---|
[184] | 514 | {
|
---|
[206] | 515 | // XMLシリアライズ用
|
---|
| 516 | private:
|
---|
| 517 | friend class boost::serialization::access;
|
---|
| 518 | template<class Archive> void serialize(Archive& ar, const unsigned int version)
|
---|
| 519 | {
|
---|
| 520 | trace_for_serialize( "serializing - ProcPointers" );
|
---|
| 521 |
|
---|
| 522 | ar & boost::serialization::make_nvp("vector_ProcPointer",
|
---|
| 523 | boost::serialization::base_object<vector<ProcPointer *>>(*this));
|
---|
| 524 | }
|
---|
| 525 |
|
---|
[184] | 526 | public:
|
---|
[206] | 527 | ProcPointers()
|
---|
[184] | 528 | {
|
---|
| 529 | }
|
---|
[206] | 530 | ~ProcPointers()
|
---|
[184] | 531 | {
|
---|
| 532 | Clear();
|
---|
| 533 | }
|
---|
| 534 |
|
---|
[523] | 535 | int Add( const std::string &typeExpression );
|
---|
[271] | 536 | void Clear();
|
---|
| 537 | void PullOutAll()
|
---|
| 538 | {
|
---|
| 539 | clear();
|
---|
| 540 | }
|
---|
[184] | 541 | };
|
---|