Mapping Class Reference

#include <mapping.h>

Inheritance diagram for Mapping:

Inheritance graph
[legend]
Collaboration diagram for Mapping:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Mapping (MappingFactory *factory, const char *filename, side_t side)
virtual ~Mapping ()
side_t getSide ()
virtual bool isLoaded ()
virtual TraceContextgetTraceContext ()
virtual bool isOpen ()
virtual bool open ()
virtual void close ()

Protected Member Functions

virtual bool openChannel (ChannelMapping *channel)=0
virtual void closeChannel (ChannelMapping *channel)=0
virtual void load ()
bool openChannels (channelList_t &list, channelList_t::iterator &it)

Constructor & Destructor Documentation

Mapping::Mapping MappingFactory factory,
const char *  filename,
side_t  side
 

Construct a new Mapping and attempt to load it.

Parameters:
factory The MappingFactory to use.
filename The path to the YML map file.
side The mapping side to construct. Either SOURCE_SIDE or DEST_SIDE.

Mapping::~Mapping  )  [virtual]
 

Destruct the mapping. Closes the mapping if it is open.


Member Function Documentation

side_t Mapping::getSide  )  [inline]
 

virtual bool Mapping::isLoaded  )  [inline, virtual]
 

Check if the mapping is properly loaded.

Returns:
true if it is loaded, false otherwise.

TraceContext * Mapping::getTraceContext  )  [virtual]
 

Return the root trace context. This is a pointer to the top level of the mapping data structure.

Returns:
A pointer to the root TraceContext.

virtual bool Mapping::isOpen  )  [inline, virtual]
 

Check if the mapping is open for communication.

Returns:
true if it is open false otherwise.

bool Mapping::open  )  [virtual]
 

Open the mapping. Will fail if the mapping is not both loaded.

Returns:
true on success, false otherwise.

Reimplemented in FileMapping, MsgQMUXMapping, and SharedMemMapping.

void Mapping::close  )  [virtual]
 

Close the mapping. Calls closeChannel for each of the open channels.

Reimplemented in MsgQMUXMapping, and SharedMemMapping.

virtual bool Mapping::openChannel ChannelMapping channel  )  [protected, pure virtual]
 

Abstract function for opening a ChannelMapping in this Mapping

Parameters:
channel The channel to open.
Returns:
true on success false otherwise

Implemented in FileMapping.

virtual void Mapping::closeChannel ChannelMapping channel  )  [protected, pure virtual]
 

Abstract function for closing a ChannelMapping in this Mapping.

Parameters:
channel The channel to close.

Implemented in FileMapping.

void Mapping::load  )  [protected, virtual]
 

Automaticly called by the constructor. Attempts to load and construct the YML mapping. isLoaded() will return true if it succeded, false otherwise.

bool Mapping::openChannels channelList_t list,
channelList_t::iterator &  it
[protected]
 

A recursive function for opening the channels that assures that if one channels fails to open all others will be closed.

Parameters:
list The channel list.
it The current channel list pointer.
Returns:
true on success, false otherwise.


The documentation for this class was generated from the following files:
Generated on Wed Apr 5 21:04:19 2006 for Sesame by  doxygen 1.4.6