Vuo  2.3.2
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  init_Pro();
22 #endif
23  this->moduleKey = moduleKey;
24  this->nodeSet = NULL;
25 }
26 
27 VuoModule::~VuoModule()
28 {
29 #if VUO_PRO
30  fini_Pro();
31 #endif
32 }
33 
38 {
39  return moduleKey;
40 }
41 
45 void VuoModule::setModuleKey(string moduleKey)
46 {
47  this->moduleKey = moduleKey;
48 }
49 
60 {
61  return defaultTitle;
62 }
63 
76 {
77  string title = defaultTitle;
78 
79  if (*(title.end() - 1) == ')')
80  title = title.substr(0, title.find(" ("));
81 
82  return title;
83 }
84 
94 void VuoModule::setDefaultTitle(string defaultTitle)
95 {
96  this->defaultTitle = defaultTitle;
97 }
98 
108 {
109  if (! description.empty())
110  return description;
111 
112  if (nodeSet)
113  return nodeSet->getDescriptionForModule(this);
114 
115  return "";
116 }
117 
123 void VuoModule::setDescription(string description)
124 {
125  this->description = description;
126 }
127 
134 {
135  return version;
136 }
137 
143 void VuoModule::setVersion(string version)
144 {
145  this->version = version;
146 }
147 
153 vector<string> VuoModule::getKeywords(void)
154 {
155  return keywords;
156 }
157 
163 void VuoModule::setKeywords(vector<string> keywords)
164 {
165  this->keywords = keywords;
166 }
167 
172 {
173  return nodeSet;
174 }
175 
180 {
181  this->nodeSet = nodeSet;
182 }