semaine::datatypes::stateinfo::StateInfo Class Reference

#include <StateInfo.h>

Inheritance diagram for semaine::datatypes::stateinfo::StateInfo:
semaine::datatypes::stateinfo::AgentStateInfo semaine::datatypes::stateinfo::ContextStateInfo semaine::datatypes::stateinfo::DialogStateInfo semaine::datatypes::stateinfo::SystemStateInfo semaine::datatypes::stateinfo::UserStateInfo

List of all members.

Public Types

enum  Type {
  AgentState, DialogState, UserState, ContextState,
  SystemState
}

Public Member Functions

 StateInfo (const std::map< std::string, std::string > &infoItems, const std::string &whatState, Type type) throw (semaine::cms::exceptions::SystemConfigurationException)
virtual ~StateInfo ()
Type getType ()
const std::map< std::string,
std::string > & 
getInfos ()
bool hasInfo (const std::string &name)
const std::string getInfo (const std::string &name)
void setInfo (const std::string &name, const std::string &value) throw (semaine::cms::exceptions::SystemConfigurationException)
XERCES_CPP_NAMESPACE::DOMDocument * getDocument () throw (semaine::cms::exceptions::SystemConfigurationException)
const std::string & toString ()
const std::string & getAPIVersion ()

Static Public Attributes

static const std::string APIVersion = "0.2"
static const Type Types [] = { StateInfo::AgentState, StateInfo::DialogState, StateInfo::UserState, StateInfo::ContextState, StateInfo::SystemState }
static const int numTypes = 5
static const std::string TypeNames [] = {"AgentState", "DialogState", "UserState", "ContextState", "SystemState" }
static const std::map< Type,
XPathInfoMapper * > 
infosByType = getInfosByType()

Protected Member Functions

 StateInfo (XERCES_CPP_NAMESPACE::DOMDocument *doc, const std::string &whatState, const std::string &rootName, const std::string &rootNamespace, Type type) throw (semaine::cms::exceptions::MessageFormatException, semaine::cms::exceptions::SystemConfigurationException)
virtual void createDocumentFromInfo () throw (semaine::cms::exceptions::SystemConfigurationException)
virtual void analyseDocument (const std::string &rootName, const std::string &rootNamespace) throw (semaine::cms::exceptions::MessageFormatException, semaine::cms::exceptions::SystemConfigurationException)

Protected Attributes

std::map< std::string,
std::string > 
info
XERCES_CPP_NAMESPACE::DOMDocument * doc
semaine::cms::CMSLoggerlog
const std::string stateName
Type type

Member Enumeration Documentation

Enumerator:
AgentState 
DialogState 
UserState 
ContextState 
SystemState 

Constructor & Destructor Documentation

semaine::datatypes::stateinfo::StateInfo::StateInfo ( const std::map< std::string, std::string > &  infoItems,
const std::string &  whatState,
Type  type 
) throw (semaine::cms::exceptions::SystemConfigurationException)
semaine::datatypes::stateinfo::StateInfo::~StateInfo (  )  [virtual]
semaine::datatypes::stateinfo::StateInfo::StateInfo ( XERCES_CPP_NAMESPACE::DOMDocument *  doc,
const std::string &  whatState,
const std::string &  rootName,
const std::string &  rootNamespace,
Type  type 
) throw (semaine::cms::exceptions::MessageFormatException, semaine::cms::exceptions::SystemConfigurationException) [protected]

Member Function Documentation

void semaine::datatypes::stateinfo::StateInfo::analyseDocument ( const std::string &  rootName,
const std::string &  rootNamespace 
) throw (semaine::cms::exceptions::MessageFormatException, semaine::cms::exceptions::SystemConfigurationException) [protected, virtual]
void semaine::datatypes::stateinfo::StateInfo::createDocumentFromInfo (  )  throw (semaine::cms::exceptions::SystemConfigurationException) [protected, virtual]
const std::string& semaine::datatypes::stateinfo::StateInfo::getAPIVersion (  )  [inline]
DOMDocument * semaine::datatypes::stateinfo::StateInfo::getDocument (  )  throw (semaine::cms::exceptions::SystemConfigurationException)
const std::string semaine::datatypes::stateinfo::StateInfo::getInfo ( const std::string &  name  )  [inline]

Get the named information, or the empty string if there is no such information. To distinguish whether the info is present and has the empty string as its value or whether the info is not present, use hasInfo().

Parameters:
name 
Returns:
const std::map<std::string, std::string>& semaine::datatypes::stateinfo::StateInfo::getInfos (  )  [inline]

Provide a read-only access to the information in this message. The map contains as keys all information that can be known according to the API version, and as non-null values the values taken from the message. Values for information items not contained in the message will be null.

Returns:
a map with string keys and string values.
Type semaine::datatypes::stateinfo::StateInfo::getType (  )  [inline]

Get the type of state info of this object: AgentState, DialogState, UserState, ContextState, or SystemState.

Returns:
bool semaine::datatypes::stateinfo::StateInfo::hasInfo ( const std::string &  name  )  [inline]

Indicate whether the current info set contains an entry for the named information.

Parameters:
name 
Returns:
void semaine::datatypes::stateinfo::StateInfo::setInfo ( const std::string &  name,
const std::string &  value 
) throw (semaine::cms::exceptions::SystemConfigurationException)
const std::string& semaine::datatypes::stateinfo::StateInfo::toString (  )  [inline]

Member Data Documentation

const std::string semaine::datatypes::stateinfo::StateInfo::APIVersion = "0.2" [static]
XERCES_CPP_NAMESPACE::DOMDocument* semaine::datatypes::stateinfo::StateInfo::doc [protected]
std::map<std::string, std::string> semaine::datatypes::stateinfo::StateInfo::info [protected]
const std::string semaine::datatypes::stateinfo::StateInfo::TypeNames = {"AgentState", "DialogState", "UserState", "ContextState", "SystemState" } [static]
const StateInfo::Type semaine::datatypes::stateinfo::StateInfo::Types = { StateInfo::AgentState, StateInfo::DialogState, StateInfo::UserState, StateInfo::ContextState, StateInfo::SystemState } [static]

The documentation for this class was generated from the following files:
Generated on Tue Dec 14 17:13:19 2010 for SEMAINE by  doxygen 1.6.3