Vuo
2.0.0
compiler
VuoCompilerPublishedPortClass.cc
Go to the documentation of this file.
1
10
#include "
VuoCompilerPublishedPort.hh
"
11
#include "
VuoCompilerPublishedPortClass.hh
"
12
#include "
VuoPublishedPort.hh
"
13
17
VuoCompilerPublishedPortClass::VuoCompilerPublishedPortClass
(
string
name,
VuoPortClass::PortType
portType, Type *type)
18
:
VuoCompilerPortClass
(name, portType, type)
19
{
20
this->vuoType = NULL;
21
this->
details
= json_object_new_object();
22
}
23
27
VuoCompilerPort
*
VuoCompilerPublishedPortClass::newPort
(
void
)
28
{
29
return
new
VuoCompilerPublishedPort
(
new
VuoPublishedPort
(
getBase
()));
30
}
31
35
VuoCompilerPort
*
VuoCompilerPublishedPortClass::newPort
(
VuoPort
*port)
36
{
37
return
new
VuoCompilerPublishedPort
(port);
38
}
39
43
VuoType
*
VuoCompilerPublishedPortClass::getDataVuoType
(
void
)
44
{
45
return
vuoType;
46
}
47
53
void
VuoCompilerPublishedPortClass::setDataVuoType
(
VuoType
*type)
54
{
55
this->vuoType =
type
;
56
}
57
61
string
VuoCompilerPublishedPortClass::getDisplayName
(
void
)
62
{
63
return
getBase
()->
getName
();
64
}
65
70
void
VuoCompilerPublishedPortClass::setDetail
(
string
key,
string
value)
71
{
72
json_object_object_add(
details
, key.c_str(), json_tokener_parse(value.c_str()));
73
}
74
79
void
VuoCompilerPublishedPortClass::unsetDetail
(
string
key)
80
{
81
json_object_object_del(
details
, key.c_str());
82
}
83
91
void
VuoCompilerPublishedPortClass::updateDetails
(
json_object
*modifiedDetails)
92
{
93
json_object_object_foreach(modifiedDetails, key, val)
94
{
95
if
(val)
96
json_object_object_add(
details
, key, val);
97
else
98
json_object_object_del(
details
, key);
99
}
100
}
Generated on Tue Oct 22 2019 18:07:47 for Vuo by
1.8.16