24 #ifndef PXR_USD_USD_NOTICE_H 25 #define PXR_USD_USD_NOTICE_H 28 #include "pxr/usd/usd/api.h" 33 #include "pxr/usd/sdf/path.h" 36 PXR_NAMESPACE_OPEN_SCOPE
55 const UsdStageWeakPtr &
GetStage()
const {
return _stage; }
58 UsdStageWeakPtr _stage;
108 using _PathsToChangesMap =
109 std::map<SdfPath, std::vector<const SdfChangeList::Entry*>>;
113 const _PathsToChangesMap *resyncChanges,
114 const _PathsToChangesMap *infoChanges)
116 , _resyncChanges(resyncChanges)
117 , _infoChanges(infoChanges) {}
150 class iterator :
public boost::iterator_adaptor<
152 _PathsToChangesMap::const_iterator,
158 : iterator_adaptor_(base_type()) {}
174 friend class boost::iterator_core_access;
176 iterator(base_type baseIter)
177 : iterator_adaptor_(baseIter) {}
178 inline reference dereference()
const {
179 return base()->first;
183 using const_iterator = iterator;
188 explicit operator SdfPathVector()
const {
189 return SdfPathVector(
begin(),
end());
194 return !_changes || _changes->empty();
199 return _changes ? _changes->size() : 0;
204 return iterator(_changes->cbegin());
209 return iterator(_changes->cbegin());
214 return iterator(_changes->cend());
219 return iterator(_changes->cend());
226 return const_iterator(_changes->find(path));
231 explicit PathRange(
const _PathsToChangesMap* changes)
235 const _PathsToChangesMap* _changes;
278 const _PathsToChangesMap *_resyncChanges;
279 const _PathsToChangesMap *_infoChanges;
311 const std::vector<std::string>& mutedLayers,
312 const std::vector<std::string>& unmutedLayers)
314 _mutedLayers(mutedLayers),
315 _unMutedLayers(unmutedLayers) {}
334 return _unMutedLayers;
338 const std::vector<std::string>& _mutedLayers;
339 const std::vector<std::string>& _unMutedLayers;
345 PXR_NAMESPACE_CLOSE_SCOPE
347 #endif // PXR_USD_USD_NOTICE_H Container class for Usd notices.
An iterable range of paths to objects that have changed.
const_iterator cend() const
Return the end iterator for this range.
The base class for objects used to notify interested parties (listeners) when events have occurred.
bool AffectedObject(const UsdObject &obj) const
Return true if obj was possibly affected by the layer changes that generated this notice.
size_t size() const
Return the number of paths in this range.
The outermost container for scene description, which owns and presents composed prims as a scenegraph...
USD_API bool ChangedInfoOnly(const UsdObject &obj) const
Return true if obj was changed but not resynced by the layer changes that generated this notice.
const UsdStageWeakPtr & GetStage() const
Return the stage associated with this notice.
Notice sent when a stage's EditTarget has changed.
USD_API PathRange GetResyncedPaths() const
Return the set of paths that are resynced in lexicographical order.
const_iterator find(const SdfPath &path) const
Return an iterator to the specified path in this range if it exists, or end() if it does not.
iterator end() const
Return the end iterator for this range.
Notice sent after a set of layers have been newly muted or unmuted.
Base class for UsdStage notices.
Ultra-conservative notice sent when the given UsdStage's contents have changed in any way.
Notice sent in response to authored changes that affect UsdObjects.
Base class for Usd scenegraph objects, providing common API.
std::vector< TfToken > TfTokenVector
Convenience types.
A path value used to locate objects in layers or scenegraphs.
const_iterator cbegin() const
Return iterator to the start of this range.
bool empty() const
Return true if this range contains any paths, false otherwise.
const std::vector< std::string > & GetMutedLayers() const
Returns the identifier of the layers that were muted.
iterator begin() const
Return iterator to the start of this range.
USD_API bool ResyncedObject(const UsdObject &obj) const
Return true if obj was resynced by the layer changes that generated this notice.
USD_API PathRange GetChangedInfoOnlyPaths() const
Return the set of paths that have only info changes (those that do not affect the structure of cached...
const std::vector< std::string > & GetUnmutedLayers() const
Returns the identifier of the layers that were unmuted.
USD_API TfTokenVector GetChangedFields(const UsdObject &obj) const
Return the set of changed fields in layers that affected obj.
USD_API bool HasChangedFields(const UsdObject &obj) const
Return true if there are any changed fields that affected obj, false otherwise.