27 #include "../../common/STLUtils.h"
28 #include "../../common/Translator.h"
29 #include "../Exception.h"
41 throw Exception(
TE_TR(
"There is already a function registered with the given name!"));
43 m_regFunctions.insert(std::map<std::string, SQLFunctionEncoder*>::value_type(funcName, encoder));
53 std::vector<std::string> vec;
55 std::map<std::string, te::da::SQLFunctionEncoder*>::const_iterator it= m_regFunctions.begin();
57 while(it != m_regFunctions.end())
59 vec.push_back(it->first);
A base class for encoders of SQL function expressions.
V * GetPValue(const std::map< K, V * > &m, const K &k)
It finds for a given key in the map and returns a pointer if something is found or NULL otherwise...
const SQLFunctionEncoder * find(const std::string &funcName) const
It searches for an encoder for the given function.
It represents the SQL query dialect accepted by a given data source.
#define TE_TR(message)
It marks a string in order to get translated.
void insert(const std::string &funcName, SQLFunctionEncoder *encoder)
It adds a new encoder for a given function.
std::map< std::string, SQLFunctionEncoder * > m_regFunctions
A map from the TerraLib general name to a given SQL formatter.
std::vector< std::string > getRegisteredNames() const
It gets the all registered names from registed functions.
void FreeContents(boost::unordered_map< K, V * > &m)
This function can be applied to a map of pointers. It will delete each pointer in the map...
A base class for encoders of SQL function expressions.