#ifndef LPCR_RESPONSE_EXTENSION_H_ #define LPCR_RESPONSE_EXTENSION_H_ #include #include #include #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 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 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_ */