Go to the documentation of this file.
36 #include <Ice/Handle.h>
38 #include <type_traits>
48 ICE_API ::Ice::LocalObject*
upCast(::Ice::Properties*);
54 template<
class T,
class =
void>
57 template<
class T,
class =
void>
60 template<
class T,
class =
void>
63 template<
class T,
class =
void>
66 template<
class T,
class =
void>
107 template<
typename PropertyType>
161 std::enable_if_t < std::is_same_v<T, PropertyType>&& !std::is_same_v<T, std::string>,
PropertyDefinition<T>& >
162 map(
const std::map<T, std::string>&
values);
227 template<
class T = PropertyType>
243 template<
class T = PropertyType>
267 const std::string& prefix,
357 PropertyType getValueRequired(
const std::string& prefix,
Ice::PropertiesPtr iceProperties);
363 PropertyType getValueOptional(
const std::string& prefix,
Ice::PropertiesPtr iceProperties);
373 std::string getPropertyValue(
const std::string& prefix,
Ice::PropertiesPtr iceProperties)
const;
380 std::string getRawPropertyValue(
const std::string& prefix,
Ice::PropertiesPtr iceProperties)
const;
398 bool matchRegex(
const std::string&
value)
const;
401 template <
typename T>
402 T processMappedValue(
const T&
value);
405 std::string processMappedValue(
const std::string&
value);
415 void checkLimits(
const std::string& prefix, PropertyType numericValue)
const;
430 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.
ICE_API ::Ice::LocalObject * upCast(::Ice::Properties *)
std::string getDefaultAsString() override
PropertyConstness constness
::IceInternal::Handle< ::Ice::Properties > PropertiesPtr
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)