Vuo  2.0.0
VuoModule.cc
Go to the documentation of this file.
1 
10 #include "VuoModule.hh"
11 #include "VuoNodeSet.hh"
12 
18 VuoModule::VuoModule(string moduleKey)
19 {
20 #if VUO_PRO
21  VuoModule_Pro();
22 #endif
23  this->moduleKey = moduleKey;
24  this->nodeSet = NULL;
25 }
26 
31 {
32  return moduleKey;
33 }
34 
38 void VuoModule::setModuleKey(string moduleKey)
39 {
40  this->moduleKey = moduleKey;
41 }
42 
53 {
54  return defaultTitle;
55 }
56 
69 {
70  string title = defaultTitle;
71 
72  if (*(title.end() - 1) == ')')
73  title = title.substr(0, title.find(" ("));
74 
75  return title;
76 }
77 
87 void VuoModule::setDefaultTitle(string defaultTitle)
88 {
89  this->defaultTitle = defaultTitle;
90 }
91 
101 {
102  if (! description.empty())
103  return description;
104 
105  if (nodeSet)
106  return nodeSet->getDescriptionForModule(this);
107 
108  return "";
109 }
110 
116 void VuoModule::setDescription(string description)
117 {
118  this->description = description;
119 }
120 
127 {
128  return version;
129 }
130 
136 void VuoModule::setVersion(string version)
137 {
138  this->version = version;
139 }
140 
146 vector<string> VuoModule::getKeywords(void)
147 {
148  return keywords;
149 }
150 
156 void VuoModule::setKeywords(vector<string> keywords)
157 {
158  this->keywords = keywords;
159 }
160 
165 {
166  return nodeSet;
167 }
168 
173 {
174  this->nodeSet = nodeSet;
175 }