The class to create or remove associations and to wake all sleeping uploaders and downloaders. More...
Static Public Member Functions | |
template<class DataType > | |
static void | associate (DataUploader< DataType > *uploader, DataDownloader< DataType > *downloader) |
The function to associate an uploader and a downloader. More... | |
template<class DataType1 , class DataType2 > | |
static void | associate (DataUploaderDownloader< DataType1, DataType2 > *first, DataUploaderDownloader< DataType2, DataType1 > *second) |
The function to associate two DataUploaderDownloader. More... | |
template<class DataType > | |
static void | detach (DataUploader< DataType > *uploader) |
Removes an association. More... | |
template<class DataType > | |
static void | detach (DataDownloader< DataType > *downloader) |
Removes an association. More... | |
template<class DataType1 , class DataType2 > | |
static void | detach (DataUploaderDownloader< DataType1, DataType2 > *uploaderDownloader) |
Removes an association. More... | |
static void | stopAllDataExchanges () |
Stops all data exchanges. More... | |
Friends | |
template<class DataType_t > | |
class | __DataExchange_internal::QueueHolder |
QueueHolder is friend to access private members. More... | |
template<class DataType_t > | |
class | DataDownloader |
DataDownloader is friend to access private members. More... | |
template<class DataType_t > | |
class | DataUploader |
DataUploader is friend to access private members. More... | |
Detailed Description
The class to create or remove associations and to wake all sleeping uploaders and downloaders.
This class is a singleton and only has static public functions. This class is used for two purposes: creating or removing associations between uploaders and downloaders and stopping all data exchange. See the description of functions for more information.
- Note
- All functions in this class (both public and private) are thread-safe
Definition at line 950 of file dataexchange.h.
Member Function Documentation
|
static |
The function to associate an uploader and a downloader.
Call this function to create an association between an uploader and a downloader. Both must not be associated with anything else (use detach in case they are), otherwise an exception is thrown
- Parameters
-
uploader the uploader to associate with the downloader. Must not be NULL downloader the downloader to associate with the uploader. Must not be NULL
Definition at line 1773 of file dataexchange.h.
|
static |
The function to associate two DataUploaderDownloader.
This is the same as the associate function working on a single channel but performs the association of the two ends of two DataUploaderDownloader objects at the same time. Both objects must not be associated with anything else (use detach in case they are), otherwise an exception is thrown
- Parameters
-
first the first object of the association. Must not be NULL second the second object of the association. Must not be NULL
Definition at line 1779 of file dataexchange.h.
|
static |
Removes an association.
This function breaks the association of the given uploader with the downloader. If the uploader is not associated, nothing is done
- Parameters
-
uploader the uploader whose association to break
Definition at line 1785 of file dataexchange.h.
|
static |
Removes an association.
This function breaks the association of the given downloader with the uploader. If the downloader is not associated, nothing is done
- Parameters
-
downloader the downloader whose association to break
Definition at line 1791 of file dataexchange.h.
|
static |
Removes an association.
This function breaks the association of the given DataUploaderDownloader with its peer. If the object is not associated, nothing is done
- Parameters
-
uploaderDownloader the object whose association to break
Definition at line 1797 of file dataexchange.h.
|
static |
Stops all data exchanges.
Call this function to wake up all sleeping uploaders and downloaders and stop all data exchanges. The function only influences uploaders and downloaders that have been created before it is called. All attempts to get data to upload/download after this function is called will return NULL (see note in dataexchange.h description). It is not possible to resume exchanges, you must destroy uploaders and downloaders and then re-create them.
Definition at line 27 of file dataexchange.cpp.
Friends And Related Function Documentation
|
friend |
QueueHolder is friend to access private members.
Definition at line 1165 of file dataexchange.h.
|
friend |
DataDownloader is friend to access private members.
Definition at line 1159 of file dataexchange.h.
|
friend |
DataUploader is friend to access private members.
Definition at line 1153 of file dataexchange.h.
The documentation for this class was generated from the following files:
- utilities/include/dataexchange.h
- utilities/src/dataexchange.cpp