HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
STY_Results.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: STY_Results.h ( STY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __STY_Results__
12 #define __STY_Results__
13 
14 #include "STY_API.h"
15 #include "STY_Style.h"
16 #include "STY_Types.h"
17 #include <UT/UT_StringMap.h>
18 
19 /// A combination of a single property value and the style entry that
20 /// set the value.
22 {
23 public:
25  { }
27  const STY_StyleHandle &source)
28  : myValue(value),
29  mySource(source)
30  { }
31  void clear()
32  {
33  myValue.reset();
34  mySource.reset();
35  }
36  bool isClear() const
37  {
38  return !myValue && !mySource;
39  }
40 
43 };
44 
45 namespace UT {
46 template<>
48 {
50  static void clear(STY_Result &v)
51  { v.clear(); }
53  static bool isClear(STY_Result &v)
54  { return v.isClear(); }
56  static void clearConstruct(STY_Result *p)
57  { new((void *)p) STY_Result(); }
58 
59  static const bool clearNeedsDestruction = false;
60 };
61 }
62 
63 /// A map of property names to result values.
65  public UT_ArrayStringMap<STY_Result>
66 {
67 public:
68  void merge(const STY_ResultMap &src);
69  void merge(const STY_ConstantMap &src);
70  uint hash() const;
71 
73 };
74 
75 namespace UT {
76 template<>
78  public DefaultClearer<STY_ResultMap::Base>
79 {};
80 }
81 
82 /// This is the data type returned when evaluating style sheet results.
83 /// The top level string map is the category name (one of the STY_OVERRIDE_*
84 /// constants). Each STY_ResultMap contains the result key/value pairs
85 /// within that category.
87  public UT_ArrayStringMap<STY_ResultMap>
88 {
89 };
90 
91 #endif
92 
const GLdouble * v
Definition: glcorearb.h:836
static SYS_FORCE_INLINE void clear(STY_Result &v)
Definition: STY_Results.h:50
static SYS_FORCE_INLINE void clearConstruct(STY_Result *p)
Definition: STY_Results.h:56
static SYS_FORCE_INLINE bool isClear(STY_Result &v)
Definition: STY_Results.h:53
#define STY_API
Definition: STY_API.h:10
void clear()
Definition: STY_Results.h:31
STY_StyleHandle mySource
Definition: STY_Results.h:42
#define SYS_FORCE_INLINE
Definition: SYS_Inline.h:45
GLsizei GLsizei GLchar * source
Definition: glcorearb.h:802
STY_Result(const STY_ConstantHandle &value, const STY_StyleHandle &source)
Definition: STY_Results.h:26
unsigned int uint
Definition: SYS_Types.h:33
GLsizei const GLfloat * value
Definition: glcorearb.h:823
bool isClear() const
Definition: STY_Results.h:36
STY_ConstantHandle myValue
Definition: STY_Results.h:41
A map of property names to result values.
Definition: STY_Results.h:64
GLenum src
Definition: glcorearb.h:1792