#include <DataRepository.h>
Public Member Functions | |
DataRepository (void) | |
DataRepository default constructor. | |
bool | bRegisterDataChannel (Arxx::DataChannel *pDataChannel) |
Register a data channel to be used by the fetching algorithm. | |
bool | bUnregisterDataChannel (Arxx::DataChannel *pDataChannel) |
Unregister a data channel from the repository. | |
bool | bFetchData (const Arxx::URI &URI, Arxx::Buffer &Buffer, Arxx::FetchStatus &FetchStatus) |
Fetches data from a URI using the most specific DataChannel object. | |
void | vReferenceDataChannel (const Arxx::URI &URI) |
References the data channel matching the URI. | |
void | vDereferenceDataChannel (const Arxx::URI &URI) |
Dereferences the data channel matching the URI. | |
bool | bHasDataChannel (const Arxx::URI &URI) |
Returns whether a channel for this URI is registered in the repository. | |
const Arxx::DataChannel * | pGetDataChannel (const Arxx::URI &URI) |
Returns the DataChannel object matching the given URI. | |
Private Member Functions | |
std::map< Arxx::URI, Arxx::DataChannel * >::iterator | iGetDataChannel (const Arxx::URI &URI) |
Helper function to retrieve the channel object nearest an applicable to the URI. | |
Private Attributes | |
std::map< Arxx::URI, Arxx::DataChannel * > | m_DataChannels |
The registered DataChannel objects, mapped by URI. |
Arxx::DataRepository::DataRepository | ( | void | ) |
DataRepository default constructor.
bool Arxx::DataRepository::bFetchData | ( | const Arxx::URI & | URI, | |
Arxx::Buffer & | Buffer, | |||
Arxx::FetchStatus & | FetchStatus | |||
) |
Fetches data from a URI using the most specific DataChannel object.
URI | The URI used to identify the DataChannel for fetching. | |
Buffer | The Buffer to which the data is written upon fetching. | |
FetchStatus | This variable will be updated with the status of the fetching process. |
bool Arxx::DataRepository::bHasDataChannel | ( | const Arxx::URI & | URI | ) |
Returns whether a channel for this URI is registered in the repository.
This function uses the same matching algorithm as vReferenceDataChannel(), vDereferenceDataChannel() and vFetchData(). It does not check for an exact match.
bool Arxx::DataRepository::bRegisterDataChannel | ( | Arxx::DataChannel * | pDataChannel | ) |
Register a data channel to be used by the fetching algorithm.
bool Arxx::DataRepository::bUnregisterDataChannel | ( | Arxx::DataChannel * | pDataChannel | ) |
Unregister a data channel from the repository.
std::map< Arxx::URI, Arxx::DataChannel * >::iterator Arxx::DataRepository::iGetDataChannel | ( | const Arxx::URI & | URI | ) | [private] |
const Arxx::DataChannel * Arxx::DataRepository::pGetDataChannel | ( | const Arxx::URI & | URI | ) |
Returns the DataChannel object matching the given URI.
Since the DataChannel object is const this function is only for testing puposes.
void Arxx::DataRepository::vDereferenceDataChannel | ( | const Arxx::URI & | URI | ) |
Dereferences the data channel matching the URI.
void Arxx::DataRepository::vReferenceDataChannel | ( | const Arxx::URI & | URI | ) |
References the data channel matching the URI.
std::map< Arxx::URI, Arxx::DataChannel * > Arxx::DataRepository::m_DataChannels [private] |
The registered DataChannel objects, mapped by URI.