HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STY_OverrideCategory.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_OverrideCategory.h ( STY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __STY_OverrideCategory__
12 #define __STY_OverrideCategory__
13 
14 #include "STY_API.h"
15 #include "STY_Types.h"
16 #include <UT/UT_StringMap.h>
17 #include <UT/UT_NonCopyable.h>
18 #include <UT/UT_IntrusivePtr.h>
19 
20 class STY_LoadContext;
22 class UT_JSONValue;
23 
24 /// Contains a map of property names to the STY_Override objects that specify
25 /// the property values.
27  public UT_NonCopyable,
28  public UT_IntrusiveRefCounter<STY_OverrideCategory>
29 {
30 public:
32  const STY_LoadContext *load_context);
33  STY_OverrideCategory(const STY_OverrideMap &overrides);
35 
36  /// Return a reference to our overrides map.
38  { return myOverrides; }
39 
40  /// Gets data names that the overrde scripts are interested in
41  /// for their input argument binding.
42  void getBindingDataNames(UT_StringArray &names) const;
43 
44  /// Save this override set as JSON to a style sheet.
45  void saveStyleSheets(UT_JSONValue *values,
46  const UT_StringHolder &category,
48  const exint num_values,
49  bool evaluate_scripts,
50  bool allow_shared_scripts) const;
51 
52 private:
53  /// Parses JSON data and fills out the overrides data structure.
54  void loadDefinitions( const UT_JSONValue *json,
55  const STY_LoadContext *load_context );
56 
57  STY_OverrideMap myOverrides;
58 };
59 
60 #endif
61 
int64 exint
Definition: SYS_Types.h:125
#define STY_API
Definition: STY_API.h:10
A reference counter base class for use with UT_IntrusivePtr.
const STY_OverrideMap & getOverrides() const
Return a reference to our overrides map.
GLenum GLsizei GLsizei GLint * values
Definition: glcorearb.h:1602
Class to store JSON objects as C++ objects.
Definition: UT_JSONValue.h:99