|
| | BRepGraph_LayerHistory () |
| | Default constructor.
|
| const Standard_GUID & | ID () const override |
| | Layer type identity.
|
| const TCollection_AsciiString & | Name () const override |
| | Layer display name.
|
| void | Record (const TCollection_AsciiString &theOpLabel, const BRepGraph_NodeId theOriginal, const NCollection_Array1< BRepGraph_NodeId > &theReplacements, const BRepGraph_LayerHistory::Kind theKind=BRepGraph_LayerHistory::Kind::Modified) |
| | Record a modification: theOriginal was replaced by theReplacements.
|
| void | RecordBatch (const TCollection_AsciiString &theOpLabel, const NCollection_Array1< BRepGraph_NodeId > &theOriginals, const NCollection_Array1< BRepGraph_NodeId > &theReplacements, const TCollection_AsciiString &theExtraInfo=TCollection_AsciiString(), const BRepGraph_LayerHistory::Kind theKind=BRepGraph_LayerHistory::Kind::Modified) |
| | Record a batch of 1-to-1 modifications in a single history event. Each original is paired with the replacement at the same logical position. More efficient than calling Record() in a loop: creates one HistoryRecord and updates the per-kind maps with minimal overhead.
|
| void | RecordDeleted (const TCollection_AsciiString &theOpLabel, const NCollection_Array1< BRepGraph_NodeId > &theDeleted) |
| | Record that a collection of inputs has been consumed by the operation and has no image in the result. Each input is appended to the deleted set and emits a single audit record with empty replacements.
|
| void | RecordReplaced (const TCollection_AsciiString &theOpLabel, const BRepGraph_NodeId theOriginal, const BRepGraph_NodeId theReplacement) |
| | Record replacements: each original is logically removed/detached and continued by the corresponding replacement. Replaced records participate in modified-image queries and also mark originals as deleted.
|
| void | RecordReplacedBatch (const TCollection_AsciiString &theOpLabel, const NCollection_Array1< BRepGraph_NodeId > &theOriginals, const NCollection_Array1< BRepGraph_NodeId > &theReplacements, const TCollection_AsciiString &theExtraInfo=TCollection_AsciiString()) |
| | Record a batch of 1-to-1 replacements in a single history event.
|
| void | RecordUid (const TCollection_AsciiString &theOpLabel, const BRepGraph_UID &theOriginal, const NCollection_Array1< BRepGraph_UID > &theReplacements, const BRepGraph_LayerHistory::Kind theKind=BRepGraph_LayerHistory::Kind::Modified) |
| | Record a UID-keyed modification/generation event.
|
| void | RecordDeletedUid (const TCollection_AsciiString &theOpLabel, const NCollection_Array1< BRepGraph_UID > &theDeleted) |
| | Record UID-keyed deletions.
|
| void | RecordItemUid (const TCollection_AsciiString &theOpLabel, const BRepGraph_ItemUID &theOriginal, const NCollection_Array1< BRepGraph_ItemUID > &theReplacements, const BRepGraph_LayerHistory::Kind theKind=BRepGraph_LayerHistory::Kind::Modified) |
| | Record an all-domain ItemUID-keyed modification/generation event.
|
| void | RecordDeletedItemUid (const TCollection_AsciiString &theOpLabel, const NCollection_Array1< BRepGraph_ItemUID > &theDeleted) |
| | Record ItemUID-keyed deletions.
|
| void | Absorb (const NCollection_DataMap< TopoDS_Shape, BRepGraph_NodeId, TopTools_ShapeMapHasher > &theInputs, const NCollection_DataMap< TopoDS_Shape, BRepGraph_NodeId, TopTools_ShapeMapHasher > &theOutputs, const occ::handle< BRepTools_History > &theSource, const TCollection_AsciiString &theOpLabel) |
| | Import a BRepTools_History into this graph-native history log.
|
| void | Absorb (const BRepGraph &theInputGraph, const BRepGraph &theOutputGraph, const NCollection_DataMap< TopoDS_Shape, BRepGraph_NodeId, TopTools_ShapeMapHasher > &theInputs, const NCollection_DataMap< TopoDS_Shape, BRepGraph_NodeId, TopTools_ShapeMapHasher > &theOutputs, const occ::handle< BRepTools_History > &theSource, const TCollection_AsciiString &theOpLabel) |
| | Import a BRepTools_History using persistent UIDs from source/result graphs.
|
| BRepGraph_NodeId | FindOriginal (const BRepGraph_NodeId theModified) const |
| | Walk backwards from a modified node to its original. Follows the reverse map recursively until a root is reached.
|
| NCollection_LinearVector< BRepGraph_NodeId > | FindDerived (const BRepGraph_NodeId theOriginal) const |
| | Walk forwards from an original node to all derived nodes, including both Modified and Generated descendants. Follows the forward maps recursively, collecting every transitively-reachable descendant (intermediate nodes and leaves alike, but not theOriginal itself).
|
| const NCollection_LinearVector< BRepGraph_NodeId > * | FindModified (const BRepGraph_NodeId theOriginal) const |
| | Direct lookup of the Modified images of theOriginal, non-recursive.
|
| const NCollection_LinearVector< BRepGraph_NodeId > * | FindGenerated (const BRepGraph_NodeId theOriginal) const |
| | Direct lookup of the Generated images of theOriginal, non-recursive.
|
| bool | IsDeleted (const BRepGraph_NodeId theOriginal) const |
| | Test whether theOriginal was deleted by some recorded operation.
|
| const NCollection_FlatMap< BRepGraph_NodeId > & | DeletedNodes () const |
| | Borrowed access to the full deleted set.
|
| const NCollection_LinearVector< BRepGraph_UID > * | FindModified (const BRepGraph_UID &theUID) const |
| | UID-keyed Modified images stored directly in this history.
|
| const NCollection_LinearVector< BRepGraph_NodeId > * | FindOriginals (const BRepGraph_NodeId theDerived) const |
| | Direct lookup of all immediate node origins of theDerived. A derived entity can have more than one parent in reconstructive algorithms.
|
| const NCollection_LinearVector< BRepGraph_UID > * | FindGenerated (const BRepGraph_UID &theUID) const |
| | UID-keyed Generated images stored directly in this history.
|
| bool | IsDeleted (const BRepGraph_UID &theUID) const |
| | UID-keyed deletion test stored directly in this history.
|
| const NCollection_FlatMap< BRepGraph_UID > & | DeletedUids () const |
| | UID-keyed deleted set stored directly in this history.
|
| bool | HasKnownInput (const BRepGraph_UID &theUID) const |
| | Test whether theUID was registered as an operation input.
|
| const NCollection_LinearVector< BRepGraph_ItemUID > * | FindModified (const BRepGraph_ItemUID &theUID) const |
| | ItemUID-keyed Modified images stored directly in this history.
|
| const NCollection_LinearVector< BRepGraph_ItemUID > * | FindGenerated (const BRepGraph_ItemUID &theUID) const |
| | ItemUID-keyed Generated images stored directly in this history.
|
| bool | IsDeleted (const BRepGraph_ItemUID &theUID) const |
| | ItemUID-keyed deletion test stored directly in this history.
|
| const NCollection_FlatMap< BRepGraph_ItemUID > & | DeletedItemUids () const |
| | ItemUID-keyed deleted set stored directly in this history.
|
| bool | HasKnownInput (const BRepGraph_ItemUID &theUID) const |
| | Test whether theUID was registered as an operation input.
|
| NCollection_LinearVector< BRepGraph_UID > | FindModified (const BRepGraph &theGraph, const BRepGraph_UID &theUID) const |
| | UID-keyed convenience: Modified images of the input identified by theUID, resolved against theGraph. Returns an empty vector if the UID cannot be resolved or has no Modified record.
|
| NCollection_LinearVector< BRepGraph_UID > | FindGenerated (const BRepGraph &theGraph, const BRepGraph_UID &theUID) const |
| | UID-keyed convenience: Generated images. See FindModified for the resolution contract.
|
| bool | IsDeleted (const BRepGraph &theGraph, const BRepGraph_UID &theUID) const |
| | UID-keyed convenience: deletion test.
|
| NCollection_LinearVector< BRepGraph_UID > | DeletedUids (const BRepGraph &theGraph) const |
| | UID-keyed convenience: dump the full deleted set as UIDs.
|
| size_t | NbRecords () const |
| | Number of recorded history events.
|
| const Event & | Record (const size_t theRecordIdx) const |
| | Access a record by index (0-based).
|
| void | SetEnabled (const bool theVal) |
| | Enable or disable history recording.
|
| bool | IsEnabled () const |
| | Query whether history recording is enabled.
|
| void | Clear () noexcept override |
| | Clear all records and lookup maps.
|
| void | OnNodeRemoved (const BRepGraph_NodeId theNode) noexcept override |
| | Layer removal callback. Records pure graph deletions when enabled.
|
| void | CopyTo (const BRepGraph_CopyRemap &theCopy) const override |
| | Copy history records whose source items have copied target items.
|
| void | InvalidateAll () noexcept override |
| | Clear derived caches by dropping collected history.
|
| 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 void | OnNodeReplaced (const BRepGraph_NodeId theOldNode, const BRepGraph_NodeId theNewNode) noexcept |
| | Called when a node is soft-removed and replaced by another node.
|
| 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 | OnRefRemoved (const BRepGraph_RefId theRef) noexcept |
| | 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.
|
| 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.
|
History layer for BRepGraph.
BRepGraph_LayerHistory maintains an append-only log of modification events and per-kind lookup maps for efficient queries. Four event kinds are tracked (see BRepGraph_LayerHistory::Kind):
- Modified: input -> { modified images } (default).
- Generated: input -> { generated images } (new entities born from the input but not sharing its identity).
- Deleted: input has been consumed and has no image in the result.
- Replaced: input was structurally detached and replaced by another node; this maps as Modified and also marks the input as deleted.
Recording can be toggled on/off at runtime. Graph-owned history is registered as a layer and accessed through #Ensure / #Find; algorithms wrapping OCCT's BRepTools_History can import results through Absorb.