HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
HUSD_LoadMasks.h
Go to the documentation of this file.
1 /*
2  * Copyright 2019 Side Effects Software Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 
18 #ifndef __HUSD_LoadMasks_h__
19 #define __HUSD_LoadMasks_h__
20 
21 #include "HUSD_API.h"
22 #include <UT/UT_StringSet.h>
23 
25 {
30 };
31 
33 {
34 public:
36  ~HUSD_LoadMasks();
37 
38  bool operator==(const HUSD_LoadMasks&other) const;
39  bool operator!=(const HUSD_LoadMasks&other) const
40  { return !(*this == other); }
41 
42  void save(std::ostream &os) const;
43  bool load(UT_IStream &is);
44 
45  // Control over the stage population mask.
46  void setPopulateAll();
47  bool populateAll() const;
48 
49  void addPopulatePath(const UT_StringHolder &path);
50  void removePopulatePath(const UT_StringHolder &path,
51  bool remove_children = false);
52  void removeAllPopulatePaths();
53 
54  bool isPathPopulated(const UT_StringHolder &path,
56  HUSD_MATCH_EXACT) const;
58  { return myPopulatePaths; }
59 
60  // Control over the layer muting.
61  void addMuteLayer(const UT_StringHolder &identifier);
62  void removeMuteLayer(const UT_StringHolder &identifier);
63  void removeAllMuteLayers();
64 
65  bool isLayerMuted(const UT_StringHolder &identifier) const
66  { return myMuteLayers.contains(identifier); }
68  { return myMuteLayers; }
69 
70  // Control over the payload configuration.
71  void setLoadAll();
72  bool loadAll() const;
73 
74  void addLoadPath(const UT_StringHolder &path);
75  void removeLoadPath(const UT_StringHolder &path,
76  bool remove_children = false);
77  void removeAllLoadPaths();
78 
79  // Combine two load masks, as we'd want when merging two stages.
80  void merge(const HUSD_LoadMasks &other);
81 
82  bool isPathLoaded(const UT_StringHolder &path,
84  HUSD_MATCH_EXACT) const;
86  { return myLoadPaths; }
87 
88 private:
89  UT_SortedStringSet myPopulatePaths;
90  UT_SortedStringSet myMuteLayers;
91  UT_SortedStringSet myLoadPaths;
92  bool myPopulateAll;
93  bool myLoadAll;
94 };
95 
96 #endif
97 
const UT_SortedStringSet & muteLayers() const
#define HUSD_API
Definition: HUSD_API.h:32
const UT_SortedStringSet & populatePaths() const
bool operator==(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
Definition: Dimensions.h:137
HUSD_LoadMasksMatchStyle
bool operator!=(const HUSD_LoadMasks &other) const
const UT_SortedStringSet & loadPaths() const
GLsizei const GLchar *const * path
Definition: glew.h:6461
bool isLayerMuted(const UT_StringHolder &identifier) const