|
| | BRepGraph_LayerLock () |
| | Create lock-owner storage.
|
| const Standard_GUID & | ID () const override |
| | Return this layer type GUID.
|
| bool | FindOwnerId (const BRepGraph_ItemId theItem, Standard_GUID &theOwnerId) const |
| | Return owner ID for an item. Traverses upward for nodes/refs to find the root owner entry.
|
| bool | FindOwnerId (const BRepGraph_NodeId theNode, Standard_GUID &theOwnerId) const |
| | Return owner ID for a node.
|
| bool | FindOwnerId (const BRepGraph_RefId theRef, Standard_GUID &theOwnerId) const |
| | Return owner ID for a reference.
|
| bool | HasOwner (const BRepGraph_ItemId theItem) const |
| | Return true if an item's IsOwned bit-flag is set. This is an O(1) check. Use FindOwnerId() to resolve the actual owner GUID.
|
| bool | HasOwner (const BRepGraph_NodeId theNode) const |
| | Return true if a node's IsOwned bit-flag is set.
|
| bool | HasOwner (const BRepGraph_RefId theRef) const |
| | Return true if a reference's IsOwned bit-flag is set.
|
| void | SetOwner (const BRepGraph_ItemId theItem, const Standard_GUID &theOwnerId) |
| | Register an owner ID and set the graph item's ownership flag. For nodes, propagates the IsOwned bit-flag to all descendants. Rejects if the item is already covered by an ancestor root with a different GUID.
|
| bool | SetOwner (const BRepGraph_ItemId theItem, const Standard_GUID &theOwnerId, const bool theToUpdateRevision) |
| | Register an owner ID and set the graph item's ownership flag. Returns true when owner storage changed. Revision update can be deferred by bulk callers.
|
| void | SetOwner (const BRepGraph_NodeId theNode, const Standard_GUID &theOwnerId) |
| | Register an owner ID and set the node ownership flag.
|
| void | SetOwner (const BRepGraph_RefId theRef, const Standard_GUID &theOwnerId) |
| | Register an owner ID and set the reference ownership flag.
|
| void | UnsetOwner (const BRepGraph_ItemId theItem) |
| | Remove an owner and clear the graph item's ownership flag. For node roots, clears the IsOwned bit-flag on all descendants.
|
| void | UnsetOwner (const BRepGraph_ItemId theItem, const Standard_GUID &theOwnerId) |
| | Remove an owner and clear the graph item's ownership flag if owner ID matches.
|
| void | UnsetOwner (const BRepGraph_NodeId theNode) |
| | Remove an owner and clear the node ownership flag.
|
| void | UnsetOwner (const BRepGraph_RefId theRef) |
| | Remove an owner and clear the reference ownership flag.
|
| bool | HasOwners () const |
| | Return true if at least one root entry exists.
|
| void | ReserveOwners (const size_t theNbOwners) |
| | Reserve owner map buckets for bulk registration.
|
| void | TouchOwners () |
| | Mark owner metadata changed after a bulk update.
|
| const TCollection_AsciiString & | Name () const override |
| | Layer identity (unique within a graph).
|
| void | OnNodeRemoved (const BRepGraph_NodeId theNode) noexcept override |
| | Called when a node is soft-removed without a replacement.
|
| void | OnNodeReplaced (const BRepGraph_NodeId theOldNode, const BRepGraph_NodeId theNewNode) noexcept override |
| | Called when a node is soft-removed and replaced by another node.
|
| void | CopyTo (const BRepGraph_CopyRemap &theCopy) const override |
| | Copy this source layer data into another graph. The source graph is the graph this layer is attached to (Graph()).
|
| void | OnRefRemoved (const BRepGraph_RefId theRef) noexcept override |
| | Called when a reference is soft-deleted via RemoveRef(). No replacement concept - refs are simply removed (unlike nodes which can have a replacement during sewing or deduplication). Dispatched to all layers regardless of SubscribedRefKinds(). Default: no-op.
|
| void | InvalidateAll () noexcept override |
| | Mark all cached values dirty (bulk invalidation).
|
| void | Clear () noexcept override |
| | Clear all stored data.
|
| void | OnItemRemoved (const BRepGraph_ItemId theItem) noexcept |
| | Dispatch a generic item removal to the matching typed removal callback. This is a non-virtual convenience entry point; typed callbacks remain the extension points for derived layers.
|
| virtual int | SubscribedKinds () const |
| | Return a bitmask of BRepGraph_NodeId::Kind values this layer subscribes to. Only modification events matching subscribed kinds are dispatched. Default: 0 (no subscription - no modification events received). Override to receive OnNodeModified/OnNodesModified callbacks. The returned value must be constant for the lifetime of the layer.
|
| virtual void | OnNodeModified (const BRepGraph_NodeId theNode) noexcept |
| | Called in immediate (non-deferred) mode after a single node is modified. Only dispatched if the node's kind matches SubscribedKinds(). Default: no-op.
|
| void | OnItemModified (const BRepGraph_ItemId theItem) noexcept |
| | Dispatch a generic item modification to the matching typed modification callback. This is a non-virtual convenience entry point; typed callbacks remain the extension points for derived layers.
|
| virtual void | OnNodesModified (const NCollection_Array1< BRepGraph_NodeId > &theModifiedNodes) noexcept |
| | Called after EndDeferredInvalidation() with all nodes modified during the deferred scope. Only dispatched if at least one modified node's kind matches SubscribedKinds(). The array may contain nodes of kinds not subscribed to - layers should filter internally if needed. Default: no-op.
|
| virtual int | SubscribedRefKinds () const |
| | Return a bitmask of BRepGraph_RefId::Kind values this layer subscribes to. Only modification events matching subscribed ref kinds are dispatched. Default: 0 (no subscription). Must be constant for the layer's lifetime.
|
| virtual void | OnRefModified (const BRepGraph_RefId theRef) noexcept |
| | Called in immediate (non-deferred) mode after a single ref is mutated. Only dispatched if the ref's kind matches SubscribedRefKinds(). Default: no-op.
|
| virtual void | OnRefsModified (const NCollection_Array1< BRepGraph_RefId > &theModifiedRefs) noexcept |
| | Called after EndDeferredInvalidation() with all refs modified during the deferred scope. Only dispatched if at least one modified ref's kind matches SubscribedRefKinds(). The array may contain refs of kinds not subscribed to - layers should filter internally if needed. Default: no-op.
|
| uint64_t | Revision () const noexcept |
| | Monotonic revision counter incremented by touch() on every observable state change. Consumers compare stored revisions to detect staleness in O(1). Derived layers MUST call touch() from their mutators.
|
| Public Member Functions inherited from Standard_Transient |
| | Standard_Transient () |
| | Empty constructor.
|
| | Standard_Transient (const Standard_Transient &) |
| | Copy constructor – does nothing.
|
| Standard_Transient & | operator= (const Standard_Transient &) |
| | Assignment operator, needed to avoid copying reference counter.
|
| virtual | ~Standard_Transient ()=default |
| | Destructor must be virtual.
|
| virtual const opencascade::handle< Standard_Type > & | DynamicType () const |
| | Returns a type descriptor about this object.
|
| bool | IsInstance (const opencascade::handle< Standard_Type > &theType) const |
| | Returns a true value if this is an instance of Type.
|
| bool | IsInstance (const char *const theTypeName) const |
| | Returns a true value if this is an instance of TypeName.
|
| bool | IsKind (const opencascade::handle< Standard_Type > &theType) const |
| | Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
| bool | IsKind (const char *const theTypeName) const |
| | Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
|
| Standard_Transient * | This () const |
| | Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
|
| int | GetRefCount () const noexcept |
| | Get the reference counter of this object.
|
| void | IncrementRefCounter () noexcept |
| | Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
|
| int | DecrementRefCounter () noexcept |
| | Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
|
| virtual void | Delete () const |
| | Memory deallocator for transient classes.
|
Owner metadata layer for owned BRepGraph items.
Uses a root-based ownership model: only the highest owned item per group is stored in the map. All descendants receive the fast IsOwned bit-flag via automatic downward propagation. Owner lookup traverses upward to find the root entry.
Overlapping roots are forbidden: SetOwner rejects if the item is already covered by an ancestor root with a different GUID.
HasOwner() checks the IsOwned bit-flag (O(1)). FindOwnerId() traverses upward to find the root entry (O(depth)).