![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
RAII scope token batching mutation notifications for a single entity. More...
#include <BRepGraph_MutGuard.hxx>
Public Member Functions | |
| BRepGraph_MutGuard (BRepGraph *theGraph, T *theEntity, const TypeId theId) | |
| Construct a guard over a mutable entity. | |
| ~BRepGraph_MutGuard () | |
Destructor: notifies the graph if the guard owns an entity AND at least one setter (or MarkDirty) flagged it modified. | |
| BRepGraph_MutGuard (BRepGraph_MutGuard &&theOther) noexcept | |
| BRepGraph_MutGuard & | operator= (BRepGraph_MutGuard &&theOther) noexcept |
| BRepGraph_MutGuard (const BRepGraph_MutGuard &)=delete | |
| BRepGraph_MutGuard & | operator= (const BRepGraph_MutGuard &)=delete |
| operator bool () const noexcept | |
| True when the guard still owns an entity; false after a move or when constructed in an inert state. | |
| const T * | operator-> () const |
| Read-only access via pointer syntax. Field writes go through the Editor's typed setters. | |
| const T & | operator* () const |
| Read-only dereference. | |
| TypeId | Id () const noexcept |
| Identity for notification. | |
| BRepGraph * | Graph () const noexcept |
| Owning graph pointer (nullptr after move). | |
| void | MarkDirty () noexcept |
Flag the guarded entity as modified without writing through Internal(). Use when an external mutation (e.g. in-place geometry transform on a shared Geom handle) is not visible to the guard. | |
| bool | IsDirty () const noexcept |
True if Internal() or MarkDirty() flagged the entity modified. | |
| T & | Internal () noexcept |
INTERNAL USE ONLY. Mutable accessor; auto-flags dirty. External code MUST go through Editor's typed setters. Use operator->() / operator*() for reads. | |
RAII scope token batching mutation notifications for a single entity.
Obtained via BRepGraph::Editor().<Ops>().Mut() / MutRef() / MutSurface() etc. Reads via operator->() / operator*(); writes via Editor's typed setters (or Internal() for in-tree structural remaps). Any call to Internal() flags the guard dirty and the destructor fires markModified / markRefModified / markRepModified once on scope exit.
Move-only; non-copyable. After a move, the source guard becomes inert.
Compile-time dispatch selects the ID type and notification method:
|
inline |
Construct a guard over a mutable entity.
| [in] | theGraph | owning graph (used for notification on destruction) |
| [in] | theEntity | pointer to the mutable entity |
| [in] | theId | identity for notification |
|
inline |
Destructor: notifies the graph if the guard owns an entity AND at least one setter (or MarkDirty) flagged it modified.
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
Owning graph pointer (nullptr after move).
|
inlinenoexcept |
Identity for notification.
|
inlinenoexcept |
INTERNAL USE ONLY. Mutable accessor; auto-flags dirty. External code MUST go through Editor's typed setters. Use operator->() / operator*() for reads.
|
inlinenoexcept |
True if Internal() or MarkDirty() flagged the entity modified.
|
inlinenoexcept |
Flag the guarded entity as modified without writing through Internal(). Use when an external mutation (e.g. in-place geometry transform on a shared Geom handle) is not visible to the guard.
|
inlineexplicitnoexcept |
True when the guard still owns an entity; false after a move or when constructed in an inert state.
|
inline |
Read-only dereference.
|
inline |
Read-only access via pointer syntax. Field writes go through the Editor's typed setters.
|
inlinenoexcept |
|
delete |