HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
LOP_SelectionRule.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: LOP Library (C++)
7  *
8  * COMMENTS: Flat list of primitive paths, or rule-based description of a
9  * collection of USD primitives.
10  *
11  */
12 
13 #ifndef __LOP_SelectionRule_h__
14 #define __LOP_SelectionRule_h__
15 
16 #include "LOP_API.h"
17 #include <HUSD/HUSD_DataHandle.h>
18 #include <HUSD/HUSD_Utils.h>
19 #include <UT/UT_StringHolder.h>
20 #include <UT/UT_StringArray.h>
21 #include <UT/UT_StringMap.h>
22 #include <UT/UT_Error.h>
23 
24 class UT_JSONWriter;
25 class UT_JSONParser;
26 class HUSD_PathSet;
27 class HUSD_TimeCode;
28 
30 {
31 public:
34 
35  bool operator==(const LOP_SelectionRule &other) const;
36  bool operator!=(const LOP_SelectionRule &other) const;
37  int hash() const;
38 
39  void save(UT_JSONWriter &writer) const;
40  bool load(UT_JSONParser &parser);
41 
42  void getExpandedPathSet(HUSD_AutoAnyLock &lock,
43  int nodeid,
44  const HUSD_TimeCode &timecode,
46  UT_ErrorSeverity *error_severity = nullptr,
47  UT_StringHolder *error = nullptr) const;
48  void getCollectionAwarePathSet(HUSD_AutoAnyLock &lock,
49  int nodeid,
50  const HUSD_TimeCode &timecode,
51  HUSD_PathSet &paths,
52  UT_ErrorSeverity *error_severity = nullptr,
53  UT_StringHolder *error = nullptr) const;
54  bool copyToFindPrims(HUSD_FindPrims &findprims,
55  int nodeid,
56  const HUSD_TimeCode &timecode,
57  UT_ErrorSeverity *error_severity = nullptr,
58  UT_StringHolder *error = nullptr) const;
59 
61  { return myPathPattern; }
63  { myPathPattern = pattern; }
64 
66  { return myTraversalDemands; }
68  { myTraversalDemands = demands; }
69 
70  const UT_StringHolder &icon() const
71  { return myIcon; }
72  void setIcon(const UT_StringHolder &icon)
73  { myIcon = icon; }
74 
76  { return myAssumeWildcardsAroundPlainTokens; }
78  { myAssumeWildcardsAroundPlainTokens = assume; }
79 
80  bool caseSensitive() const
81  { return myCaseSensitive; }
82  void setCaseSensitive(bool casesensitive)
83  { myCaseSensitive = casesensitive; }
84 
85 private:
86  UT_StringHolder myPathPattern;
87  HUSD_PrimTraversalDemands myTraversalDemands;
88  UT_StringHolder myIcon;
89  bool myAssumeWildcardsAroundPlainTokens;
90  bool myCaseSensitive;
91 };
92 
94 
95 #endif
96 
UT_StringMap< LOP_SelectionRule > LOP_SelectionRuleMap
const UT_StringHolder & getPathPattern() const
UT_ErrorSeverity
Definition: UT_Error.h:25
JSON reader class which handles parsing of JSON or bJSON files.
Definition: UT_JSONParser.h:76
Class which writes ASCII or binary JSON streams.
Definition: UT_JSONWriter.h:34
void setPathPattern(const UT_StringHolder &pattern)
HUSD_PrimTraversalDemands
Definition: HUSD_Utils.h:31
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
void setCaseSensitive(bool casesensitive)
#define LOP_API
Definition: LOP_API.h:10
const UT_StringHolder & icon() const
void setIcon(const UT_StringHolder &icon)
bool assumeWildcardsAroundPlainTokens() const
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:165
GLubyte * pattern
Definition: glew.h:5711
bool caseSensitive() const
void setTraversalDemands(HUSD_PrimTraversalDemands demands)
HUSD_PrimTraversalDemands traversalDemands() const
void setAssumeWildcardsAroundPlainTokens(bool assume)
GLenum const void * paths
Definition: glew.h:13589