|
AGX Dynamics
2.35.0.1
|
Library singleton class. More...
#include <Socket.h>
Inheritance diagram for agxNet::Library:Public Member Functions | |
| Library () | |
| IPAddress | getHostByName (const char *hostName, agx::UInt16 port) |
| Resolve host IP by its name. More... | |
| virtual void | shutdown () override |
| instance the object, after this, the object cannot be used anymore. More... | |
Public Member Functions inherited from agx::Singleton | |
| Singleton (int priority=DEFAULT_PRIORITY) | |
| Default constructor. More... | |
| virtual std::string | getClassName () const =0 |
| int | getPriority () const |
| Return the shutdown priority of the singleton instance. More... | |
Static Public Member Functions | |
| static Library * | instance () |
| Get the singleton instance. More... | |
Additional Inherited Members | |
Public Types inherited from agx::Singleton | |
| 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... | |
Protected Member Functions inherited from agx::Singleton | |
| virtual | ~Singleton () |
| Destructor. More... | |
| 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 ;-).
| agxNet::Library::Library | ( | ) |
| 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. |
|
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.