From 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d Mon Sep 17 00:00:00 2001 From: Jef Date: Tue, 24 Sep 2024 14:54:57 +0200 Subject: Initial community commit --- Src/Wasabi/api/xml/xmlparamsi.h | 52 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 Src/Wasabi/api/xml/xmlparamsi.h (limited to 'Src/Wasabi/api/xml/xmlparamsi.h') diff --git a/Src/Wasabi/api/xml/xmlparamsi.h b/Src/Wasabi/api/xml/xmlparamsi.h new file mode 100644 index 00000000..606c462c --- /dev/null +++ b/Src/Wasabi/api/xml/xmlparamsi.h @@ -0,0 +1,52 @@ +#ifndef __XMLPARAMSI_H +#define __XMLPARAMSI_H + +#include +#include +#include +#include + +/**/ +#include +#include +/*?>*/ + + +class XmlReaderParamsI : public XmlReaderParamsX +{ +public: + XmlReaderParamsI() {} + virtual ~XmlReaderParamsI(); + + DISPATCH(100) const wchar_t *getItemName(int i); + DISPATCH(200) const wchar_t *getItemValue(int i); + DISPATCH(201) const wchar_t *getItemValue(const wchar_t *name); + DISPATCH(202) const wchar_t *enumItemValues(const wchar_t *name, int nb); + DISPATCH(300) int getItemValueInt(const wchar_t *name, int def = 0); + DISPATCH(400) int getNbItems(); + + DISPATCH(500) void addItem(const wchar_t *parm, const wchar_t *value); + DISPATCH(600) void removeItem(const wchar_t *parm); + DISPATCH(700) void replaceItem(const wchar_t *parm, const wchar_t *value); + DISPATCH(800) int findItem(const wchar_t *parm); + + NODISPATCH void addItemSwapValue(const wchar_t *parm, StringW &value); // calling this will destroy your String... here for optimization ... +private: + struct parms_struct + { + parms_struct() : parm(0), ownValue(false) + {} + ~parms_struct() + { + if (ownValue) + FREE((wchar_t *)parm); + } + const wchar_t *parm; + StringW value; + bool ownValue; + }; + PtrList parms_list; +}; + + +#endif -- cgit