HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ChannelList.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_ChannelList_h__
10 #define __HOM_ChannelList_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_Defines.h"
14 #include "HOM_Module.h"
15 #include "HOM_Errors.h"
16 #include "HOM_ElemPtr.h"
17 #include "HOM_PtrOrNull.h"
18 #include "HOM_Parm.h"
19 #include <vector>
20 
21 SWIGOUT(%feature("notabstract") HOM_ChannelList;)
23 
25 {
26 public:
27 #ifdef SWIG
28 %extend
29 {
31  {
32  return new HOM_ChannelList();
33  }
34 }
35 #else
37 #endif
38  virtual ~HOM_ChannelList();
39 
41 
42  bool operator==(
43  const HOM_ChannelList& p) const;
44  bool operator==(
46  bool operator!=(
48 
49  void clear();
50 
51  std::vector<HOM_ElemPtr<HOM_Parm> > parms();
52  std::vector<HOM_ElemPtr<HOM_Parm> > selected();
53  std::vector<HOM_ElemPtr<HOM_Parm> > deselected();
54  std::vector<HOM_ElemPtr<HOM_Parm> > pinned();
55  std::vector<HOM_ElemPtr<HOM_Parm> > unpinned();
56  std::vector<HOM_ElemPtr<HOM_Parm> > selectedValue();
57  std::vector<HOM_ElemPtr<HOM_Parm> > deselectedValue();
58 
59  SWIGOUT(%kwargs addParm;)
60  void addParm(HOM_Parm &parm,
61  bool selected=true,
62  bool pinned=false,
63  bool valueselected=false);
64 
65  SWIGOUT(%kwargs addPath;)
66  void addPath(const std::string &path,
67  bool selected=true,
68  bool pinned=false,
69  bool valueselected=false);
70 
71  void remove(HOM_Parm &parm);
72 
73  void select(HOM_Parm &parm);
74  void deselect(HOM_Parm &parm);
75 
76  void pin(HOM_Parm &parm);
77  void unpin(HOM_Parm &parm);
78 
79  void selectValue(HOM_Parm &parm);
80  void deselectValue(HOM_Parm &parm);
81 
82  SWIGOUT(%kwargs addParms;)
83  void addParms(const std::vector<HOM_Parm*> &parms,
84  bool selected=true,
85  bool pinned=false,
86  bool valueselected=false);
87 
88  SWIGOUT(%kwargs addPaths;)
89  void addPaths(const std::vector< std::string > &paths,
90  bool selected=true,
91  bool pinned=false,
92  bool valueselected=false);
93 
94  void remove(const std::vector<HOM_Parm*> &parms);
95 
96  void select(const std::vector<HOM_Parm*> &parms);
97  void deselect(const std::vector<HOM_Parm*> &parms);
98 
99  void pin(const std::vector<HOM_Parm*> &parms);
100  void unpin(const std::vector<HOM_Parm*> &parms);
101 
102  void selectValue(const std::vector<HOM_Parm*> &parms);
103  void deselectValue(const std::vector<HOM_Parm*> &parms);
104 
105  bool contains(HOM_Parm &parm);
106  bool isSelected(HOM_Parm &parm);
107  bool isPinned(HOM_Parm &parm);
108  bool isValueSelected(HOM_Parm &parm);
109 
110 
112  bool keepSelection();
113  bool enableFilter();
114  bool filterTranslates();
115  bool filterRotates();
116  bool filterScales();
117 
118  void setFilter(const std::string pattern);
119 
120  void setKeepSelection(bool value);
121  void setEnableFilter(bool value);
122  void setFilterTranslates(bool value);
123  void setFilterRotates(bool value);
124  void setFilterScales(bool value);
125 
126  SWIGOUT(%kwargs asCode;)
127  std::string asCode(const std::string &var_name="chanlist");
128 
129 private:
130  size_t find(const std::string &n);
131 
132  struct ChannelInfo
133  {
134  ChannelInfo()
135  : selected(true)
136  , pinned(false)
137  , selectedvalue(false)
138  {}
139 
140  ChannelInfo(
141  const std::string &n,
142  bool s=true,
143  bool p=false,
144  bool v=false)
145  : name( n )
146  , selected(s)
147  , pinned(p)
148  , selectedvalue(v)
149  {}
150 
151  bool operator==(
152  const ChannelInfo& p) const
153  {
154  return
155  name == p.name &&
156  selected == p.selected &&
157  pinned == p.pinned &&
158  selectedvalue == p.selectedvalue
159  ;
160  }
161 
163  bool selected;
164  bool pinned;
165  bool selectedvalue;
166  };
167  std::vector< ChannelInfo > myChannels;
168  std::string myFilter;
169  bool myFilterT;
170  bool myFilterR;
171  bool myFilterS;
172  bool myEnableFilter;
173  bool myKeepSelection;
174 };
175 
176 #endif
177 
GLdouble s
Definition: glew.h:1390
GLuint const GLchar * name
Definition: glew.h:1814
OIIO_API bool rename(string_view from, string_view to, std::string &err)
#define SWIGOUT(x)
Definition: HOM_Defines.h:24
string __repr__(VtArray< T > const &self)
Definition: wrapArray.h:349
const GLdouble * v
Definition: glew.h:1391
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
Definition: glew.h:2981
#define HOM_API
Definition: HOM_API.h:13
vint4 select(const vbool4 &mask, const vint4 &a, const vint4 &b)
Definition: simd.h:4678
GLsizei n
Definition: glew.h:4040
bool operator!=(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Inequality operator, does exact floating point comparisons.
Definition: Mat3.h:604
bool OIIO_API contains(string_view a, string_view b)
Does 'a' contain the string 'b' within it?
GLsizei const GLchar *const * path
Definition: glew.h:6461
GLfloat GLfloat p
Definition: glew.h:16321
GLsizei const GLchar *const * string
Definition: glew.h:1844
FMT_CONSTEXPR bool find(Ptr first, Ptr last, T value, Ptr &out)
Definition: format.h:2104
GLubyte * pattern
Definition: glew.h:5711
GLsizei const GLfloat * value
Definition: glew.h:1849
bool operator==(const Mat3< T0 > &m0, const Mat3< T1 > &m1)
Equality operator, does exact floating point comparisons.
Definition: Mat3.h:590
GLenum const void * paths
Definition: glew.h:13589