HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_AIFStat.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_AIFStat.h ( GA Library, C++)
7  *
8  * COMMENTS: Allows attribute to fill out information for the stat()
9  * interface.
10  */
11 
12 #ifndef __GA_AIFStat__
13 #define __GA_AIFStat__
14 
15 #include "GA_API.h"
16 
17 #include <SYS/SYS_Types.h>
18 
19 
20 class GA_Attribute;
21 class UT_WorkBuffer;
22 
23 
24 /// @brief Class to fill GA_Stat information about an attribute.
25 /// This AIF is used to fill GA_Stat type information about an attribute.
26 /// The string generated by the info() method will be appended to the
27 /// GA_Stat::myPointAttributes (or other attribute lists).
28 ///
29 /// The default method is typically sufficient for most attributes.
31 {
32 public:
33  GA_AIFStat();
34  virtual ~GA_AIFStat();
35 
36  /// Fill out GA_Stat information about the given attribute.
37  ///
38  /// @param attrib - The attribute to stat
39  /// @param info - The buffer containing the resulting stat information
40  /// @param level - The verbosity level (see @ref GA_STAT_LEVEL)
41  ///
42  /// @return false if no stat information was filled out
43  ///
44  /// The base class implementation will be sufficient for most attributes.
45  /// - If the attribute has no GA_AIFJSON implementation (that is, the
46  /// attribute can't be saved or loaded), then the info() method will
47  /// return false.
48  /// - If the attribute has a GA_AIFTuple interface, the info will be @code
49  /// info.sprintf("%s %s::%s[%d]", tuple->getStorage(),
50  /// getType().getName(), getName(), tuple->getTupleSize());
51  /// @endcode
52  /// - Otherwise, the format will be @code
53  /// info.sprintf("%s::%s", getType().getName(), getName());
54  /// @endcode
55  virtual bool info(const GA_Attribute *attrib,
56  UT_WorkBuffer &info,
57  uint level) const;
58 };
59 
60 #endif
Definition of a geometry attribute.
Definition: GA_Attribute.h:198
GLint level
Definition: glcorearb.h:108
#define GA_API
Definition: GA_API.h:14
Class to fill GA_Stat information about an attribute. This AIF is used to fill GA_Stat type informati...
Definition: GA_AIFStat.h:30
unsigned int uint
Definition: SYS_Types.h:45