rwlogo
HydraExpress 4.6

HydraExpress C++ API Reference Guide


   


Rogue Wave web site:  Home Page  |  Main Documentation Page

rwsf::MessageInfo Class Reference
[Message Handling]

Provides basic accessors for storing and retrieving generic types associated with a message. More...

#include <rwsf/handlers/MessageInfo.h>

Inheritance diagram for rwsf::MessageInfo:
rwsf::HandleBase rwsf::AgentContext

List of all members.

Public Member Functions

 MessageInfo ()
 MessageInfo (const rwsf::MessageInfo &second)
MessageInfooperator= (const rwsf::MessageInfo &second)
rwsf::Attribute getAttribute (const std::string &name) const
template<typename T >
const T & get (const std::string &name) const
template<typename T >
T & value (const std::string &name)
bool contains (const std::string &name) const
void setAttribute (const std::string &name, const rwsf::Attribute &attr)
template<typename T >
void set (const std::string &name, const T &value)
virtual void clear ()
void clear (const std::string &name)

Protected Member Functions

const MessageInfoImp & body () const
MessageInfoImp & body ()

Detailed Description

rwsf::MessageInfo is a generic data container that is used for communicating state information about a request throughout the Agent. For more information see the chapter on connectors and the chapter on runtime handlers in the User Guide.


Constructor & Destructor Documentation

rwsf::MessageInfo::MessageInfo (  ) 

Constructs a new rwsf::MessageInfo object.

rwsf::MessageInfo::MessageInfo ( const rwsf::MessageInfo second  ) 

Copy constructor.


Member Function Documentation

MessageInfoImp& rwsf::MessageInfo::body (  )  [protected]

Returns the implementation for this rwsf::MessageInfo object. This is a mutable reference to the implementation object.

const MessageInfoImp& rwsf::MessageInfo::body (  )  const [protected]

Returns the implementation for this rwsf::MessageInfo object. This is a const reference to the implementation object.

Reimplemented from rwsf::HandleBase.

void rwsf::MessageInfo::clear ( const std::string &  name  ) 

Removes an item name from the map, if it exists.

virtual void rwsf::MessageInfo::clear (  )  [virtual]

Removes all parts in this rwsf::MessageInfo instance.

bool rwsf::MessageInfo::contains ( const std::string &  name  )  const

Determines if this item contains the specified item of type T with the given name. Returns true if this object contains the specified item of type T, otherwise returns false.

template<typename T >
const T& rwsf::MessageInfo::get ( const std::string &  name  )  const [inline]

Retrieves the item of type T stored with given name name. Type T must be of a convertible type of the original type T used to store the item.

Exceptions:
MessageInfoKeyNotFoundException if the item of type T cannot be converted to type T.
rwsf::Attribute rwsf::MessageInfo::getAttribute ( const std::string &  name  )  const

Retrieves the rwsf::Attribute associated with the given name. If the rwsf::Attribute is not found, the isValid() method of the returned rwsf::Attribute returns false.

MessageInfo& rwsf::MessageInfo::operator= ( const rwsf::MessageInfo second  ) 

Assignment operator.

template<typename T >
void rwsf::MessageInfo::set ( const std::string &  name,
const T &  value 
) [inline]

Sets the item of type T associated with the given name to the given value.

void rwsf::MessageInfo::setAttribute ( const std::string &  name,
const rwsf::Attribute attr 
)

Sets the rwsf::Attribute associated with the given name to the given parameter, attr.

template<typename T >
T& rwsf::MessageInfo::value ( const std::string &  name  )  [inline]

Returns a reference to the item associated with the given name. If an item does not exist a new one is created using the default constructor of the type T, inserted into rwsf::MessageInfo and returned.


Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo are registered trademarks of Rogue Wave Software, and HydraExpress is a trademark of Rogue Wave Software. All other trademarks are the property of their respective owners.