HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
STY_Material.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_Material.h ( STY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __STY_Material__
12 #define __STY_Material__
13 
14 #include "STY_API.h"
15 #include "STY_MaterialProperties.h"
16 #include <UT/UT_NonCopyable.h>
17 #include <UT/UT_IntrusivePtr.h>
18 
19 class STY_LoadContext;
20 class UT_JSONValueMap;
21 class UT_JSONValue;
22 
23 /// Represents a material defined within a style sheet.
25  public UT_NonCopyable,
26  public UT_IntrusiveRefCounter<STY_Material>
27 {
28 public:
29  STY_Material( const UT_JSONValue *json,
30  const STY_LoadContext *load_context );
31  ~STY_Material();
32 
34  getProperties() const
35  { return myProperties; }
36 
37  /// Save this material as JSON to a style sheet.
38  void saveStyleSheet(UT_JSONValueMap *map) const;
39 
40 private:
41  void loadStyleSheetMaterial( const UT_JSONValue *json,
42  const STY_LoadContext *load_context );
43 
44  STY_MaterialProperties myProperties;
45 };
46 
47 #endif
48 
UT_JSONValueMap stores a map/dictionary of UT_JSONValue objects.
Provides values for the properties of materials defined in a style sheet.
Represents a material defined within a style sheet.
Definition: STY_Material.h:24
#define STY_API
Definition: STY_API.h:10
A reference counter base class for use with UT_IntrusivePtr.
const STY_MaterialProperties & getProperties() const
Definition: STY_Material.h:34
Class to store JSON objects as C++ objects.
Definition: UT_JSONValue.h:99