Go to the documentation of this file.
42 template <
class... Ts>
46 static_assert(
sizeof...(Ts) == 0,
"called overload for empty pack with params");
55 template <
class T,
class... Ts>
56 struct IsAHelper<
T, Ts...>
61 return dynamic_cast<const T*
>(sv) && IsAHelper<Ts...>::IsA(sv);
66 template <
class DerivedClass>
73 template <
class... Ts>
77 return IsAHelper<Ts...>::IsA(
this);
84 return dynamic_cast<const T*
>(
this);
91 return dynamic_cast<T*
>(
this);
96 virtual std::map<std::string, VariantBasePtr>
102 virtual void getDataFieldAs(std::size_t i, Ice::Byte& out)
const = 0;
103 virtual void getDataFieldAs(std::size_t i, Ice::Short& out)
const = 0;
108 virtual void getDataFieldAs(std::size_t i, std::string& out)
const = 0;
133 SensorValueInfo<T> (*)(
void));
139 #define DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION \
140 ARMARX_PLACEMENT_CONSTRUCTION_HELPER \
141 using SensorValueBase = ::armarx::SensorValueBase; \
142 using VariantBasePtr = ::armarx::VariantBasePtr; \
143 std::string getSensorValueType(bool withoutNamespaceSpecifier = false) const override \
145 return armarx::GetTypeString(*this, withoutNamespaceSpecifier); \
147 void _check_for_static_GetClassMemberInfo_overload() \
149 static_assert(SensorValueHasGetClassMemberInfo<std::decay<decltype(*this)>::type>::value, \
150 "This class has to implement GetClassMemberInfo() returning " \
151 "an instance of SensorValueInfo<THIS_CLASS_TYPE>"); \
153 std::map<std::string, VariantBasePtr> toVariants(const IceUtil::Time& timestamp) \
156 return SensorValueInfo<std::decay<decltype(*this)>::type>::ToVariants(timestamp, this); \
158 std::size_t getNumberOfDataFields() const override \
160 return SensorValueInfo<std::decay<decltype(*this)>::type>::GetNumberOfDataFields(); \
162 void getDataFieldAs(std::size_t i, bool& out) const override \
164 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
166 void getDataFieldAs(std::size_t i, Ice::Byte& out) const override \
168 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
170 void getDataFieldAs(std::size_t i, Ice::Short& out) const override \
172 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
174 void getDataFieldAs(std::size_t i, Ice::Int& out) const override \
176 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
178 void getDataFieldAs(std::size_t i, Ice::Long& out) const override \
180 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
182 void getDataFieldAs(std::size_t i, Ice::Float& out) const override \
184 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
186 void getDataFieldAs(std::size_t i, Ice::Double& out) const override \
188 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
190 void getDataFieldAs(std::size_t i, std::string& out) const override \
192 SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldAs(this, i, out); \
194 const std::type_info& getDataFieldType(std::size_t i) const override \
196 return SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldType(i); \
198 std::vector<std::string> getDataFieldNames() const override \
200 return SensorValueInfo<std::decay<decltype(*this)>::type>::GetDataFieldNames(); \
virtual ~SensorValueBase()=default
const VariantTypeId Float
The SensorValueBase class.
void _copyTo(std::unique_ptr< T > &target) const
Vertex target(const detail::edge_base< Directed, Vertex > &e, const PCG &)
ARMARX_META_MAKE_HAS_MEMBER_FNC_CHECK(SensorValueHasGetClassMemberInfo, GetClassMemberInfo, SensorValueInfo< T >(*)(void))
const VariantTypeId Double
virtual const std::type_info & getDataFieldType(std::size_t i) const =0
std::shared_ptr< Value > value()
virtual std::map< std::string, VariantBasePtr > toVariants(const IceUtil::Time ×tamp) const =0
used to send the data to the DebugObserverTopic and to other Components (e.g. GUI widgets)
virtual std::string getSensorValueType(bool withoutNamespaceSpecifier) const =0
virtual std::vector< std::string > getDataFieldNames() const =0
#define DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION
static DETAIL_SensorValueBase_DEFAULT_METHOD_IMPLEMENTATION SensorValueInfo< SensorValueDummy > GetClassMemberInfo()
armarx::core::time::DateTime Time
#define ARMARX_PLACEMENT_CONSTRUCTION_HELPER_BASE(CommonBaseType)
virtual void getDataFieldAs(std::size_t i, bool &out) const =0
T getDataFieldAs(std::size_t i) const
virtual std::size_t getNumberOfDataFields() const =0
This file offers overloads of toIce() and fromIce() functions for STL container types.