|
AGXDynamics
2.31.1.0
|
Library singleton class. More...
#include <Socket.h>
Inheritance diagram for agxNet::Library:Public Types | |
| enum | Priority { HIGHEST_PRIORITY = 2147483647, LOWEST_PRIORITY = 10000, DEFAULT_PRIORITY = 1073741824 } |
| Specifies the ranges of the priority which can be assigned to a singleton at the time of creation. More... | |
Public Member Functions | |
| Library () | |
| virtual std::string | getClassName () const =0 |
| IPAddress | getHostByName (const char *hostName, agx::UInt16 port) |
| Resolve host IP by its name. More... | |
| int | getPriority () const |
| Return the shutdown priority of the singleton instance. More... | |
| virtual void | shutdown () override |
| instance the object, after this, the object cannot be used anymore. More... | |
Static Public Member Functions | |
| static Library * | instance () |
| Get the singleton instance. More... | |
Protected Member Functions | |
| void | _shutdown () |
Library singleton class.
This is a library singleton class. Creating an object of this class initializes the library while destroying this object de initializes it. So, the convenient way of initializing the library is to create an object of this class on the stack. Thus, when the object goes out of scope its destructor will be called and the library will be de initialized automatically. This is what C++ RAII is all about ;-).
|
inherited |
Specifies the ranges of the priority which can be assigned to a singleton at the time of creation.
Definition at line 35 of file Singleton.h.
| agxNet::Library::Library | ( | ) |
|
protectedinherited |
|
pure virtualinherited |
| IPAddress agxNet::Library::getHostByName | ( | const char * | hostName, |
| agx::UInt16 | port | ||
| ) |
Resolve host IP by its name.
This function resolves host IP address by its name. If it fails resolving the IP address it will Throw NetError.
| hostName | - null-terminated string representing host name. Example: "www.somedomain.com". |
| port | - IP port number which will be placed in the resulting IPAddress structure. |
|
inherited |
Return the shutdown priority of the singleton instance.
|
static |
Get the singleton instance.
|
overridevirtual |
instance the object, after this, the object cannot be used anymore.
Called by singleton manager.
Reimplemented from agx::Singleton.