#include <StateInfo.h>
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::CMSLogger * | log |
const std::string | stateName |
Type | type |
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] |
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().
name |
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.
Type semaine::datatypes::stateinfo::StateInfo::getType | ( | ) | [inline] |
Get the type of state info of this object: AgentState, DialogState, UserState, ContextState, or SystemState.
bool semaine::datatypes::stateinfo::StateInfo::hasInfo | ( | const std::string & | name | ) | [inline] |
Indicate whether the current info set contains an entry for the named information.
name |
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] |
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::map< StateInfo::Type, XPathInfoMapper * > semaine::datatypes::stateinfo::StateInfo::infosByType = getInfosByType() [static] |
const int semaine::datatypes::stateinfo::StateInfo::numTypes = 5 [static] |
const std::string semaine::datatypes::stateinfo::StateInfo::stateName [protected] |
Type semaine::datatypes::stateinfo::StateInfo::type [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] |