MADARA
3.4.1
|
A class that manages a ZMQ context. More...
#include <ZMQContext.h>
Public Member Functions | |
ZMQContext () | |
Constructor. More... | |
~ZMQContext () | |
Destructor. More... | |
void | add_ref (void) |
Adds a reference to the context. More... | |
void | destroy_context (void) |
Destroys the underlying context. More... | |
void * | get_context () |
Retrieves the underlying ZMQ context. More... | |
void | rem_ref (void) |
Removes a reference to the context. More... | |
void | set_context (void *context) |
Retrieves the underlying ZMQ context. More... | |
Private Attributes | |
void * | context_ |
the context More... | |
std::atomic< int > | references_ |
track the number of references to the context More... | |
A class that manages a ZMQ context.
Definition at line 23 of file ZMQContext.h.
madara::transport::ZMQContext::ZMQContext | ( | ) |
madara::transport::ZMQContext::~ZMQContext | ( | ) |
Destructor.
Definition at line 101 of file ZMQContext.cpp.
void madara::transport::ZMQContext::add_ref | ( | void | ) |
Adds a reference to the context.
This is useful for very lazy compilers that do not forcefully call destructors of global variables, such as VS apparently does.
Definition at line 37 of file ZMQContext.cpp.
void madara::transport::ZMQContext::destroy_context | ( | void | ) |
Destroys the underlying context.
Definition at line 83 of file ZMQContext.cpp.
|
inline |
Retrieves the underlying ZMQ context.
Definition at line 46 of file ZMQContext.h.
void madara::transport::ZMQContext::rem_ref | ( | void | ) |
Removes a reference to the context.
This is useful for very lazy compilers that do not forcefully call destructors of global variables, such as VS apparently does.
Definition at line 60 of file ZMQContext.cpp.
void madara::transport::ZMQContext::set_context | ( | void * | context | ) |
Retrieves the underlying ZMQ context.
context | the context to manage |
Definition at line 9 of file ZMQContext.cpp.
|
private |
the context
Definition at line 73 of file ZMQContext.h.
|
private |
track the number of references to the context
Definition at line 76 of file ZMQContext.h.