DebugDrawerTopic::VisuID Struct Reference

A visualisation ID. More...

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

Public Member Functions

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

Public Attributes

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

Friends

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

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
std::string layer
The layer name (empty by default).
std::string name
The visu name (empty by default).

(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 172 of file DebugDrawerTopic.h.

Constructor & Destructor Documentation

◆ VisuID() [1/4]

VisuID ( )

Empty constructor.

Definition at line 15 of file DebugDrawerTopic.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ VisuID() [2/4]

VisuID ( const std::string & name)

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

Definition at line 19 of file DebugDrawerTopic.cpp.

+ Here is the call graph for this function:

◆ VisuID() [3/4]

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

Construct a VisuID with given name and layer.

Definition at line 23 of file DebugDrawerTopic.cpp.

◆ VisuID() [4/4]

template<typename Source>
VisuID ( const Source & name)
inline

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

Definition at line 185 of file DebugDrawerTopic.h.

+ Here is the call graph for this function:

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 29 of file DebugDrawerTopic.cpp.

+ Here is the call graph for this function:

Friends And Related Symbol 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 34 of file DebugDrawerTopic.cpp.

Member Data Documentation

◆ layer

std::string layer = ""

The layer name (empty by default).

Definition at line 196 of file DebugDrawerTopic.h.

◆ name

std::string name = ""

The visu name (empty by default).

Definition at line 197 of file DebugDrawerTopic.h.


The documentation for this struct was generated from the following files: