Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)

Enlighten API 3.10 Documentation
Results will update as you type.
  • class Geo GeoEqualCString
  • class Geo GeoEvent
  • class Geo GeoFileManager
  • class Geo GeoFileStream
  • class Geo GeoFixedBinarySearchMap
  • class Geo GeoFixedBinarySearchMapCompare
  • class Geo GeoFixedPoolAllocator
  • class Geo GeoFixedString
  • class Geo GeoFlattenAndPackResults
  • class Geo GeoFp16Texture
  • class Geo GeoFpControl
  • class Geo GeoFrameTime
  • class Geo GeoFreeDestructor
  • class Geo GeoGenericTexture
  • class Geo GeoGuid
  • class Geo GeoHalf
  • class Geo GeoHashConstHandle
  • class Geo GeoHashCString
  • class Geo GeoHashDefault
  • class Geo GeoHashHandle
  • class Geo GeoHashMap
  • class Geo GeoHashString
  • class Geo GeoImmutableArray
  • class Geo GeoInputEvent
  • class Geo GeoInstanceCount
  • class Geo GeoIntRange
  • class Geo GeoIntrusivePtr
  • class Geo GeoKeyValueArray
  • class Geo GeoLineSegment
  • class Geo GeoList
  • class Geo GeoMap
  • class Geo GeoMemoryDefault
  • class Geo GeoMemoryPool
  • class Geo GeoMemoryStream
  • class Geo GeoNonAABoundingBox
  • class Geo GeoNoopDestructor
  • class Geo GeoPair
  • class Geo GeoParametrisedPlane3
  • class Geo GeoPriorityQueue
  • class Geo GeoProgress
  • class Geo GeoQueue
  • class Geo GeoQueueEnumInterface
  • class Geo GeoRefArrayPtr
  • class Geo GeoRefCount
  • class Geo GeoRefPtr
  • class Geo GeoRefReleasePtr
  • class Geo GeoReleaseDestructor
  • class Geo GeoRGBXTexture
  • class Geo GeoScopedCSection
  • class Geo GeoSingleton
  • class Geo GeoSpatialHash
  • class Geo GeoString
  • class Geo GeoTimer
  • class Geo GeoTokenList
  • class Geo GeoTokenStream
  • class Geo GeoTriangle
  • class Geo GeoTriple
  • class Geo GeoUniqueDelegatePtr
  • class Geo GeoUniquePtr
  • class Geo GeoUniqueReleasePtr
  • class Geo GeoV128Texture
  • class Geo GeoVariant
  • class Geo GeoVirtualPageAllocator
  • class Geo GeoZLibFileStream
  • class Geo GoodRNG
  • class Geo IdentDataCompare
  • class Geo IdentVertLinkBuilder
  • class Geo IdxLink
  • class Geo IffReader
  • class Geo IffTextWriter
  • class Geo IffWriter
  • class Geo IGeoEvent
  • class Geo IGeoInputStream
  • class Geo IGeoProgressProxy
  • class Geo IGeoRayTracingContext
  • class Geo IGeoReleasable
  • class Geo IGeoSerialisable
  • class Geo IGeoStream
  • class Geo IRtMesh
  • class Geo ITerminalCmdHandler
  • class Geo ITerminalDelegate
    Calendars

You‘re viewing this with anonymous access, so some content might be blocked.
/
class Geo GeoQueue

    This is the documentation for Enlighten.

    class Geo GeoQueue

    Nov 21, 2019

    template<typename T>
    class Geo::GeoQueue

    Simple FIFO queue.

    Stores a static array of objects and a read and write cursor pair. Uses the managed object's copy constructor.

    To use construct one and then call SetMaxObjects to set the number of objects the queue can deal with. Queue setup:

    GeoQueue    MyQueue;
    MyQueue.SetMaxObjects(...size require...)
    
    Destructor deletes all objects in queue and frees resources. Alternatively call EmptyQueue() and SetMaxObject(0) to free resources without calling destructor.

    Queue Operation: Read, Write and Peek are used to access the queue in standard FIFO fashion. To walk all the items in the queue use the GeoQueueEnumCallbackInterface with the Walk function.

    Restrictions: Types used to instantiate the queue template must have a copy constructor. It is intended that the types managed are simple with a shallow copy constructor and simple destructor.

    Cost: All functions are O(1) except SetMaxObjects, EmptyQueue and Walk which are O(num objects in queue). SetMaxObjects is the only function with any significant complexity.

    Functions

    Name Description
    ~GeoQueue()

    Destructor deletes all objects in the queue and then releases any memory allocated on init.

    EmptyQueue()

    Empty the queue.

    Enumerate(GeoQueueEnumInterface< T > *, void *)

    Walk all of the objects in the queue and call the callback (oldest first) Returns false if early termination requested by callback.

    GeoQueue()

    Constructor just clears the pointers, queue must have a size specified before it can be used.

    GetArrayPointer()

    Allows access to the start of the object array.

    Peek(T &)

    Read the oldest object in the queue but don't remover it.

    Read(T &)

    Read the oldest object in the queue, removing it from the queue.

    ReSetMaxObjects(Geo::u32)

    Implements the actual moving of data used in SetMaxObjects.

    SetMaxObjects(Geo::u32)

    Sets the maximum number of objects to the specified value, retaining any objects already in the queue.

    Write(const T &)

    Write an object to the queue.


    Geo::GeoQueue< T >::~GeoQueue


    public: ~GeoQueue()


    Destructor deletes all objects in the queue and then releases any memory allocated on init.


    void Geo::GeoQueue< T >::EmptyQueue


    public: void EmptyQueue()


    Empty the queue.


    bool Geo::GeoQueue< T >::Enumerate


    public: bool Enumerate
    (
        GeoQueueEnumInterface< T > * callback,
        void * context
    )


    Walk all of the objects in the queue and call the callback (oldest first) Returns false if early termination requested by callback.


    Geo::GeoQueue< T >::GeoQueue


    public: GeoQueue()


    Constructor just clears the pointers, queue must have a size specified before it can be used.


    T* Geo::GeoQueue< T >::GetArrayPointer


    protected: T * GetArrayPointer()


    Allows access to the start of the object array.


    bool Geo::GeoQueue< T >::Peek


    public: bool Peek
    (
        T & object
    ) const


    Read the oldest object in the queue but don't remover it.


    bool Geo::GeoQueue< T >::Read


    public: bool Read
    (
        T & object
    )


    Read the oldest object in the queue, removing it from the queue.


    bool Geo::GeoQueue< T >::ReSetMaxObjects


    protected: bool ReSetMaxObjects
    (
        Geo::u32 newMaxObjects
    )


    Implements the actual moving of data used in SetMaxObjects.


    bool Geo::GeoQueue< T >::SetMaxObjects


    public: bool SetMaxObjects
    (
        Geo::u32 newMaxObjects
    )


    Sets the maximum number of objects to the specified value, retaining any objects already in the queue.

    Max objects of zero means free memory. The new max objects must be larger than the number of objects in the queue.


    bool Geo::GeoQueue< T >::Write


    public: bool Write
    (
        const T & object
    )


    Write an object to the queue.

    , multiple selections available,
    {"serverDuration": 10, "requestCorrelationId": "3748394b2db1477c9cecc97b0b23d0ec"}