HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_Stat.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  * NAME: GA_Stat.h ( GA Library, C++)
7  *
8  * COMMENTS: Information filled out by stat() operation on GA_Detail.
9  *
10  */
11 
12 #ifndef __GA_Stat__
13 #define __GA_Stat__
14 
15 #include "GA_API.h"
16 
17 #include <UT/UT_Array.h>
18 #include <UT/UT_BoundingBox.h>
19 #include <UT/UT_Options.h>
20 #include <UT/UT_StringArray.h>
21 #include <UT/UT_StringMap.h>
22 #include <UT/UT_ArrayStringMap.h>
23 
24 #include "GA_Types.h"
25 
26 class GA_IO;
27 
28 class UT_WorkBuffer;
29 
30 
31 /// Enum to define different levels of verbosity for GA_Detail::stat()
33 {
34  /// Fill minimal information (element counts). When accessing a file with
35  /// this verbosity level, it's possible that the file doesn't need to be
36  /// completely loaded.
37  GA_STAT_BRIEF = 0x00,
38 
39  /// Fill out attribute & group information. When accessing a file with
40  /// this verbosity level, the library may perform simple parsing (without
41  /// intepreting the all the data).
43 
44  /// Compute primitive type and bounding box information.
45  GA_STAT_FULL = 0x02,
46 };
47 
48 /// @brief Class to return information about a GA_Detail
49 ///
50 /// This class is filled out by the GA_Detail::stat() methods.
52 {
53 public:
54  GA_Stat();
55  ~GA_Stat();
56 
57  /// Simple class to store attribute definition (without data)
59  {
60  public:
61  ga_StatAttribute(const char *name="",
62  const char *type_name="",
64  GA_TypeInfo typeinfo = GA_TYPE_VOID,
65  int tuple_size = 1,
66  const char *description="")
67  : myName(name)
68  , myTypeName(type_name)
69  , myScope(scope)
70  , myTypeInfo(typeinfo)
71  , myTupleSize(tuple_size)
72  , myOptions()
73  , myDescription(description)
74  {
75  }
77 
78  const char *getName() const { return myName; }
79  const char *getTypeName() const { return myTypeName; }
80  GA_AttributeScope getScope() const { return myScope; }
81  GA_TypeInfo getTypeInfo() const { return myTypeInfo; }
82  int getTupleSize() const { return myTupleSize; }
83  const UT_Options &getOptions() const { return myOptions; }
84  const char *getDescription() const { return myDescription; }
85 
86  void setName(const UT_StringHolder &n) { myName = n; }
87  void setTypeName(const UT_StringHolder &n) { myTypeName = n; }
88  void setScope(GA_AttributeScope s) { myScope = s; }
89  void setTypeInfo(GA_TypeInfo t) { myTypeInfo = t; }
90  void setTupleSize(int ts) { myTupleSize = ts; }
91  void setOptions(const UT_Options &o) { myOptions = o; }
92  void setDescription(const UT_StringHolder &d) { myDescription = d; }
93 
94  private:
95  UT_StringHolder myName;
96  UT_StringHolder myTypeName; // Type name
97  GA_AttributeScope myScope;
98  GA_TypeInfo myTypeInfo;
99  UT_Options myOptions;
100  UT_StringHolder myDescription;
101  int myTupleSize;
102  };
103 
105  {
106  public:
107  // If the number of entries in the group is unknown, entries can be -1.
108  ga_StatGroup(const char *name="",
109  GA_Size entries=-1,
110  const char *description="")
111  : myName(name)
112  , myEntries(entries)
113  , myDescription(description)
114  {}
116 
117  const char *getName() const { return myName; }
118  GA_Size entries() const { return myEntries; }
119  const char *getDescription() const { return myDescription; }
120 
121  void setName(const UT_StringHolder &n) { myName = n; }
122  void setEntries(GA_Size e) { myEntries = e; }
123  void setDescription(const UT_StringHolder &n) { myDescription = n; }
124  private:
125  UT_StringHolder myName;
126  UT_StringHolder myDescription;
127  GA_Size myEntries;
128  };
129 
131  {
132  public:
134  const char *name="", int rx=0, int ry=0, int rz=0)
135  : myIndex(idx),
136  myName(name),
137  myResX(rx),
138  myResY(ry),
139  myResZ(rz)
140  {}
142 
143  const char *getName() const { return myName; }
144  const UT_StringHolder &getNameHolder() const { return myName; }
145  GA_Index getIndex() const { return myIndex; }
146  GA_Size xres() const { return myResX; }
147  GA_Size yres() const { return myResY; }
148  GA_Size zres() const { return myResZ; }
149 
150  void setName(const UT_StringHolder &n) { myName.harden(n); }
151  void setIndex(GA_Index idx) { myIndex = idx; }
152  void setRes(GA_Size rx, GA_Size ry, GA_Size rz)
153  { myResX = rx; myResY = ry; myResZ = rz; }
154  private:
155  UT_StringHolder myName;
156  GA_Index myIndex;
157  GA_Size myResX, myResY, myResZ;
158  };
159 
160  void clear()
161  {
162  setPointCount(0);
163  setVertexCount(0);
164  setPrimitiveCount(0);
165  clearAllAttributes();
166  clearAllGroups();
167  clearPrimitiveTypes();
168  clearVolumes();
169  }
170 
171  /// @{
172  /// Get/Set the number of elements in the detail
173  /// Availability: level >= GA_STAT_BRIEF
174  GA_Size getPointCount() const { return myPointCount; }
175  GA_Size getVertexCount() const { return myVertexCount; }
176  GA_Size getPrimitiveCount() const { return myPrimitiveCount; }
177 
178  void setPointCount(GA_Size sz) { myPointCount = sz; }
179  void setVertexCount(GA_Size sz) { myVertexCount = sz; }
180  void setPrimitiveCount(GA_Size sz) { myPrimitiveCount = sz; }
181  /// @}
182 
183  /// @{
184  /// Get/Set the preferred precision
185  /// Availability: level >= GA_STAT_BRIEF
186  void setPrecision(GA_Precision prec) { myPrecision = prec; }
187  GA_Precision getPrecision() const { return myPrecision; }
188  /// @}
189 
190  /// @{
191  /// Attribute status.
192  /// Availability: level >= GA_STAT_NORMAL
194  {
195  clearAttributes(GA_ATTRIB_VERTEX);
196  clearAttributes(GA_ATTRIB_POINT);
197  clearAttributes(GA_ATTRIB_PRIMITIVE);
198  clearAttributes(GA_ATTRIB_GLOBAL);
199  }
201  {
202  myAttributes[owner].clear();
203  }
205  const ga_StatAttribute &attrib)
206  {
207  myAttributes[owner].append(attrib);
208  }
210  {
211  return myAttributes[owner].entries();
212  }
214  GA_Size i) const
215  {
216  return myAttributes[owner](i);
217  }
218  /// @}
219 
220  /// @{
221  /// Group information.
222  /// Availability: level >= GA_STAT_NORMAL
224  {
225  clearGroups(GA_GROUP_POINT);
226  clearGroups(GA_GROUP_PRIMITIVE);
227  clearGroups(GA_GROUP_EDGE);
228  clearGroups(GA_GROUP_BREAKPOINT);
229  clearGroups(GA_GROUP_VERTEX);
230  }
232  {
233  myGroups[gtype].setCapacity(0);
234  }
235  void appendGroup(GA_GroupType gtype, const ga_StatGroup &group)
236  {
237  myGroups[gtype].append(group);
238  }
240  {
241  return myGroups[gtype].entries();
242  }
243  const ga_StatGroup &getGroup(GA_GroupType gtype, GA_Size i) const
244  {
245  return myGroups[gtype](i);
246  }
247  /// @}
248 
249 
250  /// Get the info block options which were set by the stat() operation
251  /// Special options that will be used for quick stats (when the stat level
252  /// is STAT_LEVEL_BRIEF.
253  /// - string primcount_summary
254  /// - string attribute_summary
255  /// - string group_summary
256  /// If possible, the file format should set these from any header
257  /// information.
258  const UT_Options &getInfoOptions() const { return myInfoOptions; }
259 
260  /// Set the info block options stored in the file
261  /// If a float array option is found with the @c bounds_name, it will be
262  /// used to initialize the bounding box of the stat.
263  ///
264  /// The file stat should set these options if possible.
265  void setInfoOptions(const UT_Options &info,
266  const char *bounds_name="bounds");
267 
268  /// @{
269  /// Primitive interface
270  /// Availability: level >= GA_STAT_FULL
272  {
273  myPrimitiveTypes.clear();
274  }
276  {
277  myPrimitiveTypes[type_name]++;
278  }
280  GA_Size count)
281  {
282  myPrimitiveTypes[type_name] = count;
283  }
285  {
286  auto it = myPrimitiveTypes.find(type_name);
287  if (it == myPrimitiveTypes.end())
288  return 0;
289  return it->second;
290  }
291  void getPrimitiveTypes(UT_StringArray &type_names) const
292  {
293  type_names.clear();
294  for (auto it = myPrimitiveTypes.begin();
295  it != myPrimitiveTypes.end(); ++it)
296  {
297  type_names.append(it->first);
298  }
299  type_names.sort();
300  }
301  /// @}
302 
303  /// @{
304  /// Volume interface
305  /// Availability: level >= GA_STAT_FULL
307  {
308  myVolumes.clear();
309  }
310  void appendVolume(GA_Index idx, const char *name, int rx, int ry, int rz)
311  {
312  myVolumes.append(ga_StatVolume(idx, name, rx, ry, rz));
313  }
314  int getNumVolumes() const { return myVolumes.entries(); }
315  const ga_StatVolume &getVolume(int idx) const { return myVolumes(idx); }
316  /// @}
317 
318  /// @{
319  /// Get bounding box
320  /// Availability: level >= GA_STAT_FULL
321  const UT_BoundingBox &getBounds() const { return myBox; }
322  void setBounds(const UT_BoundingBox &b) { myBox = b; }
323  /// @}
324 
325  /// Common output
326  void output(UT_WorkBuffer &buffer, GA_STAT_LEVEL level,
327  bool pretty_print) const;
328 
329  /// Output attribute information only. This appends to the work buffer.
330  void outputAttributes(UT_WorkBuffer &buffer,
331  bool pretty_print) const;
332  /// Output attribute information only. This appends to the work buffer
333  void outputGroups(UT_WorkBuffer &buffer,
334  bool pretty_print) const;
335  /// Output volume information only. This appends to the work buffer
336  void outputVolumes(UT_WorkBuffer &buffer,
337  bool pretty_print) const;
338 
339  /// After parsing a geometry, reads the primcount_summary info and output
340  /// the number of child packed prims per type in the geometry.
341  /// GA_STAT_LEVEL::BRIEF should be enough for this.
342  /// Key : matches GA_PrimitiveDefintion label.
343  /// Value: number of prims of that type
344  UT_StringMap<exint> getPrimCountSummary() const;
345 
346  /// @{
347  /// Set/get the GA_IO which performed the stat
348  void setIO(const GA_IO *io) { myIO = io; }
349  const GA_IO *getIO() const { return myIO; }
350 
351 
352 private:
353  GA_Size myPointCount;
354  GA_Size myVertexCount;
355  GA_Size myPrimitiveCount;
356 
357  GA_Precision myPrecision;
358 
361  UT_Array<ga_StatVolume> myVolumes;
362 
363  UT_ArrayStringMap<GA_Size> myPrimitiveTypes;
364  UT_Options myInfoOptions;
365  UT_BoundingBox myBox;
366 
367  const GA_IO *myIO;
368 };
369 
370 #endif
const GA_IO * getIO() const
Definition: GA_Stat.h:349
const ga_StatAttribute & getAttribute(GA_AttributeOwner owner, GA_Size i) const
Definition: GA_Stat.h:213
const ga_StatGroup & getGroup(GA_GroupType gtype, GA_Size i) const
Definition: GA_Stat.h:243
Data has no numeric representation.
Definition: GA_Types.h:108
void appendPrimitive(const UT_StringHolder &type_name)
Definition: GA_Stat.h:275
void setRes(GA_Size rx, GA_Size ry, GA_Size rz)
Definition: GA_Stat.h:152
void clearAllGroups()
Definition: GA_Stat.h:223
ga_StatAttribute(const char *name="", const char *type_name="", GA_AttributeScope scope=GA_SCOPE_PUBLIC, GA_TypeInfo typeinfo=GA_TYPE_VOID, int tuple_size=1, const char *description="")
Definition: GA_Stat.h:61
GA_Index getIndex() const
Definition: GA_Stat.h:145
void setPrecision(GA_Precision prec)
Definition: GA_Stat.h:186
void appendVolume(GA_Index idx, const char *name, int rx, int ry, int rz)
Definition: GA_Stat.h:310
GA_Precision
Definition: GA_Types.h:91
GA_AttributeScope getScope() const
Definition: GA_Stat.h:80
void sort(bool forward, bool numbered)
GA_Size xres() const
Definition: GA_Stat.h:146
GA_TypeInfo getTypeInfo() const
Definition: GA_Stat.h:81
GLint level
Definition: glcorearb.h:108
void clearAttributes(GA_AttributeOwner owner)
Definition: GA_Stat.h:200
GA_Size getVertexCount() const
Definition: GA_Stat.h:175
const char * getName() const
Definition: GA_Stat.h:143
GLdouble s
Definition: glad.h:3009
void clearGroups(GA_GroupType gtype)
Definition: GA_Stat.h:231
GA_Precision getPrecision() const
Definition: GA_Stat.h:187
GA_STAT_LEVEL
Enum to define different levels of verbosity for GA_Detail::stat()
Definition: GA_Stat.h:32
GA_Size zres() const
Definition: GA_Stat.h:148
#define GA_API
Definition: GA_API.h:14
void setName(const UT_StringHolder &n)
Definition: GA_Stat.h:86
const char * getName() const
Definition: GA_Stat.h:117
Standard user attribute level.
Definition: GA_Types.h:154
void clearAllAttributes()
Definition: GA_Stat.h:193
void setPointCount(GA_Size sz)
Definition: GA_Stat.h:178
GA_Size getAttributeCount(GA_AttributeOwner owner) const
Definition: GA_Stat.h:209
GA_Size yres() const
Definition: GA_Stat.h:147
const char * getName() const
Definition: GA_Stat.h:78
GLuint buffer
Definition: glcorearb.h:660
exint GA_Size
Defines the bit width for index and offset types in GA.
Definition: GA_Types.h:243
void clearVolumes()
Definition: GA_Stat.h:306
void setOptions(const UT_Options &o)
Definition: GA_Stat.h:91
void setDescription(const UT_StringHolder &n)
Definition: GA_Stat.h:123
void setVertexCount(GA_Size sz)
Definition: GA_Stat.h:179
int getTupleSize() const
Definition: GA_Stat.h:82
GA_AttributeScope
Definition: GA_Types.h:148
GLdouble n
Definition: glcorearb.h:2008
GA_Size getGroupCount(GA_GroupType gtype) const
Definition: GA_Stat.h:239
const UT_StringHolder & getNameHolder() const
Definition: GA_Stat.h:144
const ga_StatVolume & getVolume(int idx) const
Definition: GA_Stat.h:315
int getNumVolumes() const
Definition: GA_Stat.h:314
void setDescription(const UT_StringHolder &d)
Definition: GA_Stat.h:92
void setBounds(const UT_BoundingBox &b)
Definition: GA_Stat.h:322
constexpr std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size(){return subtype_count< typename std::tuple_element< I, T >::type >::value+tuple_type_size< T, I+1 >);}template< typename T > struct type_count< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size< T, 0 >)};};template< typename T > struct subtype_count{static constexpr int value{is_mutable_container< T >::value?expected_max_vector_size:type_count< T >::value};};template< typename T, typename Enable=void > struct type_count_min{static const int value{0};};template< typename T >struct type_count_min< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_tuple_like< T >::value &&!is_wrapper< T >::value &&!is_complex< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{type_count< T >::value};};template< typename T > struct type_count_min< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr int value{1};};template< typename T >struct type_count_min< T, typename std::enable_if< is_wrapper< T >::value &&!is_complex< T >::value &&!is_tuple_like< T >::value >::type >{static constexpr int value{subtype_count_min< typename T::value_type >::value};};template< typename T, std::size_t I >constexpr typename std::enable_if< I==type_count_base< T >::value, int >::type tuple_type_size_min(){return 0;}template< typename T, std::size_t I > constexpr typename std::enable_if< I< type_count_base< T >::value, int >::type tuple_type_size_min(){return subtype_count_min< typename std::tuple_element< I, T >::type >::value+tuple_type_size_min< T, I+1 >);}template< typename T > struct type_count_min< T, typename std::enable_if< is_tuple_like< T >::value >::type >{static constexpr int value{tuple_type_size_min< T, 0 >)};};template< typename T > struct subtype_count_min{static constexpr int value{is_mutable_container< T >::value?((type_count< T >::value< expected_max_vector_size)?type_count< T >::value:0):type_count_min< T >::value};};template< typename T, typename Enable=void > struct expected_count{static const int value{0};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&!is_wrapper< T >::value &&!std::is_void< T >::value >::type >{static constexpr int value{1};};template< typename T > struct expected_count< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr int value{expected_max_vector_size};};template< typename T >struct expected_count< T, typename std::enable_if<!is_mutable_container< T >::value &&is_wrapper< T >::value >::type >{static constexpr int value{expected_count< typename T::value_type >::value};};enum class object_category:int{char_value=1, integral_value=2, unsigned_integral=4, enumeration=6, boolean_value=8, floating_point=10, number_constructible=12, double_constructible=14, integer_constructible=16, string_assignable=23, string_constructible=24, other=45, wrapper_value=50, complex_number=60, tuple_value=70, container_value=80,};template< typename T, typename Enable=void > struct classify_object{static constexpr object_category value{object_category::other};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&!std::is_same< T, char >::value &&std::is_signed< T >::value &&!is_bool< T >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::integral_value};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_integral< T >::value &&std::is_unsigned< T >::value &&!std::is_same< T, char >::value &&!is_bool< T >::value >::type >{static constexpr object_category value{object_category::unsigned_integral};};template< typename T >struct classify_object< T, typename std::enable_if< std::is_same< T, char >::value &&!std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::char_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_bool< T >::value >::type >{static constexpr object_category value{object_category::boolean_value};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_floating_point< T >::value >::type >{static constexpr object_category value{object_category::floating_point};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&std::is_assignable< T &, std::string >::value >::type >{static constexpr object_category value{object_category::string_assignable};};template< typename T >struct classify_object< T, typename std::enable_if<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&(type_count< T >::value==1)&&std::is_constructible< T, std::string >::value >::type >{static constexpr object_category value{object_category::string_constructible};};template< typename T > struct classify_object< T, typename std::enable_if< std::is_enum< T >::value >::type >{static constexpr object_category value{object_category::enumeration};};template< typename T > struct classify_object< T, typename std::enable_if< is_complex< T >::value >::type >{static constexpr object_category value{object_category::complex_number};};template< typename T > struct uncommon_type{using type=typename std::conditional<!std::is_floating_point< T >::value &&!std::is_integral< T >::value &&!std::is_assignable< T &, std::string >::value &&!std::is_constructible< T, std::string >::value &&!is_complex< T >::value &&!is_mutable_container< T >::value &&!std::is_enum< T >::value, std::true_type, std::false_type >::type;static constexpr bool value=type::value;};template< typename T >struct classify_object< T, typename std::enable_if<(!is_mutable_container< T >::value &&is_wrapper< T >::value &&!is_tuple_like< T >::value &&uncommon_type< T >::value)>::type >{static constexpr object_category value{object_category::wrapper_value};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::number_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&!is_direct_constructible< T, double >::value &&is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::integer_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< uncommon_type< T >::value &&type_count< T >::value==1 &&!is_wrapper< T >::value &&is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value >::type >{static constexpr object_category value{object_category::double_constructible};};template< typename T >struct classify_object< T, typename std::enable_if< is_tuple_like< T >::value &&((type_count< T >::value >=2 &&!is_wrapper< T >::value)||(uncommon_type< T >::value &&!is_direct_constructible< T, double >::value &&!is_direct_constructible< T, int >::value)||(uncommon_type< T >::value &&type_count< T >::value >=2))>::type >{static constexpr object_category value{object_category::tuple_value};};template< typename T > struct classify_object< T, typename std::enable_if< is_mutable_container< T >::value >::type >{static constexpr object_category value{object_category::container_value};};template< typename T, enable_if_t< classify_object< T >::value==object_category::char_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"CHAR";}template< typename T, enable_if_t< classify_object< T >::value==object_category::integral_value||classify_object< T >::value==object_category::integer_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"INT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::unsigned_integral, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"UINT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::floating_point||classify_object< T >::value==object_category::number_constructible||classify_object< T >::value==object_category::double_constructible, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"FLOAT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::enumeration, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"ENUM";}template< typename T, enable_if_t< classify_object< T >::value==object_category::boolean_value, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"BOOLEAN";}template< typename T, enable_if_t< classify_object< T >::value==object_category::complex_number, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"COMPLEX";}template< typename T, enable_if_t< classify_object< T >::value >=object_category::string_assignable &&classify_object< T >::value<=object_category::other, detail::enabler >=detail::dummy >constexpr const char *type_name(){return"TEXT";}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::container_value||classify_object< T >::value==object_category::wrapper_value, detail::enabler >=detail::dummy >std::string type_name();template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value==1, detail::enabler >=detail::dummy >inline std::string type_name(){return type_name< typename std::decay< typename std::tuple_element< 0, T >::type >::type >);}template< typename T, std::size_t I >inline typename std::enable_if< I==type_count_base< T >::value, std::string >::type tuple_name(){return std::string{};}template< typename T, std::size_t I >inline typename std::enable_if<(I< type_count_base< T >::value), std::string >::type tuple_name(){auto str=std::string{type_name< typename std::decay< typename std::tuple_element< I, T >::type >::type >)}+ ','+tuple_name< T, I+1 >);if(str.back()== ',') str.pop_back();return str;}template< typename T, enable_if_t< classify_object< T >::value==object_category::tuple_value &&type_count_base< T >::value >=2, detail::enabler > > std::string type_name()
Recursively generate the tuple type name.
Definition: CLI11.h:1729
const char * getDescription() const
Definition: GA_Stat.h:84
void setEntries(GA_Size e)
Definition: GA_Stat.h:122
void clearPrimitiveTypes()
Definition: GA_Stat.h:271
ga_StatVolume(GA_Index idx=-1, const char *name="", int rx=0, int ry=0, int rz=0)
Definition: GA_Stat.h:133
const char * getDescription() const
Definition: GA_Stat.h:119
void setPrimitiveCount(const UT_StringHolder &type_name, GA_Size count)
Definition: GA_Stat.h:279
GA_Size getPrimitiveCount() const
Definition: GA_Stat.h:176
GLuint const GLchar * name
Definition: glcorearb.h:786
Simple class to store attribute definition (without data)
Definition: GA_Stat.h:58
GLboolean GLboolean GLboolean b
Definition: glcorearb.h:1222
GA_Size GA_Index
Define the strictness of GA_Offset/GA_Index.
Definition: GA_Types.h:647
void setName(const UT_StringHolder &n)
Definition: GA_Stat.h:121
void appendGroup(GA_GroupType gtype, const ga_StatGroup &group)
Definition: GA_Stat.h:235
exint append()
Definition: UT_Array.h:142
GA_TypeInfo
Definition: GA_Types.h:105
GLdouble t
Definition: glad.h:2397
void setName(const UT_StringHolder &n)
Definition: GA_Stat.h:150
GA_Size getPrimitiveTypeCount(const UT_StringRef &type_name) const
Definition: GA_Stat.h:284
const char * getTypeName() const
Definition: GA_Stat.h:79
void setIO(const GA_IO *io)
Definition: GA_Stat.h:348
GA_AttributeOwner
Definition: GA_Types.h:35
A map of string to various well defined value types.
Definition: UT_Options.h:87
Class to return information about a GA_Detail.
Definition: GA_Stat.h:51
const UT_Options & getInfoOptions() const
Definition: GA_Stat.h:258
void clear()
Definition: GA_Stat.h:160
void getPrimitiveTypes(UT_StringArray &type_names) const
Definition: GA_Stat.h:291
GA_GroupType
An ordinal enum for the different types of groups in GA.
Definition: GA_Types.h:167
void setTypeInfo(GA_TypeInfo t)
Definition: GA_Stat.h:89
const UT_BoundingBox & getBounds() const
Definition: GA_Stat.h:321
void appendAttribute(GA_AttributeOwner owner, const ga_StatAttribute &attrib)
Definition: GA_Stat.h:204
Compute primitive type and bounding box information.
Definition: GA_Stat.h:45
GA_Size entries() const
Definition: GA_Stat.h:118
GA_Size getPointCount() const
Definition: GA_Stat.h:174
ga_StatGroup(const char *name="", GA_Size entries=-1, const char *description="")
Definition: GA_Stat.h:108
void setPrimitiveCount(GA_Size sz)
Definition: GA_Stat.h:180
void clear()
Resets list to an empty list.
Definition: UT_Array.h:753
void setTypeName(const UT_StringHolder &n)
Definition: GA_Stat.h:87
void setScope(GA_AttributeScope s)
Definition: GA_Stat.h:88
void setTupleSize(int ts)
Definition: GA_Stat.h:90
void setIndex(GA_Index idx)
Definition: GA_Stat.h:151
const UT_Options & getOptions() const
Definition: GA_Stat.h:83
GLint GLsizei count
Definition: glcorearb.h:405