Vuo  2.0.0
VuoCompilerPublishedPortClass.cc
Go to the documentation of this file.
1 
12 #include "VuoPublishedPort.hh"
13 
18  : VuoCompilerPortClass(name, portType, type)
19 {
20  this->vuoType = NULL;
21  this->details = json_object_new_object();
22 }
23 
28 {
30 }
31 
36 {
37  return new VuoCompilerPublishedPort(port);
38 }
39 
44 {
45  return vuoType;
46 }
47 
54 {
55  this->vuoType = type;
56 }
57 
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 
80 {
81  json_object_object_del(details, key.c_str());
82 }
83 
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 }