ADTF
Loading...
Searching...
No Matches
ddl::mapping::datamodel::ParameterValue Class Reference

Datamodel parameter value class used within Assignment. More...

#include <datamodel_configuration_items.h>

Inherits ddl::utility::TypeAccessListSubject< ParameterValue >, and ddl::dd::datamodel::InfoMap.

Classes

struct  ConstValue
 ConstValue type of the parameter. More...
 
struct  InternalValue
 InternalValue type of the parameter. More...
 
struct  SourceValue
 SourceValue type of the parameter. More...
 

Public Types

enum class  Type { source_value , const_value , internal_value }
 Type of the parameter value. More...
 

Public Member Functions

 ParameterValue ()=delete
 no CTOR
 
 ParameterValue (const ParameterValue &other)
 copy CTOR
 
 ParameterValue (ParameterValue &&other)
 move CTOR
 
 ParameterValue (const std::string &name, const SourceValue &source_value)
 CTOR.
 
 ParameterValue (const std::string &name, const ConstValue &const_value)
 CTOR.
 
 ParameterValue (const std::string &name, const InternalValue &internal_value)
 CTOR.
 
 ~ParameterValue ()
 DTOR.
 
ParameterValue & operator= (const ParameterValue &other)
 copy operator
 
ParameterValue & operator= (ParameterValue &&other)
 move operator, which assigns like the copy operator
 
bool operator== (const ParameterValue &other) const
 equality operator
 
bool operator!= (const ParameterValue &other) const
 inequality operator
 
Type getType () const
 Get the type.
 
const std::string & getName () const
 Get the name.
 
void setName (const std::string &name)
 Set the name.
 
SourceValue getSourceValue () const
 Get the source value if type is set to Type::source_value.
 
void setAsSourceValue (const SourceValue &source_value)
 Set the as source value.
 
ConstValue getConstValue () const
 Get the const value if type is set to Type::const_value.
 
void setAsConstValue (const ConstValue &const_value)
 Set the as const value.
 
InternalValue getInternalValue () const
 Get the internal value if type is set to Type::internal_value.
 
void setAsInternalValue (const InternalValue &internal_value)
 Set the as internal value.
 
- Public Member Functions inherited from ddl::dd::datamodel::InfoMap
 InfoMap ()=default
 CTOR.
 
 InfoMap (const InfoMap &)
 copy CTOR
 
 InfoMap (InfoMap &&)
 move CTOR
 
InfoMap & operator= (const InfoMap &)
 copy assignment operator
 
InfoMap & operator= (InfoMap &&)
 move assignment operator
 
template<typename INFO_T>
const INFO_T * getInfo () const noexcept
 Get the Info Pointer.
 
template<typename INFO_T>
INFO_T * getInfo () noexcept
 Get the Info Pointer.
 
template<typename INFO_T>
void setInfo (const std::shared_ptr< INFO_T > &info)
 Set the Info object as shared pointer.
 

Detailed Description

Datamodel parameter value class used within Assignment.

Remarks
This class is observable within ddl::utility::TypeAccessList

Member Enumeration Documentation

◆ Type

Type of the parameter value.

Enumerator
source_value 

The parameter value is a source value.

See also
ParameterValue::getSourceValue, SourceValue
const_value 

The parameter value is a const value.

See also
ParameterValue::getConstValue, ConstValue
internal_value 

The parameter value is a const value.

See also
ParameterValue::getInternalValue, InternalValue

Constructor & Destructor Documentation

◆ ParameterValue() [1/5]

ddl::mapping::datamodel::ParameterValue::ParameterValue ( const ParameterValue & other)

copy CTOR

Parameters
otherthe object to copy

◆ ParameterValue() [2/5]

ddl::mapping::datamodel::ParameterValue::ParameterValue ( ParameterValue && other)

move CTOR

Parameters
otherthe object to move

◆ ParameterValue() [3/5]

