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  bool isEmpty() const;
45 
46  // Control over the stage population mask.
47  void setPopulateAll();
48  bool populateAll() const;
49 
50  void addPopulatePath(const UT_StringHolder &path);
51  void removePopulatePath(const UT_StringHolder &path,
52  bool remove_children = false);
53  void removeAllPopulatePaths();
54 
55  bool isPathPopulated(const UT_StringHolder &path,
57  HUSD_MATCH_EXACT) const;
59  { return myPopulatePaths; }
60 
61  // Control over the layer muting.
62  void addMuteLayer(const UT_StringHolder &identifier);
63  void removeMuteLayer(const UT_StringHolder &identifier);
64  void removeAllMuteLayers();
65 
66  bool isLayerMuted(const UT_StringHolder &identifier) const
67  { return myMuteLayers.contains(identifier); }
69  { return myMuteLayers; }
70 
71  // Control over the payload configuration.
72  void setLoadAll();
73  bool loadAll() const;
74 
75  void addLoadPath(const UT_StringHolder &path);
76  void removeLoadPath(const UT_StringHolder &path,
77  bool remove_children = false);
78  void removeAllLoadPaths();
79 
80  // Combine two load masks, as we'd want when merging two stages.
81  void merge(const HUSD_LoadMasks &other);
82 
83  bool isPathLoaded(const UT_StringHolder &path,
85  HUSD_MATCH_EXACT) const;
87  { return myLoadPaths; }
88 
90 
91 private:
92  UT_SortedStringSet myPopulatePaths;
93  UT_SortedStringSet myMuteLayers;
94  UT_SortedStringSet myLoadPaths;
95  bool myPopulateAll;
96  bool myLoadAll;
97 };
98 
99 #endif
100 
const UT_SortedStringSet & muteLayers() const
GLsizei const GLchar *const * path
Definition: glcorearb.h:3341
#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
static const HUSD_LoadMasks theEmptyLoadMasks
bool isLayerMuted(const UT_StringHolder &identifier) const