HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_IntrinsicEval.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_IntrinsicEval.h ( GA Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GA_IntrinsicEval__
12 #define __GA_IntrinsicEval__
13 
14 #include "GA_API.h"
15 #include "GA_Types.h" // For GA_LocalIntrinsic
16 
17 class GA_IntrinsicDef;
19 
20 /// Class used to keep track of inheritance of intrinsic attribute evaluation
22 {
23 public:
24  /// Evaluating a global intrinsic attribute
26  GA_LocalIntrinsic local_handle);
27 
28  /// Destructor
30 
31  /// Return the user id for the given set of intrinsic attributes. This
32  /// method is used during evaluation of intrinsic attributes. The
33  /// IntrinsicDef object should have been initialized during the definition
34  /// of the user attributes. Example code might be: @code
35  /// static GA_IntrinsicDef theIntrinsicDef;
36  ///
37  /// int
38  /// MyClass::localIntrinsicTupleSize(const GA_IntrinsicEval &eval)
39  /// {
40  /// switch (eval.getUserId(theIntrinsicDef))
41  /// {
42  /// case 0:
43  /// return INTRINSIC_ATTRIBUTE_0_TUPLE_SIZE;
44  /// case 1:
45  /// return INTRINSIC_ATTRIBUTE_1_TUPLE_SIZE;
46  /// default:
47  /// break;
48  /// }
49  /// return MyBaseClass::localIntrinsicTupleSize(eval);
50  /// }
51  /// @endcode
52  /// @see GA_IntrinsicManager
53  int getUserId(const GA_IntrinsicDef &def) const;
54 
55  /// @private
56  /// Return the raw handle
57  int handle() const { return myHandle; }
58 
59 private:
60  const GA_IntrinsicManager &myManager;
61  int myHandle;
62 };
63 
64 #endif
Manager to keep track of global handle to name mappings.
#define GA_API
Definition: GA_API.h:14
Stores information about intrinsic attributes for classes.
int GA_LocalIntrinsic
Definition: GA_Types.h:703
Class used to keep track of inheritance of intrinsic attribute evaluation.