neic-glass3  1.4.6
Public Member Functions | List of all members
glass3::util::Queue Class Reference

glass3::util::Queue class More...

#include <queue.h>

Inheritance diagram for glass3::util::Queue:
Inheritance graph
Collaboration diagram for glass3::util::Queue:
Collaboration graph

Public Member Functions

 Queue ()
 Queue constructor. More...
 
 ~Queue ()
 Queue destructor. More...
 
void clear () override
 Queue clear function. More...
 
bool addDataToQueue (std::shared_ptr< json::Object > data)
 add data to Queue More...
 
std::shared_ptr< json::Object > getDataFromQueue ()
 get data from Queue More...
 
int size ()
 get the size of the Queue More...
 
- Public Member Functions inherited from glass3::util::BaseClass
 BaseClass ()
 BaseClass constructor. More...
 
virtual ~BaseClass ()
 BaseClass destructor. More...
 
virtual bool setup (std::shared_ptr< const json::Object > config)
 BaseClass configuration function. More...
 
const std::shared_ptr< const json::Object > getConfig ()
 
bool getSetup ()
 Retrieves the class member boolean flag indicating whether the class has been setup, set to true if setup was successful. More...
 
const std::string & getDefaultAgencyId ()
 Function to retrieve the name of the default agency id. More...
 
void setDefaultAgencyId (const std::string &id)
 Function to set the name of the default agency id. More...
 
const std::string & getDefaultAuthor ()
 Function to retrieve the name of the default author. More...
 
void setDefaultAuthor (const std::string &author)
 Function to set the name of the default author. More...
 

Additional Inherited Members

- Protected Attributes inherited from glass3::util::BaseClass
std::shared_ptr< const json::Object > m_Config
 A shared pointer to the json::Object that holds the configuration. More...
 
std::atomic< bool > m_bIsSetup
 the boolean flag indicating whether the class has been setup, set to true if setup was successful. More...
 
std::string m_DefaultAgencyID
 A std::string containing the default agency id to use in parsing if one is not provided. More...
 
std::string m_DefaultAuthor
 A std::string containing the default author to use in parsing if one is not provided. More...
 

Detailed Description

glass3::util::Queue class

The glass3::util::Queue is a class implementing a FIFO Queue of shared_ptr's to json::Objects. The Queue is thread safe.

Queue inherits from the baseclass class.

Constructor & Destructor Documentation

glass3::util::Queue::Queue ( )

Queue constructor.

The constructor for the Queue class.

glass3::util::Queue::~Queue ( )

Queue destructor.

The destructor for the Queue class.

Member Function Documentation

bool glass3::util::Queue::addDataToQueue ( std::shared_ptr< json::Object >  data)

add data to Queue

Add the provided data the Queue

Parameters
data- A pointer to a json::Object to add to the Queue
Returns
returns true if successful, false otherwise.
void glass3::util::Queue::clear ( )
overridevirtual

Queue clear function.

The clear function for the Queue class. Clear all data currently contained in the Queue

Reimplemented from glass3::util::BaseClass.

std::shared_ptr< json::Object > glass3::util::Queue::getDataFromQueue ( )

get data from Queue

Get the next data from the Queue

Returns
returns a pointer to the json::Object containing the data, NULL there was no data in the Queue
int glass3::util::Queue::size ( )

get the size of the Queue

Get the current size of the Queue

Returns
returns an integer value containing the current size of the Queue

The documentation for this class was generated from the following files: