26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_FIELDNAMEVALIDATOR_H 27 #define __TERRALIB_DATAACCESS_INTERNAL_FIELDNAMEVALIDATOR_H 29 #include "../Config.h" 49 FieldNameValidator(
int fieldNameMaxSize,
bool replaceDotForUnderline,
bool replaceSpecialChars);
51 static std::string adjustFieldNameMaxSize(
const std::string& fieldName,
int fieldNameMaxSize);
52 static std::string replaceDotForUnderline(
const std::string& fieldName);
53 static std::string replaceSpecialCharacters(
const std::string& fieldName);
55 bool addFieldName(
const std::string& fieldName);
56 bool addFieldName(
const std::string& fieldName, std::string& adjustedFieldName);
58 bool exists(
const std::string& fieldName)
const;
60 const std::vector<std::string>& getAdjustedNames()
const;
73 #endif // __TERRALIB_DATAACCESS_INTERNAL_FIELDNAMEVALIDATOR_H int m_fieldNameMaxSize
The field name maximum size. -1 means no limit.
This class is responsible for validating field names. It can handle size limits, fix special characte...
std::set< std::string > m_setAdjustedNames
Internal set used to make a fast check to make sure there arent repeated field names.
bool m_replaceSpecialChars
If TRUE, the special chars will be replaced.
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
bool m_replaceDotForUnderline
If TRUE, all 'dots' characters present in a "table.property" format will be replaced by an underline ...
std::vector< std::string > m_vecAdjustedNames
Internal vector containing the ajusted (or the original if no adjustment hasbeen needed) names...