TwiceAsNice  2019-02-18
Public Member Functions | Public Attributes | Private Attributes | List of all members
lbto::Arbitrator Class Reference

The arbitrator class controls the authorized instruments and returns the appropiated pointer to the IIF. More...

#include <LbtoIIFArbitrator.h>

Collaboration diagram for lbto::Arbitrator:
Collaboration graph

Public Member Functions

 Arbitrator ()
 Constructor. More...
 
 ~Arbitrator ()
 
bool DeRegister (const std::string _proxyName)
 Remove the key and destroy the corresponding IIF instance. More...
 
IIFServerPtr getIIFServer (const std::string _proxyName, Ice::CommunicatorPtr _comm)
 Get the IIFServerPtr object mapped to the passed proxy name. More...
 
bool ProxyExist (const std::string _proxyName)
 Tell if the proxy already exist on the map. More...
 

Public Attributes

std::map< std::string, lbto::IIFServerPtrm_map
 list of instruments vs IIF objects. More...
 

Private Attributes

IceUtil::RecMutex __connMutex
 Recursive Ice Mutex protection. More...
 

Detailed Description

The arbitrator class controls the authorized instruments and returns the appropiated pointer to the IIF.

Author
Jose Borelli borel.nosp@m.li@m.nosp@m.pia.d.nosp@m.e
Todo:
This class needs also a logger object.

Constructor & Destructor Documentation

◆ Arbitrator()

lbto::Arbitrator::Arbitrator ( )

Constructor.


◆ ~Arbitrator()

lbto::Arbitrator::~Arbitrator ( )

Destructor. Frees all the resources.

Member Function Documentation

◆ DeRegister()

bool lbto::Arbitrator::DeRegister ( const std::string  _proxyName)

Remove the key and destroy the corresponding IIF instance.


Parameters
_proxyNamethe proxy name.
Returns
true/false success or fail

◆ getIIFServer()

lbto::IIFServerPtr lbto::Arbitrator::getIIFServer ( const std::string  _proxyName,
Ice::CommunicatorPtr  _comm 
)

Get the IIFServerPtr object mapped to the passed proxy name.


Parameters
_proxyNamethe proxy name to be created or searched for.
_commthe Ice communicator pointer
Returns
the IIFServerPtr object mapped to the passed proxy name

◆ ProxyExist()

bool lbto::Arbitrator::ProxyExist ( const std::string  _proxyName)

Tell if the proxy already exist on the map.


Parameters
_proxyNamethe proxy name.

Member Data Documentation

◆ __connMutex

IceUtil::RecMutex lbto::Arbitrator::__connMutex
private

Recursive Ice Mutex protection.

◆ m_map

std::map<std::string, lbto::IIFServerPtr> lbto::Arbitrator::m_map

list of instruments vs IIF objects.


The documentation for this class was generated from the following files: