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