#include "ZQueen.h"

ZQueen


class description - source file - inheritance tree (.ps)

class ZQueen : public ZNameMap, public An_ID_Demangler

Inheritance Chart:
TObject
<-
ZGlass
<-
ZList
ZGlass::YNameChangeCB
<-
ZNameMap
An_ID_Demangler
<-
ZQueen
<-
ZFireQueen
ZSunQueen
    private:
void _init() protected:
void add_reflector(SaturnInfo* moon) ID_t assign_id(ZGlass* lens) virtual void bootstrap() virtual void embrace_of_life(ZComet& comet) bool has_free_ids(ID_t n_needed) virtual ZGlass* instantiate(LID_t lid, CID_t cid, const Text_t* name = "0", const Text_t* title = "0") ID_t next_free_id(ZQueen::QueenIDMap_i i) virtual ZQueen::LensDetails* produce_lens_details(ID_t id, ZGlass* lens) void release_moon_purgatory(ID_t n_to_release) void release_purgatory(ID_t n_needed) void remove_reflector(SaturnInfo* moon) public:
static void _gled_catalog_init() ZQueen(const Text_t* n = "ZQueen", const Text_t* t = "0") ZQueen(ID_t span, const Text_t* n = "ZQueen", const Text_t* t = "0") ZQueen(const ZQueen&) ~ZQueen() void AddDependency(ZQueen* new_dep) void Adopt(ZComet* comet) void BasicQueenChange(ZMIR& mir) virtual void BlessMIR(ZMIR& mir) void BroadcastMIRToNonRulingReflections(ZMIR& mir) ID_t CheckIn(ZGlass* lens) static TClass* Class() static CID_t ClassID() void CleanOrphanage() virtual void CopyLinkRefs(lppZGlass_t& ref_list) virtual void CopyLinks(lpZGlass_t& glass_list) virtual void CopyLinkSpecs(lLinkSpec_t& link_spec_list) virtual void CreateReflection(TBuffer& buf) virtual ZGlass* DemangleID(ID_t id) virtual void DepCheckMIR(ZMIR& mir) Bool_t DependsOn(ZQueen* some_queen) void EmitRay(Ray& ray, bool force = false) void ExecuteMir(ZMIR& mir) static FID_t FID() UChar_t GetAlignment() const UChar_t GetAuthMode() const UShort_t GetAvgPurgLen() const Bool_t GetAwaitingSceptre() const UInt_t GetDeletedMS() const ZHashList* GetDeps() const Bool_t GetFollowDeps() const ID_t GetIDsFree() const ID_t GetIDSpan() const ID_t GetIDsPurged() const ID_t GetIDsUsed() const ZKing* GetKing() const Bool_t GetMandatory() const UChar_t GetMapNoneTo() const ID_t GetMaxID() const ID_t GetMinID() const ZHashList* GetOrphans() const ZMirFilter* GetProtector() const UInt_t GetPurgedMS() const Bool_t GetRuling() const Float_t GetSgmPurgLen() const Bool_t GetStamping() const ZQueen::QueenState_e GetState() const ZQueen::ZeroRCPolicy_e GetZeroRCPolicy() const ID_t IncarnateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid) ID_t InstantiateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid, LID_t new_lid, CID_t new_cid, const Text_t* name = "0", const Text_t* title = "0") virtual void InvokeReflection(TBuffer& buf) virtual TClass* IsA() const static LID_t LibID() void ListAll() ZComet* MakeComet() static MID_t Mid_AddDependency() static MID_t Mid_CleanOrphanage() static MID_t Mid_IncarnateWAttach() static MID_t Mid_instantiate() static MID_t Mid_InstantiateWAttach() static MID_t Mid_ListAll() static MID_t Mid_PutLensToPurgatory() static MID_t Mid_PutLensToVoid() static MID_t Mid_release_moon_purgatory() static MID_t Mid_RemoveLens() static MID_t Mid_SetAlignment() static MID_t Mid_SetAuthMode() static MID_t Mid_SetAvgPurgLen() static MID_t Mid_SetAwaitingSceptre() static MID_t Mid_SetDeletedMS() static MID_t Mid_SetDeps() static MID_t Mid_SetFollowDeps() static MID_t Mid_SetMandatory() static MID_t Mid_SetMapNoneTo() static MID_t Mid_SetOrphans() static MID_t Mid_SetProtector() static MID_t Mid_SetPurgedMS() static MID_t Mid_SetRuling() static MID_t Mid_SetSgmPurgLen() static MID_t Mid_SetStamping() static MID_t Mid_SetState() static MID_t Mid_SetZeroRCPolicy() ZQueen& operator=(const ZQueen&) void PutLensToPurgatory(ZGlass* lens) void PutLensToVoid(ID_t lens_id) virtual Int_t RebuildLinks(An_ID_Demangler* c) void RemoveLens(ZGlass* lens) virtual void RevokeReflection() ZMIR* S_AddDependency(ZQueen* new_dep) ZMIR* S_CleanOrphanage() ZMIR* S_IncarnateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid) virtual ZMIR* S_instantiate(LID_t lid, CID_t cid, const Text_t* name = "0", const Text_t* title = "0") ZMIR* S_InstantiateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid, LID_t new_lid, CID_t new_cid, const Text_t* name = "0", const Text_t* title = "0") ZMIR* S_ListAll() ZMIR* S_PutLensToPurgatory(ZGlass* lens) ZMIR* S_PutLensToVoid(ID_t lens_id) ZMIR* S_release_moon_purgatory(ID_t n_to_release) ZMIR* S_RemoveLens(ZGlass* lens) ZMIR* S_SetAlignment(UChar_t alignment) ZMIR* S_SetAuthMode(UChar_t authmode) ZMIR* S_SetAvgPurgLen(UShort_t avgpurglen) ZMIR* S_SetAwaitingSceptre(Bool_t awaitingsceptre) ZMIR* S_SetDeletedMS(UInt_t deletedms) ZMIR* S_SetDeps(ZHashList* deps) ZMIR* S_SetFollowDeps(Bool_t followdeps) ZMIR* S_SetMandatory(Bool_t mandatory) ZMIR* S_SetMapNoneTo(UChar_t mapnoneto) ZMIR* S_SetOrphans(ZHashList* orphans) ZMIR* S_SetProtector(ZMirFilter* protector) ZMIR* S_SetPurgedMS(UInt_t purgedms) ZMIR* S_SetRuling(Bool_t ruling) ZMIR* S_SetSgmPurgLen(Float_t sgmpurglen) ZMIR* S_SetStamping(Bool_t stamping) ZMIR* S_SetState(ZQueen::QueenState_e state) ZMIR* S_SetZeroRCPolicy(ZQueen::ZeroRCPolicy_e zerorcpolicy) void SetAlignment(UChar_t alignment) void SetAuthMode(UChar_t authmode) void SetAvgPurgLen(UShort_t avgpurglen) void SetAwaitingSceptre(Bool_t awaitingsceptre) void SetDeletedMS(UInt_t deletedms) void SetDeps(ZHashList* deps) void SetFollowDeps(Bool_t followdeps) void SetMandatory(Bool_t mandatory) void SetMapNoneTo(UChar_t mapnoneto) void SetOrphans(ZHashList* orphans) void SetProtector(ZMirFilter* protector) void SetPurgedMS(UInt_t purgedms) void SetRuling(Bool_t ruling) void SetSgmPurgLen(Float_t sgmpurglen) void SetStamping(Bool_t stamping) void SetState(ZQueen::QueenState_e state) void SetZeroRCPolicy(ZQueen::ZeroRCPolicy_e zerorcpolicy) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) void SubjectRefCntLock() void SubjectRefCntUnlock() void SubjectWriteLock() void SubjectWriteUnlock() virtual void UnfoldFrom(ZComet& comet) void ZeroRefCount(ZGlass* lens) virtual LID_t ZibID() const virtual const char* ZibName() const virtual FID_t ZID() const virtual CID_t ZlassID() const virtual const char* ZlassName() const

