27 #include "../../../common/Translator.h" 
   28 #include "../../../fe/BinaryOperator.h" 
   29 #include "../../../fe/Expression.h" 
   30 #include "../../../fe/Globals.h" 
   31 #include "../../../fe/Literal.h" 
   32 #include "../../../fe/PropertyName.h" 
   33 #include "../../../xml/Reader.h" 
   34 #include "../../../xml/Writer.h" 
   35 #include "../../Exception.h" 
   42 #include <boost/format.hpp> 
   63   ExpressionFnctIdxType::const_iterator it = m_fncts.find(name);
 
   65   if(it == m_fncts.end())
 
   66     throw Exception((boost::format(
TE_TR(
"Could not find a reader for the following expression type: %1%.")) % name).str());
 
   70   return it->second(reader);
 
   78   if(m_writer != &writer)
 
   86   std::string name = 
"ogc:";
 
   89   m_writer->writeStartElement(name);
 
   99   m_writer->writeEndElement(name);
 
  109   m_writer->writeElement(
"ogc:Literal", visited.
getValue());
 
  115   m_writer->writeElement(
"ogc:PropertyName", visited.
getName());
 
  157   std::auto_ptr<te::fe::BinaryOperator> exp(op);
 
  168   return exp.release();
 
  188       exp->setValue(value);
 
  195     return exp.release();
 
  200   exp->setValue(value);
 
  205   return exp.release();
 
  224   return exp.release();
 
const std::string & getName() const 
It returns the property name. 
 
boost::function< te::fe::Expression *(te::xml::Reader &)> ExpressionReadFnctType
 
static const char * sm_mul
 
ExpressionFnctIdxType m_fncts
 
This class models a XML reader object. 
 
void visit(const te::fe::BinaryOperator &visited)
 
te::fe::Expression * read(te::xml::Reader &reader) const 
 
This class models a XML writer object. 
 
#define TE_TR(message)
It marks a string in order to get translated. 
 
virtual std::string getElementLocalName() const =0
It returns the local part of the element name in the case of an element node. 
 
static const char * sm_div
 
A function is a named procedure that performs a distinct computation. 
 
This class can be used to represent binary operation expressions. 
 
static T & getInstance()
It returns a reference to the singleton instance. 
 
This class is used to encode the name of any property of an object. 
 
This is an abstract class that models a Filter Encoding expression. 
 
Expression * getSecond() const 
It returns the second operand. 
 
Expression * getFirst() const 
It returns the first operand. 
 
This is an abstract class that models a Filter Encoding expression. 
 
static const char * sm_add
 
This class can be used to represent literal values. 
 
static const char * sm_sub
 
virtual ReturnType accept(VisitorType &guest) const =0
It call the visit method from the guest object. 
 
virtual NodeType getNodeType() const =0
It return the type of node read. 
 
void reg(const std::string &expName, const ExpressionReadFnctType &fnct)
 
virtual std::string getElementValue() const =0
It returns the element data value in the case of VALUE node. 
 
te::fe::Expression * LiteralReader(te::xml::Reader &reader)
 
void write(const te::fe::Expression *exp, te::xml::Writer &writer)
 
const std::string & getValue() const 
It returns the literal value. 
 
te::fe::Expression * BinaryOperatorReader(te::xml::Reader &reader)
 
const char * getName() const 
It returns the operator name. 
 
virtual bool next()=0
It gets the next event to be read. 
 
te::fe::Expression * PropertyNameReader(te::xml::Reader &reader)