ddl::mapping::datamodel::ParameterValue::ParameterValue ( const std::string & name,
const SourceValue & source_value )

CTOR.

the type will be set to Type::source_value

Parameters
namethe name
source_valuethe parameter as source value

◆ ParameterValue() [4/5]

ddl::mapping::datamodel::ParameterValue::ParameterValue ( const std::string & name,
const ConstValue & const_value )

CTOR.

the type will be set to Type::const_value

Parameters
namethe name
const_valuethe parameter as const value

◆ ParameterValue() [5/5]

ddl::mapping::datamodel::ParameterValue::ParameterValue ( const std::string & name,
const InternalValue & internal_value )

CTOR.

the type will be set to Type::internal_value

Parameters
namethe name
internal_valuethe parameter as internal value

Member Function Documentation

◆ getConstValue()

ConstValue ddl::mapping::datamodel::ParameterValue::getConstValue ( ) const

Get the const value if type is set to Type::const_value.

Returns
ConstValue
See also
getType

◆ getInternalValue()

InternalValue ddl::mapping::datamodel::ParameterValue::getInternalValue ( ) const

Get the internal value if type is set to Type::internal_value.

Returns
InternalValue
See also
getType

◆ getName()

const std::string & ddl::mapping::datamodel::ParameterValue::getName ( ) const

Get the name.

Returns
const std::string&

◆ getSourceValue()

SourceValue ddl::mapping::datamodel::ParameterValue::getSourceValue ( ) const

Get the source value if type is set to Type::source_value.

Returns
SourceValue
See also
getType

◆ getType()

Type ddl::mapping::datamodel::ParameterValue::getType ( ) const

Get the type.

◆ operator!=()

bool ddl::mapping::datamodel::ParameterValue::operator!= ( const ParameterValue & other) const

inequality operator

Parameters
otherthe other object to compare
Returns
true is not equal
false is equal

◆ operator=() [1/2]

ParameterValue & ddl::mapping::datamodel::ParameterValue::operator= ( const ParameterValue & other)

copy operator

Assigns the values through the setters, so an owning list is notified of each change like for the setters. The name is assigned first with setName, and if the list refuses it, the value stays unchanged.

Parameters
otherthe object to copy
Returns
ParameterValue&
Exceptions
ddl::dd::Errorif the value is in a list that has another item of the name

◆ operator=() [2/2]

ParameterValue & ddl::mapping::datamodel::ParameterValue::operator= ( ParameterValue && other)

move operator, which assigns like the copy operator

Parameters
otherthe object to move
Returns
ParameterValue&
Exceptions
ddl::dd::Errorif the value is in a list that has another item of the name

◆ operator==()

bool ddl::mapping::datamodel::ParameterValue::operator== ( const ParameterValue & other) const

equality operator

Parameters
otherthe other object to compare
Returns
true is equal
false is not equal

◆ setAsConstValue()

void ddl::mapping::datamodel::ParameterValue::setAsConstValue ( const ConstValue & const_value)

Set the as const value.

the type will be set to Type::const_value

Parameters
const_valuethe const value to set
Remarks
This change is observable, the additional_info is set to "values"!

◆ setAsInternalValue()

void ddl::mapping::datamodel::ParameterValue::setAsInternalValue ( const InternalValue & internal_value)

Set the as internal value.

the type will be set to Type::internal_value

Parameters
internal_valuethe internal value to set
Remarks
This change is observable, the additional_info is set to "values"!

◆ setAsSourceValue()

void ddl::mapping::datamodel::ParameterValue::setAsSourceValue ( const SourceValue & source_value)

Set the as source value.

the type will be set to Type::source_value

Parameters
source_valuethe source value to set
Remarks
This change is observable, the additional_info is set to "values"!

◆ setName()

void ddl::mapping::datamodel::ParameterValue::setName ( const std::string & name)

Set the name.

Parameters
namethe name
Remarks
This change is observable

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