Public Member Functions | Protected Attributes

cygnal::Listener Class Reference

#include <lcshm.h>

Inheritance diagram for cygnal::Listener:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 Listener ()
 Construct a block of Listeners. This constructs an uninitialized Listener block.
 Listener (boost::uint8_t *baseaddr)
 Construct a block Listeners at the specified address.
 ~Listener ()
 Delete the Listener block.
bool addListener (const std::string &name)
 Create a new Listener in the memory segment.
bool findListener (const std::string &name)
 See if a connection name exists in our list of Listeners.
bool removeListener (const std::string &name)
 Remove the Listener for this Object.
std::auto_ptr< std::vector
< std::string > > 
listListeners ()
 List the Listeners for this memory segment.
void setBaseAddress (boost::uint8_t *addr)
 Set the base address for the block of Listeners.
boost::uint8_t * getBaseAddress ()
 Set the base address for the block of Listeners.

Protected Attributes

std::string _name
boost::uint8_t * _baseaddr

Detailed Description

Manipulate the list of LocalConnection Listeners. We've made this a separate class from LocalConnection as it's used standalone for the dumpshm utility to dump the Listener lists.


Constructor & Destructor Documentation

cygnal::Listener::Listener (  ) 

Construct a block of Listeners. This constructs an uninitialized Listener block.

cygnal::Listener::Listener ( boost::uint8_t *  x  ) 

Construct a block Listeners at the specified address.

Parameters:
baseaddr The address to use for the block of Listeners.

References _baseaddr.

cygnal::Listener::~Listener (  ) 

Delete the Listener block.


Member Function Documentation

bool cygnal::Listener::addListener ( const std::string &  name  ) 

Create a new Listener in the memory segment.

Parameters:
name The name for the Listener.
Returns:
true if this succeeded. false if it doesn't.
bool cygnal::Listener::findListener ( const std::string &  name  ) 

See if a connection name exists in our list of Listeners.

Parameters:
name An ASCII string that is the name of the Listener to search for.
Returns:
true if this succeeded. false if it doesn't.
boost::uint8_t* cygnal::Listener::getBaseAddress (  )  [inline]

Set the base address for the block of Listeners.

Returns:
A real pointer to the base address of the block of Listeners in the memory segment.

Referenced by cygnal::LcShm::formatHeader().

std::auto_ptr< vector< string > > cygnal::Listener::listListeners (  ) 

List the Listeners for this memory segment.

Returns:
A smart pointer to a vector of Listener names.
Remarks:
This is only used for debugging

References _baseaddr.

Referenced by cygnal::LcShm::dump().

bool cygnal::Listener::removeListener ( const std::string &  name  ) 

Remove the Listener for this Object.

Parameters:
name An ASCII string that is the name of the Listener to remove from the memory segment..
Returns:
true if this succeeded. false if it doesn't.
void cygnal::Listener::setBaseAddress ( boost::uint8_t *  addr  )  [inline]

Set the base address for the block of Listeners.

Parameters:
addr The address for the block of Listeners.
Returns:
nothing.

Referenced by cygnal::LcShm::connect().


Member Data Documentation

boost::uint8_t* cygnal::Listener::_baseaddr [protected]

Referenced by Listener(), and listListeners().

std::string cygnal::Listener::_name [protected]

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