HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
HOM_Node.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * COMMENTS:
7  */
8 
9 #ifndef __HOM_Node_h__
10 #define __HOM_Node_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_NetworkMovableItem.h"
14 #include "HOM_BinaryString.h"
15 #include "HOM_EnumModules.h"
16 #include "HOM_IterableList.h"
17 #include "HOM_PtrOrNull.h"
18 #include <PY/PY_OpaqueObject.h>
19 #include <hboost/tuple/tuple.hpp>
20 #include <string>
21 #include <vector>
22 
23 class HOM_StickyNote;
24 class HOM_NodeConnection;
25 class HOM_NodeGroup;
26 class HOM_NodeType;
28 class HOM_Parm;
29 class HOM_ParmTuple;
30 class HOM_IndirectInput;
32 class HOM_HDAModule;
33 class HOM_ParmTemplate;
34 class HOM_DopSimulation;
35 class HOM_DopObject;
37 class HOM_NodeInfoTree;
38 
39 SWIGOUT(%rename(Node) HOM_Node;)
40 
41 class HOM_API HOM_Node : virtual public HOM_NetworkMovableItem
42 {
43 public:
45  : HOM_NetworkMovableItem(HOM_networkItemType::Node)
46  { HOM_CONSTRUCT_OBJECT(this) }
47  HOM_Node(const HOM_Node &node)
49  { HOM_CONSTRUCT_OBJECT(this) }
50  virtual ~HOM_Node()
51  { HOM_DESTRUCT_OBJECT(this) }
52 
53  virtual std::vector<std::string> _getArgumentAutoComplete(
54  const char *method_name, const char *arguments,
55  bool meta_info_only = false) = 0;
56 
57  virtual std::string __repr__() = 0;
58 
59  virtual bool operator==(HOM_PtrOrNull<HOM_Node> node) = 0;
60  virtual bool operator!=(HOM_PtrOrNull<HOM_Node> node) = 0;
61 
62  virtual std::string __str__() = 0;
63 
64  SWIGOUT(%kwargs infoTree;)
65  virtual HOM_NodeInfoTree infoTree(bool verbose = false, bool debug = false) = 0;
66  virtual bool isNetwork() = 0;
67 
68  SWIGOUT(%newobject type;)
69  virtual HOM_NodeType *type() = 0;
70 
71  virtual HOM_NodeTypeCategory *childTypeCategory() = 0;
72 
73  virtual bool isFlagReadable(HOM_EnumValue &flag) = 0;
74  virtual bool isFlagWritable(HOM_EnumValue &flag) = 0;
75  virtual bool isGenericFlagSet(HOM_EnumValue &flag) = 0;
76  virtual void setGenericFlag(HOM_EnumValue &flag, bool value) = 0;
77 
78  virtual bool isDisplayDescriptiveNameFlagSet() = 0;
79  virtual void setDisplayDescriptiveNameFlag(bool on) = 0;
80 
81  // We need a quick way to get the OP_OpTypeId from C++ code so we know
82  // which subclass of HOM_Node we should cast to, so that's why
83  // opTypeIdAsInt() exists.
84  SWIGOUT(%ignore opTypeIdAsInt;)
85  virtual int opTypeIdAsInt() = 0;
86  // Further, we need a quick way to get the OBJ_OBJECT_TYPE from C++ code
87  // so we know which subclass of HOM_ObjNode we should cast to.
88  // That's why objTypeAsInt() exists.
89  SWIGOUT(%ignore objTypeAsInt;)
90  virtual int objTypeAsInt() = 0;
91 
92  SWIGOUT(%newobject node;)
93  SWIGOUT(%kwargs node;)
94  virtual HOM_Node* node(const char* node_path) = 0;
95 
96  SWIGOUT(%kwargs nodes;)
97  virtual std::vector<HOM_ElemPtr<HOM_Node> > nodes( const std::vector<std::string>& node_paths) = 0;
98 
99  SWIGOUT(%newobject item;)
100  SWIGOUT(%kwargs item;)
101  virtual HOM_NetworkMovableItem* item(const char* item_path) = 0;
102 
103  SWIGOUT(%kwargs items;)
104  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > items( const std::vector<std::string>& item_paths) = 0;
105 
106  SWIGOUT(%kwargs glob;)
107  virtual std::vector<HOM_ElemPtr<HOM_Node> > glob(
108  const char *pattern, bool ignore_case=false) = 0;
109 
110  SWIGOUT(%kwargs recursiveGlob;)
111  virtual std::vector<HOM_ElemPtr<HOM_Node> > recursiveGlob(
112  const char *pattern,
113  HOM_EnumValue &filter = HOM_nodeTypeFilter::NoFilter) = 0;
114 
115  SWIGOUT(%newobject createNode;)
116  SWIGOUT(%kwargs createNode;)
117  virtual HOM_Node* createNode(
118  const char* node_type_name,
119  const char* node_name=NULL,
120  bool run_init_scripts=true,
121  bool load_contents=true,
122  bool exact_type_name=false) = 0;
123  virtual void runInitScripts() = 0;
124  virtual void createOrMoveVisualizer(int output_index) = 0;
125 
126  virtual int inputIndex(const char *input_name) = 0;
127  virtual int outputIndex(const char *output_name) = 0;
128 
129  virtual void setInput(
130  int input_index,
131  HOM_NetworkMovableItem *item_to_become_input,
132  int output_index = 0) = 0;
133 
134  virtual void setNamedInput(
135  const char *input_name,
136  HOM_NetworkMovableItem *item_to_become_input,
137  const char *output_name) = 0;
138 
139  virtual void setNamedInput(
140  const char *input_name,
141  HOM_NetworkMovableItem *item_to_become_input,
142  int output_index) = 0;
143 
144  virtual void setFirstInput(
145  HOM_NetworkMovableItem *item_to_become_input,
146  int output_index = 0) = 0;
147 
148  virtual void setNextInput(
149  HOM_NetworkMovableItem *item_to_become_input,
150  int output_index = 0,
151  bool unordered_only = false) = 0;
152 
153  virtual void insertInput(
154  int input_index,
155  HOM_NetworkMovableItem *item_to_become_input,
156  int output_index = 0) = 0;
157 
158  virtual int numOrderedInputs() = 0;
159 
160  virtual std::vector<HOM_ElemPtr<HOM_Node> > inputs() = 0;
161 
162  virtual std::vector<HOM_ElemPtr<HOM_NodeConnection> > inputConnections() = 0;
163 
164  SWIGOUT(%newobject inputConnectors;)
165  virtual HOM_IterableList<std::vector<HOM_ElemPtr<HOM_NodeConnection> > > *
166  inputConnectors() = 0;
167 
168  SWIGOUT(%kwargs inputAncestors;)
169  virtual std::vector<HOM_ElemPtr<HOM_Node> > inputAncestors(
170  bool include_ref_inputs = true,
171  bool follow_subnets = false) = 0;
172 
173  virtual std::vector<std::string> inputNames() = 0;
174  virtual std::vector<std::string> inputLabels() = 0;
175 
176  virtual std::vector<std::string> outputNames() = 0;
177  virtual std::vector<std::string> outputLabels() = 0;
178 
179  virtual std::vector<HOM_ElemPtr<HOM_Node> > outputs() = 0;
180 
181  virtual std::vector<HOM_ElemPtr<HOM_NodeConnection> > outputConnections() = 0;
182 
183  SWIGOUT(%newobject outputConnectors;)
184  virtual HOM_IterableList<std::vector<HOM_ElemPtr<HOM_NodeConnection> > > *
185  outputConnectors() = 0;
186 
187  // Dependency information.
188  SWIGOUT(%kwargs references;)
189  virtual std::vector<HOM_ElemPtr<HOM_Node> >
190  references(bool include_children=true) = 0;
191  SWIGOUT(%kwargs dependents;)
192  virtual std::vector<HOM_ElemPtr<HOM_Node> >
193  dependents(bool include_children=true) = 0;
194 
195  // Access things contained in this node (node must be a network).
196  virtual std::vector<HOM_ElemPtr<HOM_Node> > children() = 0;
197  SWIGOUT(%kwargs allSubChildren;)
198  virtual std::vector<HOM_ElemPtr<HOM_Node> > allSubChildren(
199  bool top_down = true) = 0;
200  SWIGOUT(%kwargs selectedChildren;)
201  virtual std::vector<HOM_ElemPtr<HOM_Node> > selectedChildren(
202  bool include_hidden = false,
203  bool include_hidden_support_nodes = false) = 0;
204 
205  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > allItems() = 0;
206  SWIGOUT(%kwargs selectedItems;)
207  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > selectedItems(
208  bool include_hidden = false,
209  bool include_hidden_support_nodes = false) = 0;
210  SWIGOUT(%kwargs numItems;)
211  virtual int numItems(HOM_EnumValue *item_type = NULL,
212  bool selected_only = false,
213  bool include_hidden = false) = 0;
214 
215  // Picked child item copy/paste/delete methods.
216  virtual void deleteItems(
217  const std::vector<HOM_NetworkMovableItem *> &items =
218  std::vector<HOM_NetworkMovableItem *>()) = 0;
219  virtual void copyItemsToClipboard(
220  const std::vector<HOM_NetworkMovableItem *> &items =
221  std::vector<HOM_NetworkMovableItem *>()) = 0;
222  virtual void pasteItemsFromClipboard(HOM_Vector2 *position = NULL) = 0;
223  SWIGOUT(%kwargs copyItems;)
224  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> > copyItems(
225  const std::vector<HOM_NetworkMovableItem *> &items,
226  bool channel_reference_originals=false,
227  bool relative_references=true) = 0;
228 
229  SWIGOUT(%newobject creator;)
230  virtual HOM_Node *creator() = 0;
231  virtual bool isInsideLockedHDA() = 0;
232  virtual bool isEditableInsideLockedHDA() = 0;
233  virtual bool isEditable() = 0;
234  virtual bool isLockedHDA() = 0;
235  virtual bool isCompiled() = 0;
236 
237  SWIGOUT(%newobject hdaModule;)
238  virtual HOM_HDAModule *hdaModule() = 0;
239 
240  // hm is an alias for hdaModule.
241  SWIGOUT(%newobject hm;)
242  virtual HOM_HDAModule *hm()
243  { return hdaModule(); }
244 
245  SWIGOUT(%newobject moveToGoodPosition;)
246  SWIGOUT(%kwargs moveToGoodPosition;)
247  virtual HOM_Vector2 *moveToGoodPosition(bool relative_to_inputs = true,
248  bool move_inputs = true,
249  bool move_outputs = true,
250  bool move_unconnected = true) = 0;
251  // TODO: Have an argument to specify sorting orders once bug 25998 is fixed.
252  // Have an argument equivalent to oplayout -t once bug 26018 is fixed.
253  SWIGOUT(%kwargs layoutChildren);
254  virtual void layoutChildren
255  (const std::vector<HOM_NetworkMovableItem *> &items =
256  std::vector<HOM_NetworkMovableItem *>(),
257  double horizontal_spacing=-1, double vertical_spacing=-1) = 0;
258 
259  virtual bool isCurrent() = 0;
260  SWIGOUT(%kwargs setCurrent;)
261  virtual void setCurrent(bool on, bool clear_all_selected = false) = 0;
262 
263  virtual bool isHidden() = 0;
264  virtual void hide(bool on) = 0;
265 
266  virtual std::string comment() = 0;
267  virtual void setComment(const char *comment) = 0;
268  virtual void appendComment(const char *comment) = 0;
269 
270  virtual std::string creatorState() = 0;
271  virtual void setCreatorState(const char *state) = 0;
272 
273  virtual bool isBuiltExplicitly() = 0;
274  virtual void setBuiltExplicitly(bool built_explicitly) = 0;
275 
276  virtual HOM_EnumValue *expressionLanguage() = 0;
277  virtual void setExpressionLanguage(HOM_EnumValue &language) = 0;
278 
279  SWIGOUT(%newobject parm;)
280  virtual HOM_Parm *parm(const char* parm_path) = 0;
281 
282  SWIGOUT(%newobject parmTuple;)
283  virtual HOM_ParmTuple *parmTuple(const char* parm_path) = 0;
284 
285  SWIGOUT(%kwargs globParms;)
286  virtual std::vector<HOM_ElemPtr<HOM_Parm> > globParms(
287  const char *pattern, bool ignore_case=false) = 0;
288 
289  virtual std::vector<HOM_ElemPtr<HOM_Parm> > parms() = 0;
290 
291  virtual std::vector<HOM_ElemPtr<HOM_Parm> > parmsReferencingThis() = 0;
292 
293  virtual std::vector<HOM_ElemPtr<HOM_ParmTuple> > parmTuples() = 0;
294 
295  virtual std::vector<HOM_ElemPtr<HOM_Parm> > spareParms() = 0;
296  virtual void removeSpareParms() = 0;
297 
298 
299  virtual void syncNodeVersionIfNeeded(const std::string &from_version) = 0;
300 
301 
302  SWIGOUT(%kwargs setParmTemplateGroup;)
303  virtual void setParmTemplateGroup(
304  HOM_ParmTemplateGroup &parm_template_group,
305  bool rename_conflicting_parms=false) = 0;
306 
307 
308  virtual std::vector<HOM_ElemPtr<HOM_ParmTuple> > parmTuplesInFolder(
309  const std::vector<std::string> &folder_names) = 0;
310 
311  virtual std::vector<HOM_ElemPtr<HOM_Parm> > parmsInFolder(
312  const std::vector<std::string> &folder_names) = 0;
313 
314  SWIGOUT(%newobject parmTemplateGroup;)
315  virtual HOM_ParmTemplateGroup *parmTemplateGroup() = 0;
316 
317  virtual std::vector<std::string> localVariables() = 0;
318 
319  virtual bool isTimeDependent() = 0;
320 
321  virtual void destroy() = 0;
322 
323  // If propagate==true, unlock will be propagated to ancestors
324  SWIGOUT(%kwargs allowEditingOfContents;)
325  virtual void allowEditingOfContents(bool propagate=false) = 0;
326  virtual void matchCurrentDefinition() = 0;
327  virtual bool matchesCurrentDefinition() = 0;
328 
329  SWIGOUT(%kwargs parmAliases;)
330  virtual std::map<HOM_ElemPtr<HOM_Parm>, std::string>
331  parmAliases(bool recurse=false) = 0;
332 
333  virtual void clearParmAliases() = 0;
334 
335  virtual std::vector<HOM_ElemPtr<HOM_NetworkBox> > networkBoxes() = 0;
336 
337  SWIGOUT(%newobject iterNetworkBoxes;)
338  virtual HOM_IterableList<HOM_NetworkBox> *iterNetworkBoxes() = 0;
339 
340  SWIGOUT(%newobject createNetworkBox;)
341  virtual HOM_NetworkBox *createNetworkBox(const char *name=NULL) = 0;
342 
343  SWIGOUT(%newobject copyNetworkBox;)
344  virtual HOM_NetworkBox *copyNetworkBox(HOM_NetworkBox &network_box_to_copy,
345  const char *new_name=NULL, bool channel_reference_original=false) = 0;
346 
347  SWIGOUT(%newobject findNetworkBox;)
348  virtual HOM_NetworkBox *findNetworkBox(const char *name) = 0;
349 
350  virtual std::vector<HOM_ElemPtr<HOM_NetworkBox> >
351  findNetworkBoxes(const char *pattern) = 0;
352 
353  virtual std::vector<HOM_ElemPtr<HOM_NetworkDot> > networkDots() = 0;
354 
355  SWIGOUT(%newobject createNetworkDot;)
356  virtual HOM_NetworkDot *createNetworkDot() = 0;
357 
358  SWIGOUT(%kwargs changeNodeType);
359  SWIGOUT(%newobject changeNodeType;)
360  virtual HOM_Node *changeNodeType(const char *new_node_type,
361  bool keep_name=true, bool keep_parms=true,
362  bool keep_network_contents=true,
363  bool force_change_on_node_type_match=false) = 0;
364 
365  virtual bool canCreateDigitalAsset() = 0;
366  SWIGOUT(%kwargs createDigitalAsset);
367  SWIGOUT(%newobject createDigitalAsset;)
368  virtual HOM_Node *createDigitalAsset(const char *name=NULL,
369  const char *hda_file_name=NULL, const char *description=NULL,
370  int min_num_inputs=0, int max_num_inputs=0,
371  bool compress_contents=false, const char *comment=NULL,
372  const char *version=NULL, bool save_as_embedded=false,
373  bool ignore_external_references=false,
374  bool compile_asset = false,
375  bool change_node_type = true,
376  bool create_backup = true) = 0;
377 
378  SWIGOUT(%kwargs createCompiledDigitalAsset);
379  virtual void createCompiledDigitalAsset(const char *name=NULL,
380  const char *hda_file_name=NULL, const char *description=NULL) = 0;
381 
382  // Sub-Network methods.
383  SWIGOUT(%kwargs collapseIntoSubnet;)
384  SWIGOUT(%newobject collapseIntoSubnet;)
385  virtual HOM_Node *collapseIntoSubnet(
386  const std::vector<HOM_NetworkMovableItem*> &child_items,
387  const char *subnet_name=NULL, const char *subnet_type=NULL) = 0;
388 
389  virtual std::vector<HOM_ElemPtr<HOM_NetworkMovableItem> >
390  extractAndDelete() = 0;
391 
392  virtual std::vector<HOM_ElemPtr<HOM_SubnetIndirectInput> >
393  indirectInputs() = 0;
394 
395  virtual bool isSubNetwork() = 0;
396 
397  // User data methods:
398  virtual void setUserData(const char *name, const std::string &value) = 0;
399  SWIGOUT(%ignore boostAnyUserData;)
400  virtual hboost::any boostAnyUserData(const char *name) = 0;
401  virtual void destroyUserData(const char *name) = 0;
402  virtual std::map<std::string, HOM_BinaryString> userDataDict() = 0;
403 
404 #ifdef SWIG
405 %extend
406 {
407  InterpreterObject userData(const char *name)
408  { return HOMboostAnyToInterpreterObject(self->boostAnyUserData(name)); }
409 }
410 #endif
411 
412 
413  // Cached user data methods:
414  SWIGOUT(%ignore setOpaqueCachedUserData;)
415  virtual void setOpaqueCachedUserData(
416  const char *name, void *opaque_py_object) = 0;
417  SWIGOUT(%ignore opaqueCachedUserData;)
418  virtual void *opaqueCachedUserData(const char *name) = 0;
419  virtual void destroyCachedUserData(const char *name) = 0;
420  virtual std::map<std::string, PY_OpaqueObject> cachedUserDataDict() = 0;
421 
422 #ifdef SWIG
423 %extend
424 {
425  void setCachedUserData(const char *name, InterpreterObject value)
426  { return self->setOpaqueCachedUserData(name, value); }
427 
428  InterpreterObject cachedUserData(const char *name)
429  { return HOMincRef((InterpreterObject)self->opaqueCachedUserData(name)); }
430 }
431 #endif
432 
433 
434  // asCode methods:
435  SWIGOUT(%kwargs asCode;)
436  virtual std::string asCode(bool brief=false,
437  bool recurse=false,
438  bool save_channels_only=false,
439  bool save_creation_commands=true,
440  bool save_keys_in_frames=false,
441  bool save_outgoing_wires=false,
442  bool save_parm_values_only=false,
443  bool save_spare_parms=true,
444  const char *function_name=NULL) = 0;
445 
446  virtual bool canGenerateCookCode(bool check_parent=false) = 0;
447  SWIGOUT(%newobject cookCodeGeneratorNode;)
448  virtual HOM_Node *cookCodeGeneratorNode() = 0;
449  virtual std::string cookCodeLanguage() = 0;
450  virtual bool supportsMultiCookCodeContexts() = 0;
451 
452 
453  SWIGOUT(%kwargs saveCookCodeToFile;)
454  virtual void saveCookCodeToFile(
455  const char *file_name, bool skip_header=false,
456  const char *context_name = NULL) = 0;
457 
458  // This method is deprecated.
459  void saveCodeToFile(const char *file_name, bool skip_header=false,
460  const char *context_name = NULL)
461  { saveCookCodeToFile(file_name, skip_header, context_name); }
462 
463 
464  virtual void saveCompiledCookCodeToFile(const char *file_name,
465  const char *context_name = NULL) = 0;
466 
467  // This method is deprecated.
468  void saveToCompiledVexFile(const char *file_name,
469  const char *context_name = NULL)
470  { saveCompiledCookCodeToFile(file_name, context_name); }
471 
472 
473  SWIGOUT(%kwargs cook;)
474  virtual void cook(
475  bool force = false,
476  const std::vector<double> frame_range = std::vector<double>()) = 0;
477 
478  /// Determine if this node to cook at the current evaluation time
479  virtual bool needsToCook() = 0;
480  /// Determine if this node to cook at the given time
481  virtual bool needsToCook(double time) = 0;
482 
483  virtual int cookCount() = 0;
484 
485  virtual void updateParmStates() = 0;
486 
487  virtual std::string deleteScript() = 0;
488  virtual void setDeleteScript(const std::string &script_text,
489  HOM_EnumValue &language = HOM_scriptLanguage::Python) = 0;
490 
491  // Sticky methods
492  SWIGOUT(%newobject createStickyNote;)
493  virtual HOM_StickyNote *createStickyNote(const char *name=NULL) = 0;
494 
495  virtual std::vector<HOM_ElemPtr<HOM_StickyNote> > stickyNotes() = 0;
496 
497  SWIGOUT(%newobject iterStickyNotes;)
498  virtual HOM_IterableList<HOM_StickyNote> *iterStickyNotes() = 0;
499 
500  SWIGOUT(%newobject copyStickyNote;)
501  virtual HOM_StickyNote *copyStickyNote(HOM_StickyNote &sticky_note_to_copy,
502  const char *new_name=NULL) = 0;
503 
504  SWIGOUT(%newobject findStickyNote;)
505  virtual HOM_StickyNote *findStickyNote(const char *name) = 0;
506 
507  SWIGOUT(%newobject findStickyNotes;)
508  virtual std::vector<HOM_ElemPtr<HOM_StickyNote> > findStickyNotes(
509  const char *pattern) = 0;
510 
511 
512  SWIGOUT(%newobject addNodeGroup;)
513  virtual HOM_NodeGroup *addNodeGroup(const char *name = NULL) = 0;
514 
515  virtual std::vector<HOM_ElemPtr<HOM_NodeGroup> > nodeGroups() = 0;
516 
517  SWIGOUT(%newobject nodeGroup;)
518  virtual HOM_NodeGroup *nodeGroup(const char *name) = 0;
519 
520  virtual std::vector<std::string> errors() = 0;
521  virtual std::vector<std::string> warnings() = 0;
522  virtual std::vector<std::string> messages() = 0;
523 
524  virtual std::string motionEffectsNetworkPath() = 0;
525  SWIGOUT(%newobject findOrCreateMotionEffectsNetwork;)
526  virtual HOM_Node *findOrCreateMotionEffectsNetwork(bool create=true) = 0;
527 
528  SWIGOUT(%kwargs saveItemsToFile;)
529  virtual void saveItemsToFile(
530  const std::vector<HOM_NetworkMovableItem *> &items,
531  const char *file_name,
532  bool save_hda_fallbacks = false) = 0;
533  SWIGOUT(%kwargs loadItemsFromFile;)
534  virtual void loadItemsFromFile(
535  const char *file_name, bool ignore_load_warnings=false) = 0;
536 
537  SWIGOUT(%ignore addOpaqueEventCallback;)
538  virtual void addOpaqueEventCallback(
539  const std::vector<HOM_EnumValue *> &event_types, void *py_callback) = 0;
540  SWIGOUT(%ignore removeOpaqueEventCallback;)
541  virtual void removeOpaqueEventCallback(
542  const std::vector<HOM_EnumValue *> &event_types, void *py_callback) = 0;
543  virtual void removeAllEventCallbacks() = 0;
544  SWIGOUT(%ignore opaqueEventCallbacks;)
545  virtual std::vector<std::pair<std::vector<HOM_EnumValue *>, void *> >
546  opaqueEventCallbacks() = 0;
547 
548  virtual double stampValue(const char *name, double default_value) = 0;
549  virtual std::string stampValue(const char *name, const char *default_value) = 0;
550 
551  virtual void *_asVoidPointer() = 0;
552 
553  SWIGOUT(%newobject simulation;)
554  virtual HOM_DopSimulation *simulation() = 0;
555 
556  virtual std::vector<HOM_ElemPtr<HOM_Node> >
557  findNodesThatProcessedObject(HOM_DopObject &dop_object) = 0;
558 
559  virtual int __creationTime() = 0;
560  virtual int __modificationTime() = 0;
561 
562 #ifdef SWIG
563 %extend
564 {
565  // evalParm() and evalParmTuple() need to be special methods because
566  // their return types can vary.
567  InterpreterObject evalParm(const char *parm_path)
568  {
569  HOM_Parm *parm = self->parm(parm_path);
570 
571  if (!parm)
572  throw HOM_OperationFailed("Invalid parm name");
573 
574  InterpreterObject result = HOMevalParm(*parm);
575  delete parm;
576  return result;
577  }
578 
579  InterpreterObject evalParmTuple(const char *parm_path)
580  {
581  HOM_ParmTuple *parm_tuple = self->parmTuple(parm_path);
582 
583  if (!parm_tuple)
584  throw HOM_OperationFailed("Invalid parm tuple name");
585 
586  InterpreterObject result = HOMevalParmTuple(*parm_tuple);
587  delete parm_tuple;
588  return result;
589  }
590 
591  void addEventCallback(
592  const std::vector<HOM_EnumValue *> &event_types,
593  InterpreterObject callback)
594  { self->addOpaqueEventCallback(event_types, callback); }
595 
596  void removeEventCallback(
597  const std::vector<HOM_EnumValue *> &event_types,
598  InterpreterObject callback)
599  { self->removeOpaqueEventCallback(event_types, callback); }
600 
601 
602  std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
603  eventCallbacks()
604  {
605  std::vector<std::pair<std::vector<HOM_EnumValue *>, void *> >
606  opaque_callbacks(self->opaqueEventCallbacks());
607 
608  std::vector<std::pair<std::vector<HOM_EnumValue *>, InterpreterObject> >
609  callbacks;
610  for (int i=0; i< opaque_callbacks.size(); ++i)
611  callbacks.push_back(std::make_pair(
612  opaque_callbacks[i].first,
613  (InterpreterObject)opaque_callbacks[i].second));
614  return callbacks;
615  }
616 }
617 #endif
618 };
619 
620 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:973
void saveCodeToFile(const char *file_name, bool skip_header=false, const char *context_name=NULL)
Definition: HOM_Node.h:459
GLsizei const GLchar *const * string
Definition: glcorearb.h:813
HOM_Node()
Definition: HOM_Node.h:44
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
void saveToCompiledVexFile(const char *file_name, const char *context_name=NULL)
Definition: HOM_Node.h:468
png_uint_32 i
Definition: png.h:2877
HOM_Node(const HOM_Node &node)
Definition: HOM_Node.h:47
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:972
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:610
virtual HOM_HDAModule * hm()
Definition: HOM_Node.h:242
GLuint const GLchar * name
Definition: glcorearb.h:785
std::string __repr__() const
GLsizei const GLfloat * value
Definition: glcorearb.h:823
GLint GLint GLsizei GLint GLenum GLenum type
Definition: glcorearb.h:107
virtual ~HOM_Node()
Definition: HOM_Node.h:50
png_infop png_uint_32 flag
Definition: png.h:2242
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:596
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glcorearb.h:1296