COOLFluiD
Release kernel
COOLFluiD is a Collaborative Simulation Environment (CSE) focused on complex MultiPhysics simulations.
|
#include <NetworkInfo.hpp>
Public Member Functions | |
NetworkInfo () | |
Constructor. More... | |
~NetworkInfo () | |
Destructor. More... | |
bool | is_server () const |
bool | is_client () const |
std::string | hostname () const |
unsigned short | port () const |
void | start_server () |
void | stop_server () |
void | start_client () |
void | stop_client () |
void | set_hostname (const std::string &name) |
void | set_port (unsigned short port) |
Private Attributes | |
bool | m_is_server |
Indicates whether a server manages this CF instance. More... | |
bool | m_is_client |
Indicates whether a client manages this CF instance. More... | |
std::string | m_hostname |
The current hostname. More... | |
unsigned short | m_port |
The current port number. More... | |
Holds network information of the GUI. This class allows to access these pieces of information from inside the CF kernel or plugins without calling Qt libraries. Values are typically set by the GUI.
Definition at line 24 of file NetworkInfo.hpp.
NetworkInfo | ( | ) |
Constructor.
Definition at line 18 of file NetworkInfo.cpp.
~NetworkInfo | ( | ) |
Destructor.
Definition at line 29 of file NetworkInfo.cpp.
std::string hostname | ( | ) | const |
Definition at line 47 of file NetworkInfo.cpp.
bool is_client | ( | ) | const |
true
if this CF instance is managed by the client Definition at line 40 of file NetworkInfo.cpp.
bool is_server | ( | ) | const |
true
if this CF instance is managed by the server Definition at line 33 of file NetworkInfo.cpp.
unsigned short port | ( | ) | const |
Definition at line 54 of file NetworkInfo.cpp.
void set_hostname | ( | const std::string & | name | ) |
Sets the hostname.
name | The new hostname. Should be different from "localhost". |
Definition at line 95 of file NetworkInfo.cpp.
void set_port | ( | unsigned short | port | ) |
void start_client | ( | ) |
"Starts" the client. If the server is already "started", it is "stopped".
is_client()
returns true
Definition at line 78 of file NetworkInfo.cpp.
void start_server | ( | ) |
"Starts" the server. If the client is already "started", it is "stopped".
is_server()
returns true
Definition at line 61 of file NetworkInfo.cpp.
void stop_client | ( | ) |
"Stops" the client.
is_client()
returns false
Definition at line 88 of file NetworkInfo.cpp.
void stop_server | ( | ) |
"Stops" the server.
is_server()
returns false
Definition at line 71 of file NetworkInfo.cpp.
|
private |
The current hostname.
Definition at line 82 of file NetworkInfo.hpp.
|
private |
Indicates whether a client manages this CF instance.
Definition at line 79 of file NetworkInfo.hpp.
|
private |
Indicates whether a server manages this CF instance.
Definition at line 76 of file NetworkInfo.hpp.
|
private |
The current port number.
Definition at line 85 of file NetworkInfo.hpp.
Send comments to: COOLFluiD Web Admin |