HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
PDGT_ValueArgs.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 __PDGT_VALUE_ARGS_H__
10 #define __PDGT_VALUE_ARGS_H__
11 
12 #include "PDGT_API.h"
13 #include "PDGT_Value.h"
14 
15 #include <UT/UT_Array.h>
16 #include <UT/UT_ArrayStringMap.h>
17 #include <UT/UT_StringHolder.h>
18 
19 #include <SYS/SYS_Types.h>
20 
22 {
23 public:
26 
27 public:
29 
30  int64 getMemoryUsage(bool inclusive) const;
31 
32  int size() const;
33  int argSize() const;
34  int kwargSize() const;
35 
36  UT_StringHolder description(bool enclosed=false) const;
37 
38  const Args& args() const;
39  const KWArgs& kwargs() const;
40 
41  void addArg(const PDGT_Value& value);
42  void addKWArg(const UT_StringHolder& key,
43  const PDGT_Value& value);
44 
45  template <typename First, typename... Rest>
46  void addArgs(First value, Rest... rest)
47  {
48  addArg(PDGT_Value(value));
49  addArgs(rest...);
50  }
51 
52  template <typename First>
53  void addArgs(First value)
54  { addArg(PDGT_Value(value)); }
55 
56  template <typename First, typename... Rest>
57  void addKWArgs(const UT_StringHolder& key,
58  First value,
59  Rest... rest)
60  {
61  addKWArg(key, PDGT_Value(value));
62  addKWArgs(rest...);
63  }
64 
65  template <typename First>
66  void addKWArgs(const UT_StringHolder& key,
67  First value)
68  { addKWArg(key, PDGT_Value(value)); }
69 
70 private:
71  Args myArgs;
72  KWArgs myKWArgs;
73 };
74 
75 #endif
#define PDGT_API
Definition: PDGT_API.h:23
void addArgs(First value, Rest...rest)
void addKWArgs(const UT_StringHolder &key, First value, Rest...rest)
void addArgs(First value)
long long int64
Definition: SYS_Types.h:116
void addKWArgs(const UT_StringHolder &key, First value)
GLsizeiptr size
Definition: glcorearb.h:664
**If you just want to fire and args
Definition: thread.h:609
Definition: core.h:1131
GA_API const UT_StringHolder rest