Vuo  2.0.1
VuoCompilerEventPortClass.cc
Go to the documentation of this file.
1 
11 #include "VuoCompilerDataClass.hh"
12 
17  VuoCompilerPortClass(name, VuoPortClass::eventOnlyPort, type)
18 {
19  dataClass = NULL;
20 }
21 
26  VuoCompilerPortClass(name, VuoPortClass::eventOnlyPort, NULL)
27 {
28  type = IntegerType::get(getGlobalContext(), 1);
29  dataClass = NULL;
30 }
31 
36 {
37  delete dataClass;
38 }
39 
44 {
45  return dataClass;
46 }
47 
52 {
53  this->dataClass = dataClass;
54 
56  newBase->setCompiler(this);
57  delete getBase();
58  setBase(newBase);
59 }
60 
65 {
66  return (dataClass ? dataClass->getVuoType() : NULL);
67 }
68 
75 {
77 }
78 
83 {
84  // First, look for a name stored within the details of the port's data class, if applicable.
85  if (getDataVuoType())
86  {
88  json_object *nameValue = NULL;
89 
90  if (details && json_object_object_get_ex(details, "name", &nameValue))
91  return json_object_get_string(nameValue);
92  }
93 
94  // Failing that, look for a name associated with the port class rather than the data class.
96 }