HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HOM_ToggleParmTemplate.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_ToggleParmTemplate_h__
10 #define __HOM_ToggleParmTemplate_h__
11 
12 #include "HOM_API.h"
13 #include "HOM_ParmTemplate.h"
14 
15 SWIGOUT(%feature("notabstract") HOM_ToggleParmTemplate;)
16 SWIGOUT(%rename(ToggleParmTemplate) HOM_ToggleParmTemplate;)
17 
19 {
20 public:
21 #ifdef SWIG
22 %extend {
23  %kwargs HOM_ToggleParmTemplate;
24  HOM_ToggleParmTemplate(
25  const char *name,
26  const char *label,
27  bool default_value = false,
28  const char *disable_when = NULL,
29  bool is_hidden = false,
30  bool is_label_hidden = false,
31  bool join_with_next = false,
32  const char *help = NULL,
33  const char *script_callback = NULL,
34  HOM_EnumValue &script_callback_language =
35  HOM_scriptLanguage::Hscript,
36  const std::map<std::string, std::string> &tags =
38  const std::map<HOM_EnumValue *, std::string> &conditionals =
40  const std::string &default_expression = "",
41  const HOM_EnumValue &default_expression_language =
42  HOM_scriptLanguage::Hscript)
43  {
44  return HOM().newToggleParmTemplate(
45  name, label, default_value, disable_when, is_hidden,
46  is_label_hidden, join_with_next, help, script_callback,
47  script_callback_language, tags, conditionals,
48  default_expression, default_expression_language);
49  }
50 };
51 #else
53  { HOM_CONSTRUCT_OBJECT(this) }
54 
56  : HOM_ParmTemplate(parm_template)
57  { HOM_CONSTRUCT_OBJECT(this) }
58 #endif
59 
61  { HOM_DESTRUCT_OBJECT(this) }
62 
63  // Let swig think we're overriding __repr__ for this class so it doesn't
64  // provide its own __repr__.
65  SWIGOUT(virtual std::string __repr__();)
66 
67  virtual bool defaultValue() = 0;
68  virtual void setDefaultValue(bool default_value) = 0;
69  virtual std::string defaultExpression() = 0;
70  virtual void setDefaultExpression(
71  const std::string &default_expression) = 0;
72  virtual HOM_EnumValue &defaultExpressionLanguage() = 0;
73  virtual void setDefaultExpressionLanguage(
74  const HOM_EnumValue &default_expression_language) = 0;
75 
76 };
77 
78 #endif
#define HOM_DESTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1303
GLuint GLsizei const GLchar * label
Definition: glcorearb.h:2545
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
std::string help(const App *app, const Error &e)
Printout the full help string on error (if this fn is set, the old default for CLI11) ...
Definition: CLI11.h:8978
virtual HOM_ToggleParmTemplate * newToggleParmTemplate(const char *name, const char *label, bool default_value, const char *disable_when, bool is_hidden, bool is_label_hidden, bool join_with_next, const char *help, const char *script_callback, HOM_EnumValue &script_callback_language, const std::map< std::string, std::string > &tags, const std::map< HOM_EnumValue *, std::string > &conditionals, const std::string &default_expression, const HOM_EnumValue &default_expression_language)=0
#define HOM_API
Definition: HOM_API.h:13
#define HOM_CONSTRUCT_OBJECT(pointer)
Definition: HOM_Module.h:1302
HOM_ToggleParmTemplate(const HOM_ToggleParmTemplate &parm_template)
GLuint const GLchar * name
Definition: glcorearb.h:786
std::map< HOM_EnumValue *, std::string > HOM_StdMapEnumString
Definition: HOM_Module.h:1312
OIIO_UTIL_API bool rename(string_view from, string_view to, std::string &err)
HOM_API HOM_Module & HOM()
std::map< std::string, std::string > HOM_StdMapStringString
Definition: HOM_Module.h:1311