21 #ifndef otbMetadataSupplierInterface_h
22 #define otbMetadataSupplierInterface_h
24 #include "OTBMetadataExport.h"
29 #include <boost/algorithm/string.hpp>
43 const std::array<std::string, 3> TRUES = {
"1",
"true",
"True"};
44 const std::array<std::string, 3> FALSES = {
"0",
"false",
"False"};
45 virtual std::string GetResourceFile(std::string
const& =
"")
const = 0;
48 return std::vector<std::string>{this->GetResourceFile()};
56 virtual std::string GetMetadataValue(std::string
const& path,
bool& hasValue,
int band=-1)
const = 0;
58 bool HasValue(std::string
const& path,
int band=-1)
const;
60 virtual int GetNbBands()
const = 0;
62 template <
typename T> T GetAs(T
const& defaultValue, std::string
const& path,
int band=-1)
const;
64 template <
typename T> T GetAs(std::string
const& path,
int band=-1)
const;
69 template <
typename T> std::vector<T> GetAsVector(std::string
const& path,
char sep=
' ',
int size=-1,
int band=-1)
const;
72 virtual unsigned int GetNumberOf(std::string
const& path)
const = 0;
75 virtual unsigned int GetAttributId(std::string
const& path, std::string
const& value)
const = 0;
85 #ifndef OTB_MANUAL_INSTANTIATION