Data Members


    protected:
ZKing* mKing ! X{G} Bool_t bMandatory X{GS} 7 Bool(-join=>1) Bool_t bFollowDeps X{GS} 7 Bool() Used by fire-space queens Bool_t bRuling ! X{GS} 7 BoolOut(-join=>1) Bool_t bAwaitingSceptre ! X{GS} 7 BoolOut() ZQueen::QueenState_e mState ! X{GS} 7 PhonyEnum(-const=>1) ID_t mMinID X{G} 7 ValOut(-range=>[0,MAX_ID], -width=>8, -join=>1) ID_t mMaxID X{G} 7 ValOut(-range=>[0,MAX_ID], -width=>8) ID_t mIDSpan X{G} 7 ValOut(-join=>1) ID_t mIDsUsed X{G} 7 ValOut() ID_t mIDsPurged X{G} 7 ValOut(-join=>1) ID_t mIDsFree X{G} 7 ValOut() map<unsigned int,ZQueen::LensDetails*,less<unsigned int>,allocator<pair<const unsigned int,ZQueen::LensDetails*> > > mIDMap ! ID_t mCreationID Creation point ID list<unsigned int,allocator<unsigned int> > mPurgatory List of released but still reserved ids UShort_t mAvgPurgLen X{GS} 7 Value(-range=>[1,65000,1], -width=>5, -join=>1) Float_t mSgmPurgLen X{GS} 7 Value(-range=>[0,1,1,100], -width=>5) UInt_t mPurgedMS X{GS} 7 Value(-range=>[100,1e6,10], -width=>7, -join=>1) UInt_t mDeletedMS X{GS} 7 Value(-range=>[100,1e6,10], -width=>7) ZQueen::ZeroRCPolicy_e mZeroRCPolicy X{GS} 7 PhonyEnum() Bool_t bStamping X{GS} 7 Bool() UChar_t mAuthMode X{GS} 7 PhonyEnum(-type=>AuthMode_e, -width=>10) UChar_t mAlignment X{GS} 7 PhonyEnum(-type=>Align_e, -width=>6) UChar_t mMapNoneTo X{GS} 7 PhonyEnum(-type=>ZMirFilter::Result_e, ZMirFilter* mProtector X{GS} L{} ZHashList* mDeps X{GS} L{} ZHashList* mOrphans X{GS} L{} lpSaturnInfo_t mReflectors ! GMutex mSubjectWriteMutex ! GMutex mSubjectRefCntMutex ! public:
static const ZQueen::AuthMode_e AM_None static const ZQueen::AuthMode_e AM_Queen static const ZQueen::AuthMode_e AM_Lens static const ZQueen::AuthMode_e AM_QueenThenLens static const ZQueen::AuthMode_e AM_LensThenQueen static const ZQueen::Align_e A_Good static const ZQueen::Align_e A_Evil static const ZQueen::QueenState_e QS_Sleeping static const ZQueen::QueenState_e QS_Awakening static const ZQueen::QueenState_e QS_Dreaming static const ZQueen::QueenState_e QS_Nightmare static const ZQueen::QueenState_e QS_AwaitingSceptre static const ZQueen::QueenState_e QS_Ruling static const ZQueen::QueenState_e QS_RelinquishingSceptre static const ZQueen::ZeroRCPolicy_e ZRCP_Delete static const ZQueen::ZeroRCPolicy_e ZRCP_ToOrphanage

Class Description

 ZQueen

 A Queen controls its portion of the ID space.
 Glasses are adopted/instantiated and enlightened by it.
 Queens (like Kings) are exported to all Moons but are not
 necesarily activated immediately (controled by bMandatory).
 Queen's status is given by bRuling.

 Although queens are always at least partially exposed, MIRs with
 alpa=queen are *not* broadcasted to all Moons by the Saturn's mir
 processing code. Exported methods that should be called also at
 inactive queens must be pushed there by hand. This service is
 offered by the BroadcastMIRToNonRulingReflections() method. For
 example see ZQueen::AddDependency.

________________________________________________________________________

void _init()

void bootstrap()
 Initializes a new queen and creates mandatory lists.
 Called from ZKing.
 Not applicable for activation or instantiation of not Ruling Queens.

void embrace_of_life(ZComet& comet)
 Initializes *this* queen with unstreamed queen.
 Copies Links and List contents, no ref-counting is performed.

bool has_free_ids(ID_t n_needed)

ID_t next_free_id(QueenIDMap_i i)

ID_t assign_id(ZGlass* lens)
 Assigns an ID to lens.

void release_purgatory(ID_t n_needed)

void release_moon_purgatory(ID_t n_to_release)

ZGlass* DemangleID(ID_t id)
 This should serve to properly demangle external references for comets.
 And check that the id is within the queen's dependencies.

ID_t CheckIn(ZGlass* lens)

void DepCheckMIR(ZMIR& mir)
 Allow beta/gamma from queens that *this* depends on + queen
 arguments if alpha is *this*.

void BlessMIR(ZMIR& mir)
 should check that the mir is valid and within deps.
 If whorequeen should accept new ones and append them.
 If light-queen with FollowDeps should append with broadcast
 PRIOR to returning from this method.
 Called from Saturn::Unfold() prior to locking and execution.
 Errors/non-conformance should be reported by throwing an exception.

 Oh yess ... btw ... queens can as well block all execs to their
 subjects. Eg, when bMIRActive of alpha is false.
 Per queen access control can be implemented here.

void AddDependency(ZQueen* new_dep)

Bool_t DependsOn(ZQueen* some_queen)
 Returns true if *this* depends on some_queen, i.e. if my lenses
 can reference lenses ruled by some_queen.

ZGlass* instantiate(LID_t lid, CID_t cid, const Text_t* name, const Text_t* title)

ID_t InstantiateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid, LID_t new_lid, CID_t new_cid, const Text_t* name, const Text_t* title)
 Instantiates a glass of FID(lid, cid) and attaches it to attach_to
 by using last part of the message, which should be a properly
 formulated Ctx call.
 Ctx for this call is:
 alpha ~ attach_to, beta ~ new glass, gamma ~ attach_gamma
 Returns ID to the caller (also via MirResult if set in MIR).

