Dev Essential  1.6.3
Loading...
Searching...
No Matches
ddl::mapping::Property Class Reference

Property class representing a pair of value and its type. More...

#include <mapper_interfaces.h>

Public Member Functions

 Property ()=default
 CTOR.
 
 Property (const Property &)=default
 copy CTOR
 
 Property (Property &&)=default
 move CTOR
 
Propertyoperator= (const Property &)=default
 copy assignment
 
Propertyoperator= (Property &&)=default
 move assignment
 
 Property (std::string value, std::string type)
 CTOR.
 
template<typename T, std::enable_if_t< std::is_unsigned< T >::value &&!std::is_same< T, bool >::value, bool > = true>
 Property (T value)
 CTOR for unsigned integer value (uint8-uint64) and "unsigned" type.
 
template<typename T, std::enable_if_t< std::is_integral< T >::value &&std::is_signed< T >::value, bool > = true>
 Property (T value)
 CTOR for signed integer value (int8-int64) and "signed" type.
 
template<typename T, std::enable_if_t< std::is_floating_point< T >::value, bool > = true>
 Property (T value)
 CTOR for double or float value and "float" type.
 
template<typename T, std::enable_if_t< std::is_same< T, bool >::value, bool > = true>
 Property (T value)
 CTOR for bool value and "bool" type.
 
 Property (std::string_view string_value)
 CTOR for string value and "string" type.
 
const std::string & getValue () const
 Get the value as string.
 
const std::string & getType () const
 Get the value type as string.
 

Detailed Description

Property class representing a pair of value and its type.

Constructor & Destructor Documentation

◆ Property() [1/6]

ddl::mapping::Property::Property ( std::string value,
std::string type )
inline

CTOR.

Parameters
valueThe value as string
typeThe type as string.
Remarks
The type identifier is not concretely determined, but we recommend to use the PropertyValue CTOR to create an instance of PropertyValue

◆ Property() [2/6]

template<typename T, std::enable_if_t< std::is_unsigned< T >::value &&!std::is_same< T, bool >::value, bool > = true>
ddl::mapping::Property::Property ( T value)
inline

CTOR for unsigned integer value (uint8-uint64) and "unsigned" type.

Parameters
valueThe value to set

◆ Property() [3/6]

template<typename T, std::enable_if_t< std::is_integral< T >::value &&std::is_signed< T >::value, bool > = true>
ddl::mapping::Property::Property ( T value)
inline

CTOR for signed integer value (int8-int64) and "signed" type.

Parameters
valueThe value to set

◆ Property() [4/6]

template<typename T, std::enable_if_t< std::is_floating_point< T >::value, bool > = true>
ddl::mapping::Property::Property ( T value)
inline

CTOR for double or float value and "float" type.

Parameters
valueThe value to set

◆ Property() [5/6]

template<typename T, std::enable_if_t< std::is_same< T, bool >::value, bool > = true>
ddl::mapping::Property::Property ( T value)
inline

CTOR for bool value and "bool" type.

Parameters
valueThe value to set

◆ Property() [6/6]

ddl::mapping::Property::Property ( std::string_view string_value)
inline

CTOR for string value and "string" type.

Parameters
string_valueThe value to set

Member Function Documentation

◆ getType()

const std::string & ddl::mapping::Property::getType ( ) const
inline

Get the value type as string.

Returns
const std::string&

◆ getValue()

const std::string & ddl::mapping::Property::getValue ( ) const
inline

Get the value as string.

Returns
const std::string&

◆ operator=() [1/2]

Property & ddl::mapping::Property::operator= ( const Property & )
default

copy assignment

Returns
Property&

◆ operator=() [2/2]

Property & ddl::mapping::Property::operator= ( Property && )
default

move assignment

Returns
Property&

The documentation for this class was generated from the following file: