YARP
Yet Another Robot Platform
Loading...
Searching...
No Matches
PolyDriverList.cpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: 2006-2021 Istituto Italiano di Tecnologia (IIT)
3
* SPDX-FileCopyrightText: 2006-2010 RobotCub Consortium
4
* SPDX-License-Identifier: BSD-3-Clause
5
*/
6
7
#include <
yarp/dev/PolyDriverList.h
>
8
9
#include <vector>
10
11
12
#define RES(v) ((std::vector<PolyDriverDescriptor> *)v)
13
14
using namespace
yarp::dev
;
15
16
PolyDriverList::PolyDriverList
()
17
{
18
descriptors=
new
std::vector<PolyDriverDescriptor>;
19
}
20
21
PolyDriverList::~PolyDriverList
()
22
{
23
delete
RES
(descriptors);
24
}
25
26
PolyDriverDescriptor
*
PolyDriverList::operator[]
(
int
k)
27
{
28
return
&(*
RES
(descriptors))[k];
29
}
30
31
const
PolyDriverDescriptor
*
PolyDriverList::operator[]
(
int
k)
const
32
{
33
return
&(*
RES
(descriptors))[k];
34
}
35
36
int
PolyDriverList::size
()
const
37
{
38
return
(
int
)
RES
(descriptors)->size();
39
}
40
41
void
PolyDriverList::push
(
PolyDriver
*p,
const
char
*k)
42
{
43
RES
(descriptors)->push_back(
PolyDriverDescriptor
(p, k));
44
}
45
46
void
PolyDriverList::push
(
PolyDriverDescriptor
&v)
47
{
48
RES
(descriptors)->push_back(v);
49
}
50
51
const
PolyDriverList
&
PolyDriverList::operator=
(
const
PolyDriverList
&l)
52
{
53
*
RES
(descriptors)=*
RES
(l.descriptors);
54
return
*
this
;
55
}
RES
#define RES(v)
Definition
Matrix.cpp:25
PolyDriverList.h
yarp::dev::PolyDriverDescriptor
Definition
PolyDriverDescriptor.h:19
yarp::dev::PolyDriverList
Definition
PolyDriverList.h:17
yarp::dev::PolyDriverList::PolyDriverList
PolyDriverList()
Definition
PolyDriverList.cpp:16
yarp::dev::PolyDriverList::push
void push(PolyDriver *p, const char *k)
Definition
PolyDriverList.cpp:41
yarp::dev::PolyDriverList::operator[]
yarp::dev::PolyDriverDescriptor * operator[](int k)
Definition
PolyDriverList.cpp:26
yarp::dev::PolyDriverList::operator=
const PolyDriverList & operator=(const PolyDriverList &)
Definition
PolyDriverList.cpp:51
yarp::dev::PolyDriverList::size
int size() const
Definition
PolyDriverList.cpp:36
yarp::dev::PolyDriverList::~PolyDriverList
~PolyDriverList()
Definition
PolyDriverList.cpp:21
yarp::dev::PolyDriver
A container for a device driver.
Definition
PolyDriver.h:23
yarp::dev
For streams capable of holding different kinds of content, check what they actually have.
Definition
jointData.cpp:13
YARP
3.9.0+221-20240917.5+git468e6091f
src
libYARP_dev
src
yarp
dev
PolyDriverList.cpp
Generated on Sat Oct 5 2024 02:31:59 for YARP by
1.9.8