Vuo  2.3.2
VuoCompilerEventPortClass.cc
Go to the documentation of this file.
1 
11 #include "VuoCompiler.hh"
12 #include "VuoCompilerDataClass.hh"
13 
18  VuoCompilerPortClass(name, VuoPortClass::eventOnlyPort)
19 {
20  dataClass = NULL;
21 }
22 
27 {
28  delete dataClass;
29 }
30 
35 {
36  return dataClass;
37 }
38 
43 {
44  this->dataClass = dataClass;
45 
47  newBase->setCompiler(this);
48  delete getBase();
49  setBase(newBase);
50 }
51 
56 {
57  return (dataClass ? dataClass->getVuoType() : NULL);
58 }
59 
66 {
67  dataClass->setVuoType(type);
68 }
69 
74 {
75  // First, look for a name stored within the details of the port's data class, if applicable.
76  if (getDataVuoType())
77  {
79  json_object *nameValue = NULL;
80 
81  if (details && json_object_object_get_ex(details, "name", &nameValue))
82  return json_object_get_string(nameValue);
83  }
84 
85  // Failing that, look for a name associated with the port class rather than the data class.
87 }