|
RTC Toolkit 5.1.0
|
A read-only interface class to an underlying metadata value. More...
#include <repositoryIf.hpp>
Public Member Functions | |
| ConstValueProxy ()=delete | |
| ConstValueProxy (const ConstValueProxy &rhs)=default | |
| ConstValueProxy (ConstValueProxy &&rhs)=default | |
| ~ConstValueProxy ()=default | |
| bool | HasValue () const noexcept |
| Check if a value was assigned to the metadata value. | |
| const std::type_info & | GetValueType () const noexcept |
| Get the type of the metadata value stored. | |
| operator const std::any & () const | |
Cast operator to return a read-only reference to the underling std::any value object. | |
| template<typename T > | |
| const T & | Cast () const |
| Cast the value to the given C++ type. | |
A read-only interface class to an underlying metadata value.
This class enforces the type checks required by MetaData to make sure only the correct types are allowed in the underling metadata mapping.
|
default |
|
default |
|
default |
| const T & rtctk::componentFramework::RepositoryIf::MetaData::ConstValueProxy::Cast | ( | ) | const |
Cast the value to the given C++ type.
true. | T | The type to cast the value to. |
| std::bad_any_cast | If the metadata cannot be cast to the given type T. |
|
noexcept |
Get the type of the metadata value stored.
typeid of the C++ object type stored in the value.
|
inlinenoexcept |
Check if a value was assigned to the metadata value.
true if the value referred to by this proxy object actually has a value assigned and false if it does not.
|
inline |
Cast operator to return a read-only reference to the underling std::any value object.