ADTF  3.14.3
property_value< T >
Inheritance diagram for property_value< T >:
[legend]

Public Member Functions

 property_value (const property_value &oValue)
 
 property_value (property_value &&oValue)
 
property_valueoperator= (const property_value &oValue)
 
property_valueoperator= (property_value &&oValue)
 
 property_value (const T &oValue)
 
void Release ()
 
const property_valueoperator= (const T &oValue)
 
bool operator== (const T &oValue) const
 
const T & GetValue () const
 
tResult Set (const IPropertyValue &oValue)
 Sets the value by a deep copy. More...
 
tResult GetType (IString &&strType) const
 Retrieves the string for the property value type. More...
 
tResult ToRaw (IRawMemory &&oToMem) const
 Implement to create a fast value copy in memory. More...
 
tResult FromRaw (const IRawMemory &oFromMem)
 Implement to create a fast value copy in memory. More...
 
tResult ToString (IString &&oStringValue) const
 Implement to serialize the value to a textfile and/or to show it on a display. More...
 
tResult FromString (const IString &oStringValue)
 Implement to deserialize the value from a textfile and/or to set by string. More...
 

Protected Attributes

m_oValue
 

Additional Inherited Members

- Protected Member Functions inherited from IRawValue
virtual ~IRawValue ()=default
 protected DTOR
 

Detailed Description

template<typename T>
class adtf::base::ant::property_value< T >

Definition at line 205 of file property.h.

Member Function Documentation

◆ FromRaw()

tResult FromRaw ( const IRawMemory oRawValue)
inlinevirtual

Implement to create a fast value copy in memory.

Usually this method is called if types are equal implementation is within the same binary!

Parameters
oRawValue[in] Memory representation of the value
Return values
ERR_NOERRORSuccessfully copied.
ERR_MEMORYYou have to return ERR_MEMORY if size of oRawValue does not fit !!
any_errorDepends on the implementation.

Implements IRawValue.

Definition at line 312 of file property.h.

Referenced by property_value< T >::Set().

◆ FromString()

tResult FromString ( const IString strValueAsString)
inlinevirtual

Implement to deserialize the value from a textfile and/or to set by string.

Parameters
strValueAsString[in] String to deserialize from
Return values
ERR_NOERRORSuccessfully set to strType.
any_errorDepends on the implementation.

Implements IPropertyValue.

Definition at line 324 of file property.h.

References IString::Get().

Referenced by property_value< T >::Set().

◆ GetType()

tResult GetType ( IString &&  strType) const
inlinevirtual

Retrieves the string for the property value type.

Usually this is defined by the property_type_definition::TYPE_NAME.

Parameters
strType[out] The type name.
See also
property_type_definition
Return values
ERR_NOERRORSuccessfully set to strType.

Implements IPropertyValue.

Reimplemented in property_variable< T >.

Definition at line 303 of file property.h.

Referenced by property_variable< T >::GetType(), and property_value< T >::Set().

◆ Set()

tResult Set ( const IPropertyValue oValue)
inlinevirtual

Sets the value by a deep copy.

Parameters
oValue[in] Value to set.
Return values
ERR_NOERRORSuccessfully set to strType.
any_errorDepends on the implementation. I.e. ERR_INVALID_TYPE if IPropertyValue::GetType is different and no conversion implemented.

Implements IPropertyValue.

Definition at line 256 of file property.h.

References adtf_memory_intf, adtf_string_intf, property_value< T >::FromRaw(), property_value< T >::FromString(), property_value< T >::GetType(), IPropertyValue::GetType(), RETURN_IF_FAILED, IRawValue::ToRaw(), and IPropertyValue::ToString().

Referenced by property_variable< T >::Notify().

◆ ToRaw()

tResult ToRaw ( IRawMemory &&  oRawValue) const
inlinevirtual

Implement to create a fast value copy in memory.

Usually this method is called if types are equal implementation is within the same binary!

Parameters
oRawValue[oRawValue] copy of the memory representation of the value
Return values
ERR_NOERRORSuccessfully copied.
any_errorDepends on the implementation. You are adviced to return the return value of IRawMemory::Set.

Implements IRawValue.

Definition at line 308 of file property.h.

◆ ToString()

tResult ToString ( IString &&  strIToString) const
inlinevirtual

Implement to serialize the value to a textfile and/or to show it on a display.

Parameters
strIToString[out] serialized string value (should be human readable for displays!!)
Return values
ERR_NOERRORSuccessfully set to strType.
any_errorDepends on the implementation.

Implements IPropertyValue.

Definition at line 317 of file property.h.

References RETURN_IF_FAILED.


Copyright © Audi Electronics Venture GmbH. All rights reserved. (Generated on Thu Jun 9 2022 by doxygen 1.9.1)