ZQueen


class description - source file - inheritance tree

class ZQueen : public ZNameMap

    private:
void _init() protected:
virtual void BlessMIR(ZMIR& mir) virtual void Bootstrap() virtual ZGlass* instantiate(LID_t lid, CID_t cid, const Text_t* name = "0", const Text_t* title = "0") 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 add_reflector(SaturnInfo* moon) void Adopt(ZComet* comet) ID_t CheckIn(ZGlass* glass) void CheckOut(ZGlass* glass) static TClass* Class() static CID_t ClassID() void CleanOrphanage() virtual void CopyLinkRefs(lppZGlass_t& ref_list) virtual void CopyLinks(lpZGlass_t& glass_list, Bool_t lockp = true) virtual void CopyLinkSpecs(lLinkSpec_t& link_spec_list) virtual void CreateReflection(TBuffer& buf) void EmitRay(Ray& ray) void ExecuteMir(ZMIR& mir) static FID_t FID() UChar_t GetAlignment() const UChar_t GetAuthMode() const Bool_t GetAwaitingSceptre() const ZHashList* GetDeps() const ID_t GetIDSpan() 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 Bool_t GetRuling() const Bool_t GetStamping() const ZGlass* IncarnateWAttach(ZGlass* attach_to, ZGlass* attach_gamma) ZGlass* 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_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_SetAlignment() static MID_t Mid_SetAuthMode() static MID_t Mid_SetDeps() static MID_t Mid_SetMandatory() static MID_t Mid_SetMapNoneTo() static MID_t Mid_SetOrphans() static MID_t Mid_SetProtector() static MID_t Mid_SetStamping() virtual Int_t RebuildLinks(ZComet* c) void remove_reflector(SaturnInfo* moon) ID_t ReserveID() virtual void RevokeReflection() ZMIR* S_CleanOrphanage() ZMIR* S_IncarnateWAttach(ZGlass* attach_to, ZGlass* attach_gamma) 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_SetAlignment(UChar_t alignment) ZMIR* S_SetAuthMode(UChar_t authmode) ZMIR* S_SetDeps(ZHashList* deps) ZMIR* S_SetMandatory(Bool_t mandatory) ZMIR* S_SetMapNoneTo(UChar_t mapnoneto) ZMIR* S_SetOrphans(ZHashList* orphans) ZMIR* S_SetProtector(ZMirFilter* protector) ZMIR* S_SetStamping(Bool_t stamping) void SetAlignment(UChar_t alignment) void SetAuthMode(UChar_t authmode) void SetAwaitingSceptre(Bool_t awaitingsceptre) void SetDeps(ZHashList* deps) void SetMandatory(Bool_t mandatory) void SetMapNoneTo(UChar_t mapnoneto) void SetOrphans(ZHashList* orphans) void SetProtector(ZMirFilter* protector) void SetRuling(Bool_t ruling) void SetStamping(Bool_t stamping) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void UnfoldFrom(ZComet& comet) void ZeroRefCount(ZGlass* glass) 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 BoolOut(-join=>1) Bool_t bRuling ! X{GS} 7 BoolOut() Bool_t bAwaitingSceptre ! X{GS} 7 BoolOut() ID_t mIDSpan X{G} 7 ValOut() ID_t mMinID X{G} 7 ValOut(-range=>[0,MAX_ID,1,0], -width=>10, -join=>1) ID_t mMaxID X{G} 7 ValOut(-range=>[0,MAX_ID,1,0], -width=>10) ID_t mMaxUsedID ! set<unsigned int,less<unsigned int>,allocator<unsigned int> > mFreeIDs ! Bool_t bStamping X{GS} 7 Bool() UChar_t mAuthMode X{GS} 7 PhonyEnum(-seqvals=>[Null,Queen,Lens,QueenThenLens,LensThenQueen], -width=>10) UChar_t mAlignment X{GS} 7 PhonyEnum(-seqvals=>[Good, Evil], -width=>6) UChar_t mMapNoneTo X{GS} 7 PhonyEnum(-vals=>[ZMirFilter::R_Allow,Allow,ZMirFilter::R_Deny,Deny], -width=>8) ZMirFilter* mProtector X{GS} L{} ZHashList* mDeps X{GS} L{} ZHashList* mOrphans X{GS} L{} list<SaturnInfo*,allocator<SaturnInfo*> > mReflectors ! 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


See also

ZSunQueen

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.

 As queens are always at least partially exposed, MIRs with alpa=queen
 are always broadcasted to all Moons. Exported methods that should
 not be called for an inactive queen are prefixed with if-not-ruling-return.
________________________________________________________________________

void _init()

void Bootstrap()
 Initializes a brand new queen.
 Called from ZKing.
 Not applicable for activation or instantiation of not Ruling Queens.

void BlessMIR(ZMIR& mir) throw(string)
 should check that the mir is valid and within deps.
 If whorequeen should accept new ones and append them.
 If light-queen with OpenedDeps 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.

ID_t ReserveID()

ID_t CheckIn(ZGlass* glass)

void CheckOut(ZGlass* glass)
 !!!!!! this is fooed ... Queens must have special mechanism for deletion
 of lenses. Note ... eyes are pointer-centric, not id-centric.
 Further ... deletion itself should be delayed and performed
 on Saturn some time *after* endarkment._eh +
 Perform with special message type that is only execed on level lower;
 that call should then decide what to send furter (remove or migrate)
 Which means there is a need for DumpQueen

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

ZGlass* 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

ZGlass* IncarnateWAttach(ZGlass* attach_to, ZGlass* attach_gamma)
 Incarnates a new glass from the buffer and then attaches it in the
 same manner as the above method.
 Links MUST NOT be set as they will not be rebuilt.
 !!!! Probably should set them to zero prior to CheckIn.
 !!!!! This half-cooked anyway ... no mefid stuff.

void ZeroRefCount(ZGlass* glass)
 Called by ZGlass upon hitting refcount of 0.
 No checks done.
 This operation always performed locally, as refcount is a local property.

void CleanOrphanage()

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 EmitRay(Ray& ray)

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



Inline Functions


             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")
              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
               void SetMandatory(Bool_t mandatory)
             Bool_t GetRuling() const
               void SetRuling(Bool_t ruling)
             Bool_t GetAwaitingSceptre() const
               void SetAwaitingSceptre(Bool_t awaitingsceptre)
               ID_t GetIDSpan() const
               ID_t GetMinID() const
               ID_t GetMaxID() const
             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, Bool_t lockp = true)
               void CopyLinkRefs(lppZGlass_t& ref_list)
               void CopyLinkSpecs(lLinkSpec_t& link_spec_list)
              Int_t RebuildLinks(ZComet* c)
               void ExecuteMir(ZMIR& mir)
              ZMIR* S_SetMandatory(Bool_t mandatory)
              MID_t Mid_SetMandatory()
              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_instantiate(LID_t lid, CID_t cid, const Text_t* name = "0", const Text_t* title = "0")
              MID_t Mid_instantiate()
              ZMIR* S_CleanOrphanage()
              MID_t Mid_CleanOrphanage()
              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)
              MID_t Mid_IncarnateWAttach()
              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&)
               void ~ZQueen()


Last update: Thu Nov 20 16:08:54 2003


ROOT page - Home page - Class index - 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.