HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GSTY_SubjectPointGroup.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: GSTY_SubjectPointGroup.h ( GSTY Library, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef __GSTY_SubjectPointGroup__
12 #define __GSTY_SubjectPointGroup__
13 
14 #include "GSTY_API.h"
15 #include "GSTY_SubjectPoint.h"
16 #include <GOP/GOP_Manager.h>
17 #include <STY/STY_SubjectGroup.h>
19 #include <UT/UT_StringHolder.h>
20 #include <UT/UT_Array.h>
21 #include <UT/UT_Lock.h>
22 
23 class GA_ElementGroup;
24 class GEO_Detail;
25 
26 /// Represents a group of primitives that can be affected by style sheets.
28 {
29 public:
31  const GEO_Detail &gdp,
32  int start_idx, int end_idx,
33  int numeric_point_group_offset = 0,
34  bool apply_detail_style_attribute = true,
35  bool apply_point_style_attribute = true);
36  ~GSTY_SubjectPointGroup() override;
37 
38  int getNumSubjects() const override;
39  const STY_Subject &getSubject(int idx) const override;
40 
41  const GEO_Detail &getGdp(int idx) const;
42  GA_Offset getOffset(int idx) const;
43  const GA_ElementGroup *getGroup(const char *group_str);
44  const STY_StyleSheetHandle &getStyleSheet(const UT_StringHolder &ss_str);
45 
46 private:
47  typedef UT_ConcurrentHashMap<unsigned,
48  const GA_ElementGroup *> gsty_GroupMap;
49  typedef UT_ConcurrentHashMap<unsigned,
50  STY_StyleSheetHandle> gsty_StyleSheetMap;
51 
52  UT_Array<GSTY_SubjectPoint> mySubjects;
53  GOP_Manager myGopManager;
54  const GEO_Detail *myGdp;
55  gsty_GroupMap myParsedGroups;
56  gsty_StyleSheetMap myStyleSheets;
57  UT_Lock myLock;
58  int myNumericPointGroupOffset;
59 };
60 
61 #endif
62 
#define GSTY_API
Definition: GSTY_API.h:10
Represents a group of primitives that can be affected by style sheets.
GA_Size GA_Offset
Definition: GA_Types.h:641
virtual int getNumSubjects() const =0
Returns the number of subjects in this group.
virtual const STY_Subject & getSubject(int idx) const =0
Returns a subject by index.
#define UT_ConcurrentHashMap