Public Member Functions

hamcast::ipc::middleware_configuration Class Reference
[Inter-process communication.]

Stores the configuration of the currently running middleware. More...

#include <middleware_configuration.hpp>

List of all members.

Public Member Functions

const process_id & pid () const
boost::uint16_t port () const
const std::string & port_as_string () const
 middleware_configuration ()
 middleware_configuration (boost::uint16_t port)
bool read ()
bool write ()

Detailed Description

Stores the configuration of the currently running middleware.


Constructor & Destructor Documentation

hamcast::ipc::middleware_configuration::middleware_configuration (  ) 

Create an "empty" configuration with port = 0.

hamcast::ipc::middleware_configuration::middleware_configuration ( boost::uint16_t  port  ) 

Create a valid configuration with given port and detect process id automatically.

Parameters:
port The port as (16-bit, unsigned) integer.

Member Function Documentation

const process_id& hamcast::ipc::middleware_configuration::pid (  )  const

Get the process id of the middleware.

Returns:
The process id of the middleware as plattform-specific integer type.
boost::uint16_t hamcast::ipc::middleware_configuration::port (  )  const

Get the port the middleware is running at.

Returns:
The port as (16-bit, unsigned) integer.
const std::string& hamcast::ipc::middleware_configuration::port_as_string (  )  const

Get the port as string representation.

Returns:
The port as string representation.
bool hamcast::ipc::middleware_configuration::read (  ) 

Read to configuration from the middleware.

Returns:
true if a config file from a running middleware was found and read; otherwise false.
bool hamcast::ipc::middleware_configuration::write (  ) 

Write this configuration to disc.

Returns:
true if a config file was written; otherwise false.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator