#include <map>
#include <string>
#include <iostream>
+#include <vector>
#if defined (_MSC_VER)
#pragma warning( push )
* <li> <mlp key/> </li>
* <li> <mlpif key> stuff </mlpif></li>
* <li> <mlpifnot key> stuff </mlpifnot></li>
+ * <li> <mlpfor key> stuff </mlpfor></li>
* </ul>
*
* The default tag prefix is "mlp". This can be overridden for
* Allows callers to supply a more dynamic lookup mechanism to supplement a basic map.
*/
class XMLTOOL_API TemplateParameters {
- MAKE_NONCOPYABLE(TemplateParameters);
+ // MAKE_NONCOPYABLE(TemplateParameters);
public:
TemplateParameters() : m_request(NULL) {}
virtual ~TemplateParameters() {}
/** Map of known parameters to supply to template. */
std::map<std::string,std::string> m_map;
+ std::map<std::string,std::vector<TemplateParameters> > m_collectionMap;
/** Request from client that resulted in template being processed. */
const GenericRequest* m_request;
std::map<std::string,std::string>::const_iterator i=m_map.find(name);
return (i!=m_map.end() ? i->second.c_str() : (m_request ? m_request->getParameter(name) : NULL));
}
+
+ /**
+ * Returns the collection of parameters to plug into the template.
+ *
+ * @param name name of parameter collection
+ * @return vector of parameters
+ */
+ virtual const std::vector<TemplateParameters> getParameterCollection(const char* name) const {
+ std::map<std::string,std::vector<TemplateParameters> >::const_iterator i=m_collectionMap.find(name);
+ return (i->second);
+ }
};
/**
const XMLToolingException* e
) const;
- std::string keytag,iftag,ifendtag,ifnottag,ifnotendtag;
+ std::string keytag,iftag,ifendtag,ifnottag,ifnotendtag,fortag,forendtag;
};
};