HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_clone.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_clone_h__
10 #define __HOM_clone_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_ElemPtr.h"
15 #include <vector>
16 
17 class HOM_LopNode;
19 
20 SWIGOUT(%rename(clone) HOM_clone;)
21 
23 {
24 public:
25  virtual ~HOM_clone()
26  { }
27 
28  virtual std::string __repr__() = 0;
29 
30  SWIGOUT(%kwargs runAsClone;)
31  virtual void runAsClone(int start_port = 0,
32  int end_port = -1,
33  bool debug = false,
34  bool block = false,
35  bool print_port = false,
36  int connection_timeout_seconds = -1) = 0;
37  virtual bool isRunningAsClone() = 0;
38 
39  SWIGOUT(%kwargs createClone;)
40  SWIGOUT(%newobject createClone;)
41  virtual HOM_clone_Connection *createClone(const char *id = nullptr) = 0;
42 
43  virtual std::vector<HOM_ElemPtr<HOM_clone_Connection> > clones() = 0;
44  SWIGOUT(%newobject clone;)
45  virtual HOM_clone_Connection *clone(const char *id) = 0;
46  virtual void deleteClone(const char *id) = 0;
47  virtual void deleteDisconnectedClones() = 0;
48 
49  SWIGOUT(%ignore addOpaqueConnectionChangeCallback;)
50  virtual void addOpaqueConnectionChangeCallback(void *callback) = 0;
51  SWIGOUT(%ignore removeOpaqueConnectionChangeCallback;)
52  virtual void removeOpaqueConnectionChangeCallback(void *callback) = 0;
53  virtual void removeAllConnectionChangeCallbacks() = 0;
54  SWIGOUT(%ignore opaqueConnectionChangeCallbacks;)
55  virtual std::vector<void *> opaqueConnectionChangeCallbacks() = 0;
56 
57  SWIGOUT(%ignore addOpaqueImageChangeCallback;)
58  virtual void addOpaqueImageChangeCallback(void *callback) = 0;
59  SWIGOUT(%ignore removeOpaqueImageChangeCallback;)
60  virtual void removeOpaqueImageChangeCallback(void *callback) = 0;
61  virtual void removeAllImageChangeCallbacks() = 0;
62  SWIGOUT(%ignore opaqueImageChangeCallbacks;)
63  virtual std::vector<void *> opaqueImageChangeCallbacks() = 0;
64 
65 #ifdef SWIG
66 %extend
67 {
68  void addConnectionChangeCallback(InterpreterObject callback)
69  { self->addOpaqueConnectionChangeCallback(callback); }
70  void removeConnectionChangeCallback(InterpreterObject callback)
71  { self->removeOpaqueConnectionChangeCallback(callback); }
72  // Note that we return a vector of borrowed references because swig
73  // will increment the reference counts.
74  std::vector<InterpreterObject> connectionChangeCallbacks()
75  {
76  std::vector<void *> opaque_callbacks(
77  self->opaqueConnectionChangeCallbacks());
78  std::vector<InterpreterObject> callbacks;
79  for (int i=0; i< opaque_callbacks.size(); ++i)
80  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
81  return callbacks;
82  }
83 
84  void addImageChangeCallback(InterpreterObject callback)
85  { self->addOpaqueImageChangeCallback(callback); }
86  void removeImageChangeCallback(InterpreterObject callback)
87  { self->removeOpaqueImageChangeCallback(callback); }
88  // Note that we return a vector of borrowed references because swig
89  // will increment the reference counts.
90  std::vector<InterpreterObject> imageChangeCallbacks()
91  {
92  std::vector<void *> opaque_callbacks(
93  self->opaqueImageChangeCallbacks());
94  std::vector<InterpreterObject> callbacks;
95  for (int i=0; i< opaque_callbacks.size(); ++i)
96  callbacks.push_back((InterpreterObject)opaque_callbacks[i]);
97  return callbacks;
98  }
99 }
100 #endif
101 };
102 
103 #endif
GLsizei const GLchar *const * string
Definition: glcorearb.h:814
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
virtual ~HOM_clone()
Definition: HOM_clone.h:25
#define HOM_API
Definition: HOM_API.h:13
void ignore(T const &) VULKAN_HPP_NOEXCEPT
Definition: vulkan.hpp:6508
OIIO_API void debug(string_view str)
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)