ID_t IncarnateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid)
 Incarnates a new glass from the buffer and then attaches it in the
 same manner as the above method.
 Links and list contents are rebuilt in accordance with queen's dependency
 state.

void PutLensToPurgatory(ZGlass* lens)
 First step in the process of a lens removal.
 Removes all references to a lens and sends Rays with RQN_death.

void PutLensToVoid(ID_t lens_id)

void RemoveLens(ZGlass* lens)
 Initiates removal of lens. This is the method that should be called
 by user.
 If called as Flare broadcasting is suppressed.

void ZeroRefCount(ZGlass* lens)
 Called by ZGlass upon hitting refcount of 0.
 mSubjectRefCntMutex is (and should be) locked prior to call.

void CleanOrphanage()

void SetMandatory(Bool_t mandp)

void CreateReflection(TBuffer& buf)
 Virtual. Creates reflection that can be invoked to produce a copy
 of queen-space on other Saturn.
 ZQueen itself just creates and streams a ZComet.

void InvokeReflection(TBuffer& buf)
 Virtual. Invokes reflection created by a higher Saturn and thus
 begins mirroring the object-space.
 For ZQueen this involves unstreaming of ZComet and calling UnfoldFrom().

void RevokeReflection()
 Virtual. Cleans up queen-space, putting it back into non-ruling state.

