-void yf::CQL_to_RPN::configure(const xmlNode *ptr)
-{
-
- /*
- <filter type="cql_to_rpn">
- <conversion file="pqf.properties"/>
- </filter>
- */
-
- std::string fname;
- for (ptr = ptr->children; ptr; ptr = ptr->next)
- {
- if (ptr->type != XML_ELEMENT_NODE)
- continue;
- if (!strcmp((const char *) ptr->name, "conversion"))
- {
- const struct _xmlAttr *attr;
- for (attr = ptr->properties; attr; attr = attr->next)
- {
- if (!strcmp((const char *) attr->name, "file"))
- fname = mp::xml::get_text(attr);
- else
- throw mp::filter::FilterException(
- "Bad attribute " + std::string((const char *)
- attr->name));
- }
- }
- else
- {
- throw mp::filter::FilterException("Bad element "
- + std::string((const char *)
- ptr->name));
- }
- }
- if (fname.length() == 0)
- {
- throw mp::filter::FilterException("Missing conversion spec for "
- "filter cql_to_rpn");
- }
-
- int error = 0;
- if (!m_p->cql2rpn.parse_spec_file(fname.c_str(), &error))
- {
- throw mp::filter::FilterException("Bad or missing CQL to RPN spec "
- + fname);
- }
-}