Go to the documentation of this file.
36 #include <Ice/Handle.h>
38 #include <type_traits>
53 template<
class T,
class =
void>
56 template<
class T,
class =
void>
59 template<
class T,
class =
void>
62 template<
class T,
class =
void>
65 template<
class T,
class =
void>
106 template<
typename PropertyType>
160 std::enable_if_t < std::is_same_v<T, PropertyType>&& !std::is_same_v<T, std::string>,
PropertyDefinition<T>& >
161 map(
const std::map<T, std::string>&
values);
226 template<
class T = PropertyType>
242 template<
class T = PropertyType>
266 const std::string& prefix,
356 PropertyType getValueRequired(
const std::string& prefix,
Ice::PropertiesPtr iceProperties);
362 PropertyType getValueOptional(
const std::string& prefix,
Ice::PropertiesPtr iceProperties);
372 std::string getPropertyValue(
const std::string& prefix,
Ice::PropertiesPtr iceProperties)
const;
379 std::string getRawPropertyValue(
const std::string& prefix,
Ice::PropertiesPtr iceProperties)
const;
397 bool matchRegex(
const std::string&
value)
const;
400 template <
typename T>
401 T processMappedValue(
const T&
value);
404 std::string processMappedValue(
const std::string&
value);
414 void checkLimits(
const std::string& prefix, PropertyType numericValue)
const;
429 template <
typename T>
PropertyType getValue(const std::string &prefix, Ice::PropertiesPtr)
bool expandEnvVars
Exand environments variables indicator (standard: true)
float PropertyDefinition_lexicalCastTo< float >(std::string const &input)
std::string getMatchRegex() const
unsigned long PropertyDefinition_lexicalCastTo< unsigned long >(std::string const &input)
Common interface of any property definition.
PropertyValuesMap & getValueMap()
T PropertyDefinition_lexicalCastTo(std::string const &input)
PropertyType * setterRef
Reference to a variable to set.
bool stringRemoveQuotes
Remove leading and trailing quotes indicator (standard: true) First and last character of a string pr...
PropertyDefinition< PropertyType > & setMax(std::array< T, 1 > max)
const VariantContainerType Map
std::string getPropertyName() const
std::map< std::string, ValueEntry > PropertyValuesMap
PropertyDefinition(PropertyType *setterRef, const std::string &propertyName, const std::string &description, PropertyDefinitionBase::PropertyConstness constness=PropertyDefinitionBase::eConstant)
Constructs a property definition of a required property.
PropertyDefinition< PropertyType > & setExpandEnvironmentVariables(bool expand)
Sets whether for string values environment varbiale expanding should be considered.
long PropertyDefinition_lexicalCastTo< long >(std::string const &input)
std::enable_if_t< meta::properties::MapPropertyValuePlugin< T >::value, PropertyDefinition< PropertyType > & > map(const T &values)
PropertyDefinition< PropertyType > & setMin(double min)
Sets the min allowed numeric value.
bool isCaseInsensitive() const
double min
Lower bound of numeric values (used for numeric value retrieval without mapping)
bool caseInsensitive
Case sensitivity indicator.
std::shared_ptr< Value > value()
std::pair< std::string, PropertyType > ValueEntry
int PropertyDefinition_lexicalCastTo< int >(std::string const &input)
PropertyFactoryFunction getFactory() const
PropertyDefinition< PropertyType > & setRemoveQuotes(bool removeQuotes)
Sets whether for string values leading and trailing quotes should be removed.
double max
Upper bound of numeric values (used for numeric value retrieval without mapping)
PropertyFactoryFunction factory
Builder function.
ReaderT::InputType & input
std::string PropertyDefinition_lexicalCastToString(float input)
bool PropertyDefinition_lexicalCastTo< bool >(std::string const &input)
std::string toString(PropertyDefinitionFormatter &formatter, const std::string &value) override
unsigned char PropertyDefinition_lexicalCastTo< unsigned char >(std::string const &input)
bool expandEnvironmentVariables() const
PropertyType getDefaultValue()
std::string getDescription() const
PropertyType defaultValue
Fallback/Default property value.
bool isSet(const std::string &prefix, Ice::PropertiesPtr iceProperties) const
PropertyDefinition< PropertyType > & setMin(std::array< T, 1 > min)
PropertyDefinition< PropertyType > & setMatchRegex(const std::string &expr)
Sets the regular expression which the value has to be matched with.
bool removeQuotes() const
std::shared_ptr< PropertyType > PropertyTypePtr
std::string propertyName
Property name.
std::string getDefaultAsString() override
PropertyConstness constness
PropertyDefinition< PropertyType > & setCaseInsensitive(bool isCaseInsensitive)
Sets whether the property value matching is case insensitive.
std::string regex
Regular expression to approve a required value pattern.
PropertyDefinition< PropertyType > & setFactory(const PropertyFactoryFunction &func)
Sets the factory function that creates the specified template type from the actual string value.
unsigned int PropertyDefinition_lexicalCastTo< unsigned int >(std::string const &input)
char PropertyDefinition_lexicalCastTo< char >(std::string const &input)
PropertyDefinition< PropertyType > & setMax(double max)
Sets the max allowed numeric value.
std::string description
Property description.
PropertyValuesMap propertyValuesMap
Main property map.
PropertyDefinition defines a property that will be available within the PropertyUser.
std::function< PropertyType(std::string)> PropertyFactoryFunction
virtual void writeValueToSetter(const std::string &prefix, Ice::PropertiesPtr) override
This file offers overloads of toIce() and fromIce() functions for STL container types.
PropertyDefinition< PropertyType > & map(const std::string &valueString, PropertyType value)
Maps a string value onto a value of the specified template type.
double PropertyDefinition_lexicalCastTo< double >(std::string const &input)