Scene.cpp
Go to the documentation of this file.
1
#include "
Scene.h
"
2
3
#include <
RobotAPI/libraries/ArmarXObjects/ObjectID.h
>
4
#include <
RobotAPI/libraries/ArmarXObjects/ObjectFinder.h
>
5
6
7
namespace
armarx::objects
8
{
9
10
ObjectID
SceneObject::getClassID
()
const
11
{
12
return
ObjectID
(
className
);
13
}
14
15
16
ObjectID
SceneObject::getClassID
(
ObjectFinder
& finder)
const
17
{
18
ObjectID
id
=
getClassID
();
19
if
(
id
.dataset().
empty
())
20
{
21
if
(std::optional<ObjectInfo> info = finder.
findObject
(
id
.className()))
22
{
23
return
info->id();
24
}
25
}
26
return
id;
27
}
28
29
30
ObjectID
SceneObject::getObjectID
()
const
31
{
32
return
getClassID
().
withInstanceName
(
instanceName
);
33
}
34
35
36
ObjectID
SceneObject::getObjectID
(
ObjectFinder
& finder)
const
37
{
38
return
getClassID
(finder).
withInstanceName
(
instanceName
);
39
}
40
41
}
42
43
44
armarx::ObjectID
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
Definition:
ObjectID.h:11
armarx::ObjectID::withInstanceName
ObjectID withInstanceName(const std::string &instanceName) const
Definition:
ObjectID.cpp:75
armarx::armem::attachment::ObjectID
armem::MemoryID ObjectID
Definition:
types.h:79
Scene.h
armarx::objects
Definition:
forward_declarations.h:30
cxxopts::empty
bool empty(const std::string &s)
Definition:
cxxopts.hpp:255
armarx::ObjectFinder
Used to find objects in the ArmarX objects repository [1] (formerly [2]).
Definition:
ObjectFinder.h:23
armarx::objects::SceneObject::getObjectID
ObjectID getObjectID() const
Definition:
Scene.cpp:30
armarx::objects::SceneObject::instanceName
std::string instanceName
Definition:
Scene.h:41
ObjectID.h
armarx::ObjectFinder::findObject
std::optional< ObjectInfo > findObject(const std::string &dataset, const std::string &name) const
Definition:
ObjectFinder.cpp:65
armarx::objects::SceneObject::className
std::string className
Definition:
Scene.h:40
armarx::objects::SceneObject::getClassID
ObjectID getClassID() const
Definition:
Scene.cpp:10
ObjectFinder.h
RobotAPI
libraries
ArmarXObjects
Scene.cpp
Generated on Sat Oct 12 2024 09:14:07 for armarx_documentation by
1.8.17