semaine::datatypes::stateinfo Namespace Reference

Classes

class  AgentStateInfo
class  ContextStateInfo
class  DialogStateInfo
class  NamespaceContext
class  StateInfo
class  SystemStateInfo
class  UserStateInfo
class  XPathInfoMapper

Functions

void trim (std::string &str, const std::locale &loc=std::locale())
std::vector< std::string > tokenize (const std::string &str, const std::string &delimiters=" ")
std::vector< std::vector
< std::string > > 
splitXPathIntoParts (const std::string &expr) throw (semaine::cms::exceptions::SystemConfigurationException)
XPathInfoMappergetXPathExpressions (StateInfo::Type &type, const std::list< std::string > &configSection) throw (semaine::cms::exceptions::SystemConfigurationException)
const std::map
< StateInfo::Type,
XPathInfoMapper * > 
getInfosByType ()

Function Documentation

const std::map<StateInfo::Type, XPathInfoMapper *> semaine::datatypes::stateinfo::getInfosByType (  ) 
XPathInfoMapper* semaine::datatypes::stateinfo::getXPathExpressions ( StateInfo::Type &  type,
const std::list< std::string > &  configSection 
) throw (semaine::cms::exceptions::SystemConfigurationException)
std::vector< std::vector<std::string> > semaine::datatypes::stateinfo::splitXPathIntoParts ( const std::string &  expr  )  throw (semaine::cms::exceptions::SystemConfigurationException)

The given string is interpreted as a limited subset of XPath expressions and split into parts. Each part except the last one is expected to follow precisely the following form: "/" ( prefix ":" ) ? localname ( "[" "@" attName "=" "'" attValue "'" "]" ) ? The last part must be either "/" "text()" or "/" "@" attributeName .

Parameters:
expr the string to be split as an xpath expression
Returns:
an array of string arrays. All except the last entry in this array is guaranteed to have four elements, with the meaning:
  • [0]: prefix (can be the empty string)
  • [1]: localname (guaranteed not to be empty)
  • [2]: attributeName (can be empty)
  • [3]: attributeValue (is guaranteed to be empty when attributeName is empty; when attributeName is non-empty, and attributeValue is empty, then the attribute must be present but there are no constraints about its value)
The last element in the returned array has either length 1 or length 0. If it is of length 0, then the XPath expression ended in "text()", i.e. the value to be referenced is the text content of the enclosing Element; if it is of length 1, the String contained is guaranteed to be non-null and represents the name of the attribute to be referenced on the enclosing Element.
Exceptions:
SystemConfigurationException if expr does not match the expected format.
std::vector<std::string> semaine::datatypes::stateinfo::tokenize ( const std::string &  str,
const std::string &  delimiters = " " 
)
void semaine::datatypes::stateinfo::trim ( std::string &  str,
const std::locale &  loc = std::locale() 
)
Generated on Tue Dec 14 17:13:18 2010 for SEMAINE by  doxygen 1.6.3