MADARA
3.2.3
|
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 108 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 42 of file ZMQContext.cpp.
void madara::transport::ZMQContext::destroy_context | ( | void | ) |
Destroys the underlying context.
Definition at line 90 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 66 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 13 of file ZMQContext.cpp.
|
private |
the context
Definition at line 74 of file ZMQContext.h.
|
private |
track the number of references to the context
Definition at line 77 of file ZMQContext.h.