1 #ifndef DRIVERTYPE_HPP_INCLUDED
2 #define DRIVERTYPE_HPP_INCLUDED
5 #include <boost/algorithm/string.hpp>
15 namespace DriverType {
37 inline void _getList(std::vector< DriverType >& list) {
39 list.push_back(GTiff);
41 list.push_back(AAIGrid);
42 list.push_back(GRASSASCIIGrid);
47 list.push_back(BIGGIF);
52 list.push_back(E00GRID);
53 list.push_back(Unknown);
56 inline std::string
toString(DriverType
const& type) {
73 ss <<
"GRASSASCIIGrid";
112 inline DriverType
fromString(
const std::string& str) {
134 std::vector< DriverType > list;
136 int len = list.size();
137 for (
int i = 0; i < len; i++) {
138 DriverType item = list[i];
146 inline DriverType fromExtension(
const std::string& extension) {
147 typedef std::map< std::string, DriverType > MapDriverType;
149 std::string tmpExt(extension);
150 boost::to_lower(tmpExt);
154 map[
".tiff"] = GTiff;
159 MapDriverType::const_iterator it;
160 it = map.find(tmpExt);
161 if (it != map.end()) {
168 inline int getCount() {
192 std::vector< DriverType > list;
194 return list.size() - 1;
203 #endif //DRIVERTYPE_HPP_INCLUDED
BooleanOperator fromString(const std::string &string)
Restituisce il valore di un operatore booleano data una stringa che rappresenta il valore dell'operat...
Definition: BooleanOperator.hpp:88
std::string toString(const BooleanOperator &booleanOperator)
Restituisce la stringa che rappresenta il valore di un operatore booleano dato il valore di un operat...
Definition: BooleanOperator.hpp:40