ZComet* MakeComet()
 Produces Comet of type ST_Queen.
 Contains all glasses ruled by the queen.
 External references are streamed as IDs and can be reconstructed
 at lower Moons.
 Used for producing a snapshot of Queen-space to be sent to a Moon.

void Adopt(ZComet* comet)
 Adopts a Comet of type ST_CometBag.
 External references of a Comet are ignored.

void UnfoldFrom(ZComet& comet)
 Unfolds a dormant (not bRuling) queen from a comet of type ST_Queen
 and makes it a ruling queen.
 The incoming queen and its Deps are replaced with already present ones.
 Does NOT call CheckIn ... does it directly with simultaneous building of
 free block list.
 At the end calls AdUnfoldment on all lenses.

void add_reflector(SaturnInfo* moon)

void remove_reflector(SaturnInfo* moon)

void BroadcastMIRToNonRulingReflections(ZMIR& mir)

void BasicQueenChange(ZMIR& mir)

void EmitRay(Ray& ray, bool force)

void ListAll()
 attempt at looking at all subjects based on ids
 else might be forced into having local hash.



Inline Functions


                          void ~ZQueen()
          ZQueen::LensDetails* produce_lens_details(ID_t id, ZGlass* lens)
                        ZQueen ZQueen(const Text_t* n = "ZQueen", const Text_t* t = "0")
                        ZQueen ZQueen(ID_t span, const Text_t* n = "ZQueen", const Text_t* t = "0")
                          void SubjectWriteLock()
                          void SubjectWriteUnlock()
                          void SubjectRefCntLock()
                          void SubjectRefCntUnlock()
                         LID_t LibID()
                         LID_t ZibID() const
                         CID_t ClassID()
                         CID_t ZlassID() const
                         FID_t FID()
                         FID_t ZID() const
                   const char* ZlassName() const
                   const char* ZibName() const
                        ZKing* GetKing() const
                        Bool_t GetMandatory() const
                        Bool_t GetFollowDeps() const
                          void SetFollowDeps(Bool_t followdeps)
                        Bool_t GetRuling() const
                          void SetRuling(Bool_t ruling)
                        Bool_t GetAwaitingSceptre() const
                          void SetAwaitingSceptre(Bool_t awaitingsceptre)
          ZQueen::QueenState_e GetState() const
                          void SetState(ZQueen::QueenState_e state)
                          ID_t GetMinID() const
                          ID_t GetMaxID() const
                          ID_t GetIDSpan() const
                          ID_t GetIDsUsed() const
                          ID_t GetIDsPurged() const
                          ID_t GetIDsFree() const
                      UShort_t GetAvgPurgLen() const
                          void SetAvgPurgLen(UShort_t avgpurglen)
                       Float_t GetSgmPurgLen() const
                          void SetSgmPurgLen(Float_t sgmpurglen)
                        UInt_t GetPurgedMS() const
                          void SetPurgedMS(UInt_t purgedms)
                        UInt_t GetDeletedMS() const
                          void SetDeletedMS(UInt_t deletedms)
        ZQueen::ZeroRCPolicy_e GetZeroRCPolicy() const
                          void SetZeroRCPolicy(ZQueen::ZeroRCPolicy_e zerorcpolicy)
                        Bool_t GetStamping() const
                          void SetStamping(Bool_t stamping)
                       UChar_t GetAuthMode() const
                          void SetAuthMode(UChar_t authmode)
                       UChar_t GetAlignment() const
                          void SetAlignment(UChar_t alignment)
                       UChar_t GetMapNoneTo() const
                          void SetMapNoneTo(UChar_t mapnoneto)
                   ZMirFilter* GetProtector() const
                          void SetProtector(ZMirFilter* protector)
                    ZHashList* GetDeps() const
                          void SetDeps(ZHashList* deps)
                    ZHashList* GetOrphans() const
                          void SetOrphans(ZHashList* orphans)
                          void CopyLinks(lpZGlass_t& glass_list)
                          void CopyLinkRefs(lppZGlass_t& ref_list)
                          void CopyLinkSpecs(lLinkSpec_t& link_spec_list)
                         Int_t RebuildLinks(An_ID_Demangler* c)
                          void ExecuteMir(ZMIR& mir)
                         ZMIR* S_SetMandatory(Bool_t mandatory)
                         MID_t Mid_SetMandatory()
                         ZMIR* S_SetFollowDeps(Bool_t followdeps)
                         MID_t Mid_SetFollowDeps()
                         ZMIR* S_SetRuling(Bool_t ruling)
                         MID_t Mid_SetRuling()
                         ZMIR* S_SetAwaitingSceptre(Bool_t awaitingsceptre)
                         MID_t Mid_SetAwaitingSceptre()
                         ZMIR* S_SetState(ZQueen::QueenState_e state)
                         MID_t Mid_SetState()
                         ZMIR* S_SetAvgPurgLen(UShort_t avgpurglen)
                         MID_t Mid_SetAvgPurgLen()
                         ZMIR* S_SetSgmPurgLen(Float_t sgmpurglen)
                         MID_t Mid_SetSgmPurgLen()
                         ZMIR* S_SetPurgedMS(UInt_t purgedms)
                         MID_t Mid_SetPurgedMS()
                         ZMIR* S_SetDeletedMS(UInt_t deletedms)
                         MID_t Mid_SetDeletedMS()
                         ZMIR* S_SetZeroRCPolicy(ZQueen::ZeroRCPolicy_e zerorcpolicy)
                         MID_t Mid_SetZeroRCPolicy()
                         ZMIR* S_SetStamping(Bool_t stamping)
                         MID_t Mid_SetStamping()
                         ZMIR* S_SetAuthMode(UChar_t authmode)
                         MID_t Mid_SetAuthMode()
                         ZMIR* S_SetAlignment(UChar_t alignment)
                         MID_t Mid_SetAlignment()
                         ZMIR* S_SetMapNoneTo(UChar_t mapnoneto)
                         MID_t Mid_SetMapNoneTo()
                         ZMIR* S_SetProtector(ZMirFilter* protector)
                         MID_t Mid_SetProtector()
                         ZMIR* S_SetDeps(ZHashList* deps)
                         MID_t Mid_SetDeps()
                         ZMIR* S_SetOrphans(ZHashList* orphans)
                         MID_t Mid_SetOrphans()
                         ZMIR* S_release_moon_purgatory(ID_t n_to_release)
                         MID_t Mid_release_moon_purgatory()
                         ZMIR* S_instantiate(LID_t lid, CID_t cid, const Text_t* name = "0", const Text_t* title = "0")
                         MID_t Mid_instantiate()
                         ZMIR* S_InstantiateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid, LID_t new_lid, CID_t new_cid, const Text_t* name = "0", const Text_t* title = "0")
                         MID_t Mid_InstantiateWAttach()
                         ZMIR* S_IncarnateWAttach(ZGlass* attach_to, ZGlass* attach_gamma, LID_t att_lid, CID_t att_cid, MID_t att_mid)
                         MID_t Mid_IncarnateWAttach()
                         ZMIR* S_PutLensToPurgatory(ZGlass* lens)
                         MID_t Mid_PutLensToPurgatory()
                         ZMIR* S_PutLensToVoid(ID_t lens_id)
                         MID_t Mid_PutLensToVoid()
                         ZMIR* S_RemoveLens(ZGlass* lens)
                         MID_t Mid_RemoveLens()
                         ZMIR* S_CleanOrphanage()
                         MID_t Mid_CleanOrphanage()
                         ZMIR* S_AddDependency(ZQueen* new_dep)
                         MID_t Mid_AddDependency()
                         ZMIR* S_ListAll()
                         MID_t Mid_ListAll()
                          void _gled_catalog_init()
                       TClass* Class()
                       TClass* IsA() const
                          void ShowMembers(TMemberInspector& insp, char* parent)
                          void Streamer(TBuffer& b)
                          void StreamerNVirtual(TBuffer& b)
                        ZQueen ZQueen(const ZQueen&)
                       ZQueen& operator=(const ZQueen&)


Last update: Tue Jun 15 11:36:11 2004


ROOT page - Home page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.