00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef Reflex_Scope
00013 #define Reflex_Scope
00014
00015
00016 #include "Reflex/Kernel.h"
00017 #include <string>
00018 #include <typeinfo>
00019
00020 namespace Reflex {
00021
00022 class Base;
00023 class Member;
00024 class PropertyList;
00025 class Type;
00026 class ScopeBase;
00027 class ScopeName;
00028 class TypeTemplate;
00029 class MemberTemplate;
00030 class DictionaryGenerator;
00031
00032
00033
00034
00035
00036
00037
00038
00039 class RFLX_API Scope {
00040 public:
00041
00042 Scope(const ScopeName * scopeName = 0);
00043
00044
00045
00046 Scope(const Scope &rh);
00047
00048
00049
00050 ~Scope();
00051
00052
00053
00054
00055
00056 bool operator !=(const Scope& rh) const;
00057
00058
00059
00060
00061
00062
00063 operator bool() const;
00064
00065 #if defined(REFLEX_CINT_MERGE)
00066
00067 bool
00068 operator !() const { return !operator bool(); }
00069
00070 bool
00071 operator &&(bool right) const { return operator bool() && right; }
00072
00073 bool
00074 operator &&(int right) const { return operator bool() && right; }
00075
00076 bool
00077 operator &&(long right) const { return operator bool() && right; }
00078
00079 bool operator &&(const Scope& right) const;
00080 bool operator &&(const Type& right) const;
00081 bool operator &&(const Member& right) const;
00082 bool
00083 operator ||(bool right) const { return operator bool() || right; }
00084
00085 bool
00086 operator ||(int right) const { return operator bool() || right; }
00087
00088 bool
00089 operator ||(long right) const { return operator bool() || right; }
00090
00091 bool operator ||(const Scope& right) const;
00092 bool operator ||(const Type& right) const;
00093 bool operator ||(const Member& right) const;
00094
00095 private:
00096 operator int() const;
00097
00098 public:
00099 #endif
00100
00101
00102
00103
00104
00105
00106 operator Type() const;
00107
00108
00109
00110
00111
00112
00113
00114 Base BaseAt(size_t nth) const;
00115
00116
00117
00118
00119
00120
00121 size_t BaseSize() const;
00122
00123
00124
00125
00126
00127
00128 Base_Iterator Base_Begin() const;
00129
00130
00131
00132
00133
00134
00135 Base_Iterator Base_End() const;
00136
00137
00138
00139
00140
00141
00142 Reverse_Base_Iterator Base_RBegin() const;
00143
00144
00145
00146
00147
00148
00149 Reverse_Base_Iterator Base_REnd() const;
00150
00151
00152
00153
00154
00155
00156
00157 static Scope ByName(const std::string& name);
00158
00159
00160
00161
00162
00163
00164
00165 Member DataMemberAt(size_t nth,
00166 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00167
00168
00169
00170
00171
00172
00173
00174 Member DataMemberByName(const std::string& name,
00175 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00176
00177
00178
00179
00180
00181
00182 size_t DataMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00183
00184
00185
00186
00187
00188
00189 Member_Iterator DataMember_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00190
00191
00192
00193
00194
00195
00196 Member_Iterator DataMember_End(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00197
00198
00199
00200
00201
00202
00203 Reverse_Member_Iterator DataMember_RBegin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00204
00205
00206
00207
00208
00209
00210 Reverse_Member_Iterator DataMember_REnd(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00211
00212
00213
00214
00215
00216
00217 Scope DeclaringScope() const;
00218
00219
00220
00221
00222
00223
00224
00225 Member FunctionMemberAt(size_t nth,
00226 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00227
00228
00229
00230
00231
00232
00233
00234
00235 Member FunctionMemberByName(const std::string& name,
00236 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT,
00237 EDELAYEDLOADSETTING allowDelayedLoad = DELAYEDLOAD_ON) const;
00238
00239
00240
00241
00242
00243
00244
00245
00246
00247
00248
00249 Member FunctionMemberByName(const std::string& name,
00250 const Type& signature,
00251 unsigned int modifers_mask = 0,
00252 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT,
00253 EDELAYEDLOADSETTING allowDelayedLoad = DELAYEDLOAD_ON) const;
00254
00255
00256
00257
00258
00259
00260
00261
00262
00263
00264
00265 Member FunctionMemberByNameAndSignature(const std::string& name,
00266 const Type& signature,
00267 unsigned int modifers_mask = 0,
00268 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT,
00269 EDELAYEDLOADSETTING allowDelayedLoad = DELAYEDLOAD_ON) const;
00270
00271
00272
00273
00274
00275
00276
00277 size_t FunctionMemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00278
00279
00280
00281
00282
00283
00284 Member_Iterator FunctionMember_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00285
00286
00287
00288
00289
00290
00291 Member_Iterator FunctionMember_End(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00292
00293
00294
00295
00296
00297
00298 Reverse_Member_Iterator FunctionMember_RBegin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00299
00300
00301
00302
00303
00304
00305 Reverse_Member_Iterator FunctionMember_REnd(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00306
00307
00308
00309
00310
00311
00312 void GenerateDict(DictionaryGenerator& generator) const;
00313
00314
00315
00316
00317
00318
00319 static Scope GlobalScope();
00320
00321
00322
00323
00324
00325
00326
00327
00328 bool HasBase(const Type& cl) const;
00329
00330
00331
00332
00333
00334
00335 void* Id() const;
00336
00337
00338
00339
00340
00341
00342 bool IsClass() const;
00343
00344
00345
00346
00347
00348
00349 bool IsEnum() const;
00350
00351
00352
00353
00354
00355
00356 bool IsNamespace() const;
00357
00358
00359
00360
00361
00362
00363 bool IsPrivate() const;
00364
00365
00366
00367
00368
00369
00370 bool IsProtected() const;
00371
00372
00373
00374
00375
00376
00377 bool IsPublic() const;
00378
00379
00380
00381
00382
00383
00384 bool IsTemplateInstance() const;
00385
00386
00387
00388
00389
00390
00391 bool IsTopScope() const;
00392
00393
00394
00395
00396
00397
00398 bool IsUnion() const;
00399
00400
00401
00402
00403
00404
00405
00406 Member LookupMember(const std::string& nam) const;
00407
00408
00409
00410
00411
00412
00413
00414 Type LookupType(const std::string& nam) const;
00415
00416
00417
00418
00419
00420
00421
00422 Scope LookupScope(const std::string& nam) const;
00423
00424
00425
00426
00427
00428
00429
00430 Member MemberAt(size_t nth,
00431 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00432
00433
00434
00435
00436
00437
00438
00439 Member MemberByName(const std::string& name,
00440 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00441
00442
00443
00444
00445
00446
00447
00448
00449
00450 Member MemberByName(const std::string& name,
00451 const Type& signature,
00452 EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00453
00454
00455
00456
00457
00458
00459 size_t MemberSize(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00460
00461
00462
00463
00464
00465
00466 Member_Iterator Member_Begin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00467
00468
00469
00470
00471
00472
00473 Member_Iterator Member_End(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00474
00475
00476
00477
00478
00479
00480 Reverse_Member_Iterator Member_RBegin(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00481
00482
00483
00484
00485
00486
00487 Reverse_Member_Iterator Member_REnd(EMEMBERQUERY inh = INHERITEDMEMBERS_DEFAULT) const;
00488
00489
00490
00491
00492
00493
00494
00495 MemberTemplate MemberTemplateAt(size_t nth) const;
00496
00497
00498
00499
00500
00501
00502 size_t MemberTemplateSize() const;
00503
00504
00505
00506
00507
00508
00509
00510
00511 MemberTemplate MemberTemplateByName(const std::string& nam) const;
00512
00513
00514
00515
00516
00517
00518 MemberTemplate_Iterator MemberTemplate_Begin() const;
00519
00520
00521
00522
00523
00524
00525 MemberTemplate_Iterator MemberTemplate_End() const;
00526
00527
00528
00529
00530
00531
00532 Reverse_MemberTemplate_Iterator MemberTemplate_RBegin() const;
00533
00534
00535
00536
00537
00538
00539 Reverse_MemberTemplate_Iterator MemberTemplate_REnd() const;
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550 std::string Name(unsigned int mod = 0) const;
00551
00552
00553
00554
00555
00556
00557 const char* Name_c_str() const;
00558
00559
00560
00561
00562
00563 PropertyList Properties() const;
00564
00565
00566
00567
00568
00569
00570
00571 static Scope ScopeAt(size_t nth);
00572
00573
00574
00575
00576
00577
00578 static size_t ScopeSize();
00579
00580
00581
00582
00583
00584
00585 static Scope_Iterator Scope_Begin();
00586
00587
00588
00589
00590
00591
00592 static Scope_Iterator Scope_End();
00593
00594
00595
00596
00597
00598
00599 static Reverse_Scope_Iterator Scope_RBegin();
00600
00601
00602
00603
00604
00605
00606 static Reverse_Scope_Iterator Scope_REnd();
00607
00608
00609
00610
00611
00612
00613 TYPE ScopeType() const;
00614
00615
00616
00617
00618
00619
00620
00621 std::string ScopeTypeAsString() const;
00622
00623
00624
00625
00626
00627
00628
00629 Scope SubScopeAt(size_t nth) const;
00630
00631
00632
00633
00634
00635
00636
00637 size_t SubScopeLevel() const;
00638
00639
00640
00641
00642
00643
00644 size_t SubScopeSize() const;
00645
00646
00647
00648
00649
00650
00651
00652
00653 Scope SubScopeByName(const std::string& nam) const;
00654
00655
00656
00657
00658
00659
00660 Scope_Iterator SubScope_Begin() const;
00661
00662
00663
00664
00665
00666
00667 Scope_Iterator SubScope_End() const;
00668
00669
00670
00671
00672
00673
00674 Reverse_Scope_Iterator SubScope_RBegin() const;
00675
00676
00677
00678
00679
00680
00681 Reverse_Scope_Iterator SubScope_REnd() const;
00682
00683
00684
00685
00686
00687
00688
00689 Type SubTypeAt(size_t nth) const;
00690
00691
00692
00693
00694
00695
00696 size_t SubTypeSize() const;
00697
00698
00699
00700
00701
00702
00703
00704 Type SubTypeByName(const std::string& nam) const;
00705
00706
00707
00708
00709
00710
00711 Type_Iterator SubType_Begin() const;
00712
00713
00714
00715
00716
00717
00718 Type_Iterator SubType_End() const;
00719
00720
00721
00722
00723
00724
00725 Reverse_Type_Iterator SubType_RBegin() const;
00726
00727
00728
00729
00730
00731
00732 Reverse_Type_Iterator SubType_REnd() const;
00733
00734
00735
00736
00737
00738
00739
00740 TypeTemplate SubTypeTemplateAt(size_t nth) const;
00741
00742
00743
00744
00745
00746
00747 size_t SubTypeTemplateSize() const;
00748
00749
00750
00751
00752
00753
00754
00755
00756 TypeTemplate SubTypeTemplateByName(const std::string& nam) const;
00757
00758
00759
00760
00761
00762
00763 TypeTemplate_Iterator SubTypeTemplate_Begin() const;
00764
00765
00766
00767
00768
00769
00770 TypeTemplate_Iterator SubTypeTemplate_End() const;
00771
00772
00773
00774
00775
00776
00777 Reverse_TypeTemplate_Iterator SubTypeTemplate_RBegin() const;
00778
00779
00780
00781
00782
00783
00784 Reverse_TypeTemplate_Iterator SubTypeTemplate_REnd() const;
00785
00786
00787
00788
00789
00790
00791
00792 Type TemplateArgumentAt(size_t nth) const;
00793
00794
00795
00796
00797
00798
00799 size_t TemplateArgumentSize() const;
00800
00801
00802
00803
00804
00805
00806 Type_Iterator TemplateArgument_Begin() const;
00807
00808
00809
00810
00811
00812
00813 Type_Iterator TemplateArgument_End() const;
00814
00815
00816
00817
00818
00819
00820 Reverse_Type_Iterator TemplateArgument_RBegin() const;
00821
00822
00823
00824
00825
00826
00827 Reverse_Type_Iterator TemplateArgument_REnd() const;
00828
00829
00830
00831
00832
00833
00834 TypeTemplate TemplateFamily() const;
00835
00836
00837
00838
00839
00840 void Unload() const;
00841
00842
00843
00844
00845
00846
00847
00848 void UpdateMembers() const;
00849
00850
00851
00852
00853
00854
00855 Scope UsingDirectiveAt(size_t nth) const;
00856
00857
00858
00859
00860
00861
00862 size_t UsingDirectiveSize() const;
00863
00864
00865 Scope_Iterator UsingDirective_Begin() const;
00866 Scope_Iterator UsingDirective_End() const;
00867 Reverse_Scope_Iterator UsingDirective_RBegin() const;
00868 Reverse_Scope_Iterator UsingDirective_REnd() const;
00869
00870 public:
00871
00872
00873
00874
00875
00876
00877 void AddBase(const Type& bas,
00878 OffsetFunction offsFP,
00879 unsigned int modifiers = 0) const;
00880
00881
00882
00883
00884
00885
00886 void AddBase(const Base& b) const;
00887
00888
00889
00890
00891
00892
00893 void AddDataMember(const Member& dm) const;
00894
00895
00896
00897
00898
00899
00900
00901
00902
00903 Member AddDataMember(const char* name,
00904 const Type& type,
00905 size_t offset,
00906 unsigned int modifiers = 0,
00907 char* interpreterOffset = 0) const;
00908
00909
00910
00911
00912
00913 void AddFunctionMember(const Member& fm) const;
00914
00915
00916
00917
00918
00919
00920
00921
00922
00923
00924
00925 Member AddFunctionMember(const char* name,
00926 const Type& type,
00927 StubFunction stubFP,
00928 void* stubCtx = 0,
00929 const char* params = 0,
00930 unsigned int modifiers = 0) const;
00931
00932
00933
00934
00935
00936
00937 void AddMemberTemplate(const MemberTemplate& mt) const;
00938
00939
00940
00941
00942
00943
00944 void AddSubScope(const Scope& sc) const;
00945
00946
00947
00948
00949
00950
00951
00952 void AddSubScope(const char* scope,
00953 TYPE scopeType = NAMESPACE) const;
00954
00955
00956
00957
00958
00959
00960 void AddSubType(const Type& ty) const;
00961
00962
00963
00964
00965
00966
00967
00968
00969
00970
00971 void AddSubType(const char* type,
00972 size_t size,
00973 TYPE typeType,
00974 const std::type_info& typeInfo,
00975 unsigned int modifiers = 0) const;
00976
00977
00978
00979
00980
00981
00982 void AddSubTypeTemplate(const TypeTemplate& mt) const;
00983
00984
00985
00986
00987
00988
00989 void AddUsingDirective(const Scope& ud) const;
00990
00991
00992
00993
00994
00995
00996 void RemoveDataMember(const Member& dm) const;
00997
00998
00999
01000
01001
01002
01003 void RemoveFunctionMember(const Member& fm) const;
01004
01005
01006
01007
01008
01009
01010 void RemoveMemberTemplate(const MemberTemplate& mt) const;
01011
01012
01013
01014
01015
01016
01017 void RemoveSubScope(const Scope& sc) const;
01018
01019
01020
01021
01022
01023
01024 void RemoveSubType(const Type& ty) const;
01025
01026
01027
01028
01029
01030
01031 void RemoveSubTypeTemplate(const TypeTemplate& tt) const;
01032
01033
01034
01035
01036
01037
01038 void RemoveUsingDirective(const Scope& ud) const;
01039
01040
01041
01042 const ScopeBase* ToScopeBase() const;
01043
01044 public:
01045
01046
01047
01048
01049 static Scope& __NIRVANA__();
01050
01051 private:
01052
01053
01054
01055
01056
01057
01058
01059 const ScopeName* fScopeName;
01060
01061 };
01062
01063 bool operator <(const Scope& lh,
01064 const Scope& rh);
01065
01066 bool operator ==(const Scope& lh,
01067 const Scope& rh);
01068
01069 }
01070
01071 #include "Reflex/internal/ScopeBase.h"
01072 #include "Reflex/internal/ScopeName.h"
01073 #include "Reflex/PropertyList.h"
01074
01075
01076
01077 inline bool
01078 Reflex::Scope::operator !=(const Scope& rh) const {
01079
01080 return fScopeName != rh.fScopeName;
01081 }
01082
01083
01084
01085 inline bool
01086 Reflex::operator <(const Scope& lh,
01087 const Scope& rh) {
01088
01089 return const_cast<Scope*>(&lh)->Id() < const_cast<Scope*>(&rh)->Id();
01090 }
01091
01092
01093
01094 inline bool
01095 Reflex::operator ==(const Scope& lh,
01096 const Scope& rh) {
01097
01098 return const_cast<Scope*>(&lh)->Id() == const_cast<Scope*>(&rh)->Id();
01099 }
01100
01101
01102
01103 inline Reflex::Scope::Scope(const ScopeName* scopeName)
01104
01105 : fScopeName(scopeName) {
01106 }
01107
01108
01109
01110 inline Reflex::Scope::Scope(const Scope& rh)
01111
01112 : fScopeName(rh.fScopeName) {
01113 }
01114
01115
01116
01117 inline Reflex::Scope::~Scope() {
01118
01119 }
01120
01121
01122
01123 inline
01124 Reflex::Scope::operator bool() const {
01125
01126 if (this->fScopeName && this->fScopeName->fScopeBase) {
01127 return true;
01128 }
01129
01130 return false;
01131 }
01132
01133
01134
01135 inline Reflex::Base_Iterator
01136 Reflex::Scope::Base_Begin() const {
01137
01138 if (*this) {
01139 return fScopeName->fScopeBase->Base_Begin();
01140 }
01141 return Dummy::BaseCont().begin();
01142 }
01143
01144
01145
01146 inline Reflex::Base_Iterator
01147 Reflex::Scope::Base_End() const {
01148
01149 if (*this) {
01150 return fScopeName->fScopeBase->Base_End();
01151 }
01152 return Dummy::BaseCont().end();
01153 }
01154
01155
01156
01157 inline Reflex::Reverse_Base_Iterator
01158 Reflex::Scope::Base_RBegin() const {
01159
01160 if (*this) {
01161 return fScopeName->fScopeBase->Base_RBegin();
01162 }
01163 return Dummy::BaseCont().rbegin();
01164 }
01165
01166
01167
01168 inline Reflex::Reverse_Base_Iterator
01169 Reflex::Scope::Base_REnd() const {
01170
01171 if (*this) {
01172 return fScopeName->fScopeBase->Base_REnd();
01173 }
01174 return Dummy::BaseCont().rend();
01175 }
01176
01177
01178
01179 inline Reflex::Member_Iterator
01180 Reflex::Scope::DataMember_Begin(EMEMBERQUERY inh) const {
01181
01182 if (*this) {
01183 return fScopeName->fScopeBase->DataMember_Begin(inh);
01184 }
01185 return Dummy::MemberCont().begin();
01186 }
01187
01188
01189
01190 inline Reflex::Member_Iterator
01191 Reflex::Scope::DataMember_End(EMEMBERQUERY inh) const {
01192
01193 if (*this) {
01194 return fScopeName->fScopeBase->DataMember_End(inh);
01195 }
01196 return Dummy::MemberCont().end();
01197 }
01198
01199
01200
01201 inline Reflex::Reverse_Member_Iterator
01202 Reflex::Scope::DataMember_RBegin(EMEMBERQUERY inh) const {
01203
01204 if (*this) {
01205 return fScopeName->fScopeBase->DataMember_RBegin(inh);
01206 }
01207 return Dummy::MemberCont().rbegin();
01208 }
01209
01210
01211
01212 inline Reflex::Reverse_Member_Iterator
01213 Reflex::Scope::DataMember_REnd(EMEMBERQUERY inh) const {
01214
01215 if (*this) {
01216 return fScopeName->fScopeBase->DataMember_REnd(inh);
01217 }
01218 return Dummy::MemberCont().rend();
01219 }
01220
01221
01222
01223 inline Reflex::Scope
01224 Reflex::Scope::DeclaringScope() const {
01225
01226 if (*this) {
01227 return fScopeName->fScopeBase->DeclaringScope();
01228 }
01229 return Dummy::Scope();
01230 }
01231
01232
01233
01234 inline Reflex::Member_Iterator
01235 Reflex::Scope::FunctionMember_Begin(EMEMBERQUERY inh) const {
01236
01237 if (*this) {
01238 return fScopeName->fScopeBase->FunctionMember_Begin(inh);
01239 }
01240 return Dummy::MemberCont().begin();
01241 }
01242
01243
01244
01245 inline Reflex::Member_Iterator
01246 Reflex::Scope::FunctionMember_End(EMEMBERQUERY inh) const {
01247
01248 if (*this) {
01249 return fScopeName->fScopeBase->FunctionMember_End(inh);
01250 }
01251 return Dummy::MemberCont().end();
01252 }
01253
01254
01255
01256 inline Reflex::Reverse_Member_Iterator
01257 Reflex::Scope::FunctionMember_RBegin(EMEMBERQUERY inh) const {
01258
01259 if (*this) {
01260 return fScopeName->fScopeBase->FunctionMember_RBegin(inh);
01261 }
01262 return Dummy::MemberCont().rbegin();
01263 }
01264
01265
01266
01267 inline Reflex::Reverse_Member_Iterator
01268 Reflex::Scope::FunctionMember_REnd(EMEMBERQUERY inh) const {
01269
01270 if (*this) {
01271 return fScopeName->fScopeBase->FunctionMember_REnd(inh);
01272 }
01273 return Dummy::MemberCont().rend();
01274 }
01275
01276
01277
01278 inline Reflex::Scope
01279 Reflex::Scope::GlobalScope() {
01280
01281 return ScopeBase::GlobalScope();
01282 }
01283
01284
01285
01286 inline void*
01287 Reflex::Scope::Id() const {
01288
01289 return (void*) fScopeName;
01290 }
01291
01292
01293
01294 inline bool
01295 Reflex::Scope::IsClass() const {
01296
01297 if (*this) {
01298 return fScopeName->fScopeBase->IsClass();
01299 }
01300 return false;
01301 }
01302
01303
01304
01305 inline bool
01306 Reflex::Scope::IsEnum() const {
01307
01308 if (*this) {
01309 return fScopeName->fScopeBase->IsEnum();
01310 }
01311 return false;
01312 }
01313
01314
01315
01316 inline bool
01317 Reflex::Scope::IsNamespace() const {
01318
01319 if (*this) {
01320 return fScopeName->fScopeBase->IsNamespace();
01321 }
01322 return false;
01323 }
01324
01325
01326
01327 inline bool
01328 Reflex::Scope::IsTemplateInstance() const {
01329
01330 if (*this) {
01331 return fScopeName->fScopeBase->IsTemplateInstance();
01332 }
01333 return false;
01334 }
01335
01336
01337
01338 inline bool
01339 Reflex::Scope::IsTopScope() const {
01340
01341 if (*this) {
01342 return fScopeName->fScopeBase->IsTopScope();
01343 }
01344 return false;
01345 }
01346
01347
01348
01349 inline bool
01350 Reflex::Scope::IsUnion() const {
01351
01352 if (*this) {
01353 return fScopeName->fScopeBase->IsUnion();
01354 }
01355 return false;
01356 }
01357
01358
01359
01360 inline size_t
01361 Reflex::Scope::MemberSize(EMEMBERQUERY inh) const {
01362
01363 if (*this) {
01364 return fScopeName->fScopeBase->MemberSize(inh);
01365 }
01366 return 0;
01367 }
01368
01369
01370
01371 inline Reflex::MemberTemplate_Iterator
01372 Reflex::Scope::MemberTemplate_Begin() const {
01373
01374 if (*this) {
01375 return fScopeName->fScopeBase->MemberTemplate_Begin();
01376 }
01377 return Dummy::MemberTemplateCont().begin();
01378 }
01379
01380
01381
01382 inline Reflex::MemberTemplate_Iterator
01383 Reflex::Scope::MemberTemplate_End() const {
01384
01385 if (*this) {
01386 return fScopeName->fScopeBase->MemberTemplate_End();
01387 }
01388 return Dummy::MemberTemplateCont().end();
01389 }
01390
01391
01392
01393 inline Reflex::Reverse_MemberTemplate_Iterator
01394 Reflex::Scope::MemberTemplate_RBegin() const {
01395
01396 if (*this) {
01397 return fScopeName->fScopeBase->MemberTemplate_RBegin();
01398 }
01399 return Dummy::MemberTemplateCont().rbegin();
01400 }
01401
01402
01403
01404 inline Reflex::Reverse_MemberTemplate_Iterator
01405 Reflex::Scope::MemberTemplate_REnd() const {
01406
01407 if (*this) {
01408 return fScopeName->fScopeBase->MemberTemplate_REnd();
01409 }
01410 return Dummy::MemberTemplateCont().rend();
01411 }
01412
01413
01414
01415 inline const char*
01416 Reflex::Scope::Name_c_str() const {
01417
01418 if (fScopeName) {
01419 return fScopeName->Name();
01420 }
01421 return "";
01422 }
01423
01424
01425
01426 inline Reflex::PropertyList
01427 Reflex::Scope::Properties() const {
01428
01429 if (*this) {
01430 return fScopeName->fScopeBase->Properties();
01431 }
01432 return Dummy::PropertyList();
01433 }
01434
01435
01436
01437 inline Reflex::TYPE
01438 Reflex::Scope::ScopeType() const {
01439
01440 if (*this) {
01441 return fScopeName->fScopeBase->ScopeType();
01442 }
01443 return UNRESOLVED;
01444 }
01445
01446
01447
01448 inline std::string
01449 Reflex::Scope::ScopeTypeAsString() const {
01450
01451 if (*this) {
01452 return fScopeName->fScopeBase->ScopeTypeAsString();
01453 }
01454 return "UNRESOLVED";
01455 }
01456
01457
01458
01459 inline Reflex::Scope_Iterator
01460 Reflex::Scope::Scope_Begin() {
01461
01462 return ScopeName::Scope_Begin();
01463 }
01464
01465
01466
01467 inline Reflex::Scope_Iterator
01468 Reflex::Scope::Scope_End() {
01469
01470 return ScopeName::Scope_End();
01471 }
01472
01473
01474
01475 inline Reflex::Reverse_Scope_Iterator
01476 Reflex::Scope::Scope_RBegin() {
01477
01478 return ScopeName::Scope_RBegin();
01479 }
01480
01481
01482
01483 inline Reflex::Reverse_Scope_Iterator
01484 Reflex::Scope::Scope_REnd() {
01485
01486 return ScopeName::Scope_REnd();
01487 }
01488
01489
01490
01491 inline Reflex::Scope
01492 Reflex::Scope::SubScopeAt(size_t nth) const {
01493
01494 if (*this) {
01495 return fScopeName->fScopeBase->SubScopeAt(nth);
01496 }
01497 return Dummy::Scope();
01498 }
01499
01500
01501
01502 inline size_t
01503 Reflex::Scope::SubScopeLevel() const {
01504
01505 if (*this) {
01506 return fScopeName->fScopeBase->SubScopeLevel();
01507 }
01508 return 0;
01509 }
01510
01511
01512
01513 inline size_t
01514 Reflex::Scope::SubScopeSize() const {
01515
01516 if (*this) {
01517 return fScopeName->fScopeBase->SubScopeSize();
01518 }
01519 return 0;
01520 }
01521
01522
01523
01524 inline Reflex::Scope
01525 Reflex::Scope::SubScopeByName(const std::string& nam) const {
01526
01527 if (*this) {
01528 return fScopeName->fScopeBase->SubScopeByName(nam);
01529 }
01530 return Dummy::Scope();
01531 }
01532
01533
01534
01535 inline Reflex::Scope_Iterator
01536 Reflex::Scope::SubScope_Begin() const {
01537
01538 if (*this) {
01539 return fScopeName->fScopeBase->SubScope_Begin();
01540 }
01541 return Dummy::ScopeCont().begin();
01542 }
01543
01544
01545
01546 inline Reflex::Scope_Iterator
01547 Reflex::Scope::SubScope_End() const {
01548
01549 if (*this) {
01550 return fScopeName->fScopeBase->SubScope_End();
01551 }
01552 return Dummy::ScopeCont().end();
01553 }
01554
01555
01556
01557 inline Reflex::Reverse_Scope_Iterator
01558 Reflex::Scope::SubScope_RBegin() const {
01559
01560 if (*this) {
01561 return fScopeName->fScopeBase->SubScope_RBegin();
01562 }
01563 return Dummy::ScopeCont().rbegin();
01564 }
01565
01566
01567
01568 inline Reflex::Reverse_Scope_Iterator
01569 Reflex::Scope::SubScope_REnd() const {
01570
01571 if (*this) {
01572 return fScopeName->fScopeBase->SubScope_REnd();
01573 }
01574 return Dummy::ScopeCont().rend();
01575 }
01576
01577
01578
01579 inline Reflex::Type_Iterator
01580 Reflex::Scope::SubType_Begin() const {
01581
01582 if (*this) {
01583 return fScopeName->fScopeBase->SubType_Begin();
01584 }
01585 return Dummy::TypeCont().begin();
01586 }
01587
01588
01589
01590 inline Reflex::Type_Iterator
01591 Reflex::Scope::SubType_End() const {
01592
01593 if (*this) {
01594 return fScopeName->fScopeBase->SubType_End();
01595 }
01596 return Dummy::TypeCont().end();
01597 }
01598
01599
01600
01601 inline Reflex::Reverse_Type_Iterator
01602 Reflex::Scope::SubType_RBegin() const {
01603
01604 if (*this) {
01605 return fScopeName->fScopeBase->SubType_RBegin();
01606 }
01607 return Dummy::TypeCont().rbegin();
01608 }
01609
01610
01611
01612 inline Reflex::Reverse_Type_Iterator
01613 Reflex::Scope::SubType_REnd() const {
01614
01615 if (*this) {
01616 return fScopeName->fScopeBase->SubType_REnd();
01617 }
01618 return Dummy::TypeCont().rend();
01619 }
01620
01621
01622
01623 inline const Reflex::ScopeBase*
01624 Reflex::Scope::ToScopeBase() const {
01625
01626 if (*this) {
01627 return fScopeName->fScopeBase;
01628 }
01629 return 0;
01630 }
01631
01632
01633
01634 inline Reflex::TypeTemplate_Iterator
01635 Reflex::Scope::SubTypeTemplate_Begin() const {
01636
01637 if (*this) {
01638 return fScopeName->fScopeBase->SubTypeTemplate_Begin();
01639 }
01640 return Dummy::TypeTemplateCont().begin();
01641 }
01642
01643
01644
01645 inline Reflex::TypeTemplate_Iterator
01646 Reflex::Scope::SubTypeTemplate_End() const {
01647
01648 if (*this) {
01649 return fScopeName->fScopeBase->SubTypeTemplate_End();
01650 }
01651 return Dummy::TypeTemplateCont().end();
01652 }
01653
01654
01655
01656 inline Reflex::Reverse_TypeTemplate_Iterator
01657 Reflex::Scope::SubTypeTemplate_RBegin() const {
01658
01659 if (*this) {
01660 return fScopeName->fScopeBase->SubTypeTemplate_RBegin();
01661 }
01662 return Dummy::TypeTemplateCont().rbegin();
01663 }
01664
01665
01666
01667 inline Reflex::Reverse_TypeTemplate_Iterator
01668 Reflex::Scope::SubTypeTemplate_REnd() const {
01669
01670 if (*this) {
01671 return fScopeName->fScopeBase->SubTypeTemplate_REnd();
01672 }
01673 return Dummy::TypeTemplateCont().rend();
01674 }
01675
01676
01677
01678 inline Reflex::Scope
01679 Reflex::Scope::UsingDirectiveAt(size_t nth) const {
01680
01681 if (*this) {
01682 return fScopeName->fScopeBase->UsingDirectiveAt(nth);
01683 }
01684 return Dummy::Scope();
01685 }
01686
01687
01688
01689 inline size_t
01690 Reflex::Scope::UsingDirectiveSize() const {
01691
01692 if (*this) {
01693 return fScopeName->fScopeBase->UsingDirectiveSize();
01694 }
01695 return 0;
01696 }
01697
01698
01699
01700 inline Reflex::Scope_Iterator
01701 Reflex::Scope::UsingDirective_Begin() const {
01702
01703 if (*this) {
01704 return fScopeName->fScopeBase->UsingDirective_Begin();
01705 }
01706 return Dummy::ScopeCont().begin();
01707 }
01708
01709
01710
01711 inline Reflex::Scope_Iterator
01712 Reflex::Scope::UsingDirective_End() const {
01713
01714 if (*this) {
01715 return fScopeName->fScopeBase->UsingDirective_End();
01716 }
01717 return Dummy::ScopeCont().end();
01718 }
01719
01720
01721
01722 inline Reflex::Reverse_Scope_Iterator
01723 Reflex::Scope::UsingDirective_RBegin() const {
01724
01725 if (*this) {
01726 return fScopeName->fScopeBase->UsingDirective_RBegin();
01727 }
01728 return Dummy::ScopeCont().rbegin();
01729 }
01730
01731
01732
01733 inline Reflex::Reverse_Scope_Iterator
01734 Reflex::Scope::UsingDirective_REnd() const {
01735
01736 if (*this) {
01737 return fScopeName->fScopeBase->UsingDirective_REnd();
01738 }
01739 return Dummy::ScopeCont().rend();
01740 }
01741
01742
01743
01744 inline void
01745 Reflex::Scope::AddBase(const Type& bas,
01746 OffsetFunction offsFP,
01747 unsigned int modifiers ) const {
01748
01749 if (*this) {
01750 fScopeName->fScopeBase->AddBase(bas, offsFP, modifiers);
01751 }
01752 }
01753
01754
01755
01756 inline void
01757 Reflex::Scope::AddBase(const Base& b) const {
01758
01759 if (*this) {
01760 fScopeName->fScopeBase->AddBase(b);
01761 }
01762 }
01763
01764
01765
01766 inline void
01767 Reflex::Scope::AddSubScope(const Scope& sc) const {
01768
01769 if (*this) {
01770 fScopeName->fScopeBase->AddSubScope(sc);
01771 }
01772 }
01773
01774
01775
01776 inline void
01777 Reflex::Scope::AddSubScope(const char* scope,
01778 TYPE scopeType) const {
01779
01780 if (*this) {
01781 fScopeName->fScopeBase->AddSubScope(scope, scopeType);
01782 }
01783 }
01784
01785
01786
01787 inline void
01788 Reflex::Scope::RemoveSubScope(const Scope& sc) const {
01789
01790 if (*this) {
01791 fScopeName->fScopeBase->RemoveSubScope(sc);
01792 }
01793 }
01794
01795
01796
01797 inline void
01798 Reflex::Scope::AddUsingDirective(const Scope& ud) const {
01799
01800 if (*this) {
01801 fScopeName->fScopeBase->AddUsingDirective(ud);
01802 }
01803 }
01804
01805
01806
01807 inline void
01808 Reflex::Scope::RemoveUsingDirective(const Scope& ud) const {
01809
01810 if (*this) {
01811 fScopeName->fScopeBase->RemoveUsingDirective(ud);
01812 }
01813 }
01814
01815
01816 #ifdef REFLEX_CINT_MERGE
01817 inline bool
01818 operator &&(bool b,
01819 const Reflex::Scope& rh) {
01820 return b && rh.operator bool();
01821 }
01822
01823
01824 inline bool
01825 operator &&(int i,
01826 const Reflex::Scope& rh) {
01827 return i && rh.operator bool();
01828 }
01829
01830
01831 inline bool
01832 operator ||(bool b,
01833 const Reflex::Scope& rh) {
01834 return b || rh.operator bool();
01835 }
01836
01837
01838 inline bool
01839 operator ||(int i,
01840 const Reflex::Scope& rh) {
01841 return i || rh.operator bool();
01842 }
01843
01844
01845 inline bool
01846 operator &&(char* c,
01847 const Reflex::Scope& rh) {
01848 return c && rh.operator bool();
01849 }
01850
01851
01852 inline bool
01853 operator ||(char* c,
01854 const Reflex::Scope& rh) {
01855 return c || rh.operator bool();
01856 }
01857
01858 #endif
01859
01860 #endif // Reflex_Scope