DebugDrawerTopic::VisuID Struct Reference

A visualisation ID. More...

#include <RobotAPI/libraries/core/visualization/DebugDrawerTopic.h>

Public Member Functions

 VisuID ()
 Empty constructor. More...
 
template<typename Source >
 VisuID (const Source &name)
 Construct a VisuID from a non-std::string source (e.g. char[]). More...
 
 VisuID (const std::string &layer, const std::string &name)
 Construct a VisuID with given name and layer. More...
 
 VisuID (const std::string &name)
 Construct a VisuID with given name (for drawing to the preset layer). More...
 
VisuID withName (const std::string &name) const
 Get a VisuID with the given name and same layer as `*this. More...
 

Public Attributes

std::string layer = ""
 The layer name (empty by default). More...
 
std::string name = ""
 The visu name (empty by default). More...
 

Friends

std::ostream & operator<< (std::ostream &os, const VisuID &rhs)
 Streams a short human-readable description of rhs to os. More...
 

Detailed Description

A visualisation ID.

This constructor can be called in the following ways (with draw(const VisuID& id, ...) being any drawing method):

std::string name = "pose";
std::string layer = "layer";
draw(name, ...); // just the name, implicit call
draw({name}, ...); // just the name, call with initializer list
draw({layer, name}, ...); // layer and name, with initializer list

(And of course by an explicit call if you want to be really verbose.) Not passing a layer will cause DebugDrawerTopic to use the preset layer.

Definition at line 175 of file DebugDrawerTopic.h.

Constructor & Destructor Documentation

◆ VisuID() [1/4]

VisuID ( )

Empty constructor.

Definition at line 18 of file DebugDrawerTopic.cpp.

◆ VisuID() [2/4]

VisuID ( const std::string &  name)

Construct a VisuID with given name (for drawing to the preset layer).

Definition at line 21 of file DebugDrawerTopic.cpp.

◆ VisuID() [3/4]

VisuID ( const std::string &  layer,
const std::string &  name 
)

Construct a VisuID with given name and layer.

Definition at line 24 of file DebugDrawerTopic.cpp.

◆ VisuID() [4/4]

VisuID ( const Source &  name)
inline

Construct a VisuID from a non-std::string source (e.g. char[]).

Definition at line 189 of file DebugDrawerTopic.h.

Member Function Documentation

◆ withName()

DebugDrawerTopic::VisuID withName ( const std::string &  name) const

Get a VisuID with the given name and same layer as `*this.

Definition at line 28 of file DebugDrawerTopic.cpp.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const VisuID rhs 
)
friend

Streams a short human-readable description of rhs to os.

Definition at line 33 of file DebugDrawerTopic.cpp.

Member Data Documentation

◆ layer

std::string layer = ""

The layer name (empty by default).

Definition at line 201 of file DebugDrawerTopic.h.

◆ name

std::string name = ""

The visu name (empty by default).

Definition at line 202 of file DebugDrawerTopic.h.


The documentation for this struct was generated from the following files:
armarx::DebugDrawerTopic::VisuID::layer
std::string layer
The layer name (empty by default).
Definition: DebugDrawerTopic.h:201
armarx::DebugDrawerTopic::VisuID::name
std::string name
The visu name (empty by default).
Definition: DebugDrawerTopic.h:202