YARP
Yet Another Robot Platform
PolyDriverList.cpp
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3
* Copyright (C) 2006-2010 RobotCub Consortium
4
* All rights reserved.
5
*
6
* This software may be modified and distributed under the terms of the
7
* BSD-3-Clause license. See the accompanying LICENSE file for details.
8
*/
9
10
#include <
yarp/dev/PolyDriverList.h
>
11
12
#include <vector>
13
14
15
#define RES(v) ((std::vector<PolyDriverDescriptor> *)v)
16
17
using namespace
yarp::dev
;
18
19
PolyDriverList::PolyDriverList
()
20
{
21
descriptors=
new
std::vector<PolyDriverDescriptor>;
22
}
23
24
PolyDriverList::~PolyDriverList
()
25
{
26
delete
RES
(descriptors);
27
}
28
29
PolyDriverDescriptor
*
PolyDriverList::operator[]
(
int
k)
30
{
31
return
&(*
RES
(descriptors))[k];
32
}
33
34
const
PolyDriverDescriptor
*
PolyDriverList::operator[]
(
int
k)
const
35
{
36
return
&(*
RES
(descriptors))[k];
37
}
38
39
int
PolyDriverList::size
()
const
40
{
41
return
(
int
)
RES
(descriptors)->size();
42
}
43
44
void
PolyDriverList::push
(
PolyDriver
*p,
const
char
*k)
45
{
46
RES
(descriptors)->push_back(
PolyDriverDescriptor
(p, k));
47
}
48
49
void
PolyDriverList::push
(
PolyDriverDescriptor
&v)
50
{
51
RES
(descriptors)->push_back(v);
52
}
53
54
const
PolyDriverList
&
PolyDriverList::operator=
(
const
PolyDriverList
&l)
55
{
56
*
RES
(descriptors)=*
RES
(l.descriptors);
57
return
*
this
;
58
}
yarp::dev::PolyDriverDescriptor
Definition:
PolyDriverDescriptor.h:24
yarp::dev::PolyDriverList::PolyDriverList
PolyDriverList()
Definition:
PolyDriverList.cpp:19
yarp::dev::PolyDriverList::operator=
const PolyDriverList & operator=(const PolyDriverList &)
Definition:
PolyDriverList.cpp:54
yarp::dev::PolyDriverList::size
int size() const
Definition:
PolyDriverList.cpp:39
yarp::dev::PolyDriverList
Definition:
PolyDriverList.h:22
yarp::dev
An interface for the device drivers.
Definition:
audioBufferSizeData.cpp:17
PolyDriverList.h
yarp::dev::PolyDriverList::push
void push(PolyDriver *p, const char *k)
Definition:
PolyDriverList.cpp:44
yarp::dev::PolyDriverList::operator[]
yarp::dev::PolyDriverDescriptor * operator[](int k)
Definition:
PolyDriverList.cpp:29
yarp::dev::PolyDriver
A container for a device driver.
Definition:
PolyDriver.h:27
RES
#define RES(v)
Definition:
PolyDriverList.cpp:15
yarp::dev::PolyDriverList::~PolyDriverList
~PolyDriverList()
Definition:
PolyDriverList.cpp:24
YARP
3.4.100+20201223.2+gitb8ea4d712
src
libYARP_dev
src
yarp
dev
PolyDriverList.cpp
Generated on Sun Jan 3 2021 02:46:24 for YARP by
1.8.20