YARP
Yet Another Robot Platform
data.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2006-2020 Istituto Italiano di Tecnologia (IIT)
3  * All rights reserved.
4  *
5  * This software may be modified and distributed under the terms of the
6  * BSD-3-Clause license. See the accompanying LICENSE file for details.
7  */
8 
9 #include <yarp/manager/data.h>
10 
11 using namespace yarp::manager;
12 
17 {
18  bRequired = false;
19  bWithPriority = false;
20  modOwner = nullptr;
21  portType = STREAM_PORT;
22 }
23 
24 InputData::InputData(const char* szName) : Node(INPUTD)
25 {
26  bRequired = false;
27  bWithPriority = false;
28  modOwner = nullptr;
29  setName(szName);
30  portType = STREAM_PORT;
31 }
32 
33 InputData::InputData(const InputData &input) : Node(input)
34 {
35  strName = input.strName;
36  strPort = input.strPort;
37  carrier = input.carrier;
38  bWithPriority = input.bWithPriority;
39  bRequired = input.bRequired;
40  strDescription = input.strDescription;
41  modOwner = input.modOwner;
42  portType = input.portType;
43 }
44 
45 
46 InputData::~InputData() = default;
47 
48 
50 {
51  auto* input = new InputData(*this);
52  return input;
53 }
54 
55 
56 
57 
62 {
63  modOwner = nullptr;
64  portType = STREAM_PORT;
65 }
66 
67 
68 OutputData::OutputData(const char* szName) : Node(OUTPUTD)
69 {
70  modOwner = nullptr;
71  setName(szName);
72  portType = STREAM_PORT;
73 }
74 
75 
76 OutputData::OutputData(const OutputData &output) : Node(output)
77 {
78  strName = output.strName;
79  strPort = output.strPort;
80  carrier = output.carrier;
81  strDescription = output.strDescription;
82  modOwner = output.modOwner;
83  portType = output.portType;
84 }
85 
86 
87 OutputData::~OutputData() = default;
88 
89 
91 {
92  auto* output = new OutputData(*this);
93  return output;
94 }
yarp::manager::OUTPUTD
@ OUTPUTD
Definition: ymm-types.h:24
yarp::manager::OutputData::OutputData
OutputData()
Class OutputData.
Definition: data.cpp:61
yarp::manager
Definition: application.h:24
yarp::manager::OutputData::clone
Node * clone() override
Definition: data.cpp:90
yarp::manager::OutputData
Definition: data.h:72
yarp::manager::InputData::InputData
InputData()
Class InputData.
Definition: data.cpp:16
yarp::manager::Node
a Node of a Graph
Definition: node.h:68
yarp::manager::InputData::clone
Node * clone() override
Definition: data.cpp:49
yarp::manager::InputData::~InputData
~InputData() override
data.h
yarp::manager::OutputData::~OutputData
~OutputData() override
yarp::manager::OutputData::setName
void setName(const char *szName)
Definition: data.h:80
yarp::manager::InputData::setName
void setName(const char *szName)
Definition: data.h:33
yarp::manager::INPUTD
@ INPUTD
Definition: ymm-types.h:23
yarp::manager::STREAM_PORT
@ STREAM_PORT
Definition: ymm-types.h:25
yarp::manager::InputData
Class InputData.
Definition: data.h:25