DRDE/ACTK1_0/se/LPE/LPCrtRespExtension.hpp

67 lines
1.6 KiB
C++
Raw Normal View History

2014-01-25 17:30:04 +00:00
#ifndef LPCR_RESPONSE_EXTENSION_H_
#define LPCR_RESPONSE_EXTENSION_H_
#include <set>
#include <string>
#include <se/ResponseExtension.hpp>
#include "Drafttanepplaunchphase.hpp"
class XMLDocument;
class LPCrtRespExtension : public ResponseExtension
{
public:
LPCrtRespExtension();
virtual void fromXML(XMLDocument *xmlDoc);
virtual bool isInitialised() const;
/**
* Retrieves the names of all key-value lists that have been added to the
* object.
*
* @return the set of list names
*/
const std::set<std::string> getLists() const;
/**
* Retrieves the names of all item keys, for a specified key-value list
* name.
*
* @param listName
* the name of the key-value list
*
* @return the set of item keys
*/
const std::set<std::string> getListItems(const std::string &listName) const;
/**
* Retrieves the value of a given key-value item.
*
* @param listName
* the name of the key-value list
* @param key
* the key of the item
*
* @return the value of the item
*/
const std::string getItem(const std::string &listName, const std::string &key) const;
private:
const KeyValueList createKVList(
XMLDocument *xmlDoc,
const std::string &kvListXPath);
bool initialised;
ExtensionList kvLists;
static const std::string KVLIST_EXPR();
};
inline bool LPCrtRespExtension::isInitialised() const
{
return initialised;
}
#endif /* LPCK_RESPONSE_EXTENSION_H_ */