TypedDataDisplayVisitor.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <sstream>
4 #include <string>
5 
6 #include <Eigen/Core>
7 
9 
10 #include "StringStreamMixin.h"
11 
12 namespace armarx::aron
13 {
14 
17  public StringStreamMixin
18  {
19  public:
20  static std::string getValue(const type::VariantPtr& type, const data::VariantPtr& data);
21 
22 
23  public:
25 
26  void visitDict(const data::VariantPtr& data, const type::VariantPtr& type) override;
27  void visitObject(const data::VariantPtr& data, const type::VariantPtr& type) override;
28 
29  void visitList(const data::VariantPtr& data, const type::VariantPtr& type) override;
30  void visitTuple(const data::VariantPtr& data, const type::VariantPtr& type) override;
31  // What about Pair? currently defaulted
32 
33  void visitBool(const data::VariantPtr& data, const type::VariantPtr& type) override;
34  void visitDouble(const data::VariantPtr& data, const type::VariantPtr& type) override;
35  void visitFloat(const data::VariantPtr& data, const type::VariantPtr& type) override;
36  void visitInt(const data::VariantPtr& data, const type::VariantPtr& type) override;
37  void visitLong(const data::VariantPtr& data, const type::VariantPtr& type) override;
38  void visitString(const data::VariantPtr& data, const type::VariantPtr& type) override;
39 
40  void visitIntEnum(const data::VariantPtr& data, const type::VariantPtr& type) override;
41 
42 
43  void visitMatrix(const data::VariantPtr& data, const type::VariantPtr& type) override;
44  void visitQuaternion(const data::VariantPtr& data, const type::VariantPtr& type) override;
45  void visitImage(const data::VariantPtr& data, const type::VariantPtr& type) override;
46  void visitPointCloud(const data::VariantPtr& data, const type::VariantPtr& type) override;
47  // What about NDArray? currently defaulted
48 
49 
50  private:
51  template <typename ScalarT>
52  void processMatrix(const type::Matrix&, const data::NDArray& data);
53  void processQuaternion(const data::NDArray& data);
54 
55  void processPose(const type::Matrix&, const data::NDArray& data);
56  void processPosition(const type::Matrix&, const data::NDArray& data);
57  void processOrientation(const type::Quaternion&, const data::NDArray& data);
58  };
59 
60 } // namespace armarx::aron
armarx::aron::TypedDataDisplayVisitor::visitImage
void visitImage(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:190
armarx::aron::type::VariantPtr
std::shared_ptr< Variant > VariantPtr
Definition: forward_declarations.h:11
armarx::aron::TypedDataDisplayVisitor::getValue
static std::string getValue(const type::VariantPtr &type, const data::VariantPtr &data)
Definition: TypedDataDisplayVisitor.cpp:20
armarx::aron::data::NDArray
Definition: NDArray.h:48
armarx::aron::TypedDataDisplayVisitor::visitPointCloud
void visitPointCloud(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:198
armarx::aron::StringStreamMixin
Definition: StringStreamMixin.h:10
armarx::aron::type::Quaternion
The Qaternion class.
Definition: Quaternion.h:39
StringStreamMixin.h
armarx::aron::data::VariantPtr
std::shared_ptr< Variant > VariantPtr
Definition: forward_declarations.h:11
armarx::aron::TypedDataDisplayVisitor::visitString
void visitString(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:88
armarx::aron::TypedDataDisplayVisitor::visitBool
void visitBool(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:56
armarx::aron::TypedDataDisplayVisitor::visitDouble
void visitDouble(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:62
armarx::aron
Definition: DataDisplayVisitor.cpp:5
data
uint8_t data[1]
Definition: EtherCATFrame.h:68
armarx::aron::TypedDataDisplayVisitor::visitMatrix
void visitMatrix(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:177
armarx::aron::TypedDataDisplayVisitor::visitTuple
void visitTuple(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:50
armarx::aron::TypedDataDisplayVisitor
Definition: TypedDataDisplayVisitor.h:15
armarx::aron::TypedDataDisplayVisitor::visitIntEnum
void visitIntEnum(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:94
armarx::aron::TypedDataDisplayVisitor::TypedDataDisplayVisitor
TypedDataDisplayVisitor()
Definition: TypedDataDisplayVisitor.cpp:27
armarx::aron::TypedDataDisplayVisitor::visitDict
void visitDict(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:32
VariantVisitor.h
armarx::aron::TypedDataDisplayVisitor::visitObject
void visitObject(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:38
armarx::aron::TypedDataDisplayVisitor::visitFloat
void visitFloat(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:69
armarx::aron::data::ConstTypedVariantVisitor
Definition: VariantVisitor.h:72
armarx::aron::TypedDataDisplayVisitor::visitLong
void visitLong(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:82
armarx::aron::TypedDataDisplayVisitor::visitQuaternion
void visitQuaternion(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:183
armarx::aron::TypedDataDisplayVisitor::visitInt
void visitInt(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:76
armarx::aron::TypedDataDisplayVisitor::visitList
void visitList(const data::VariantPtr &data, const type::VariantPtr &type) override
Definition: TypedDataDisplayVisitor.cpp:44
armarx::aron::type::Matrix
The Matrix class.
Definition: Matrix.h:39