HydraExpress™ C++ API Reference Guide

 
Loading...
Searching...
No Matches
rwsf::MessageInfo Class Reference

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

Public Member Functions

 MessageInfo ()
 MessageInfo (const rwsf::MessageInfo &second)
virtual void clear ()
void clear (const std::string &name)
bool contains (const std::string &name) const
template<typename T>
const T & get (const std::string &name) const
rwsf::Attribute getAttribute (const std::string &name) const
MessageInfooperator= (const rwsf::MessageInfo &second)
template<typename T>
void set (const std::string &name, const T &value)
void setAttribute (const std::string &name, const rwsf::Attribute &attr)
template<typename T>
T & value (const std::string &name)
Public Member Functions inherited from rwsf::HandleBase
bool isValid (void) const
bool operator!= (const HandleBase &second) const
bool operator== (const HandleBase &second) const

Protected Member Functions

MessageInfoImp & body ()
const MessageInfoImp & body () const
Protected Member Functions inherited from rwsf::HandleBase
 HandleBase (BodyBase *body)
 HandleBase (const HandleBase &second)
 HandleBase (StaticCtor)
 HandleBase (void)
virtual ~HandleBase (void)
BodyBase & body (void) const
HandleBaseoperator= (const HandleBase &second)

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

◆ MessageInfo() [1/2]

rwsf::MessageInfo::MessageInfo ( )

Constructs a new rwsf::MessageInfo object.

◆ MessageInfo() [2/2]

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

Copy constructor.

Member Function Documentation

◆ body() [1/2]

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

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

◆ body() [2/2]

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

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

◆ clear() [1/2]

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

Removes all parts in this rwsf::MessageInfo instance.

◆ clear() [2/2]

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

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

◆ contains()

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.

◆ get()

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

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
MessageInfoKeyNotFoundExceptionif the item of type T cannot be converted to type T.

◆ getAttribute()

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.

◆ operator=()

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

Assignment operator.

◆ set()

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

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

◆ setAttribute()

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.

◆ value()

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

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 © 2026 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.