Open CASCADE Technology Reference Manual 8.0.2
Loading...
Searching...
No Matches
BRepGraph_CopyRemap Class Reference

Immutable context passed to layer copy callbacks. More...

#include <BRepGraph_CopyRemap.hxx>

Public Types

enum class  Mode : std::uint8_t { Copy = 0 , Compact = 1 }
 Distinguishes copy vs. compact migration semantics. More...
enum class  MappingKind : std::uint8_t { Explicit = 0 , Identity = 1 }
 Distinguishes explicit item map vs. identity mapping. More...
using ItemMap = NCollection_FlatDataMap<BRepGraph_ItemId, BRepGraph_ItemId>

Public Member Functions

 BRepGraph_CopyRemap (const BRepGraph &theSourceGraph, BRepGraph &theTargetGraph, const ItemMap &theItemRemap, const Mode theMode) noexcept
 BRepGraph_CopyRemap (const BRepGraph &theSourceGraph, BRepGraph &theTargetGraph, MappingKind theMappingKind, Mode theMode) noexcept
 Identity-mapping constructor for full identity copy into an empty target. Source item ids are returned directly as target item ids after validation.
Mode CopyMode () const noexcept
 Migration mode of this context.
bool IsCompact () const noexcept
 True if this is a compaction migration (not a full copy).
const BRepGraph & SourceGraph () const noexcept
 Source graph the copied layer is attached to.
BRepGraph & TargetGraph () const noexcept
 Target graph whose structural contents have already been copied.
const BRepGraph & TargetGraphConst () const noexcept
 Target graph as const.
const ItemMap & Items () const noexcept
 Source item id -> target item id map for copied definitions, refs, and reps.
BRepGraph_ItemId TargetItem (const BRepGraph_ItemId theSourceItem) const
 Return the target item for a source item, or an invalid item if not copied.
BRepGraph_ItemId TargetItemOrInvalid (const BRepGraph_ItemId theSourceItem) const
 Return the target item for a source item, or an invalid item id.
bool HasTargetItem (const BRepGraph_ItemId theSourceItem) const
 Return true if the source item has a valid copied target item.
BRepGraph_ItemUID SourceUID (const BRepGraph_ItemId theSourceItem) const
 Return source UID for a source item.
BRepGraph_ItemUID TargetUID (const BRepGraph_ItemId theTargetItem) const
 Return target UID for a target item.
BRepGraph_ItemUID TargetUIDFromSource (const BRepGraph_ItemId theSourceItem) const
 Return target UID for a source item by source->target remap.

Detailed Description

Immutable context passed to layer copy callbacks.

The structural copy algorithm owns remap construction. Layers receive this context and decide how to copy their own representation without exposing layer details back to BRepGraph_Copy.

Member Typedef Documentation

◆ ItemMap

Member Enumeration Documentation

◆ MappingKind

enum class BRepGraph_CopyRemap::MappingKind : std::uint8_t
strong

Distinguishes explicit item map vs. identity mapping.

Enumerator
Explicit 

Use theItemRemap for source->target resolution.

Identity 

Source and target ids are identical (full identity copy).

◆ Mode

enum class BRepGraph_CopyRemap::Mode : std::uint8_t
strong

Distinguishes copy vs. compact migration semantics.

Enumerator
Copy 

Full graph copy: source and target are distinct graphs.

Compact 

In-place compaction: layers migrate into the same (rebuilt) graph.

Constructor & Destructor Documentation

◆ BRepGraph_CopyRemap() [1/2]

BRepGraph_CopyRemap::BRepGraph_CopyRemap ( const BRepGraph & theSourceGraph,
BRepGraph & theTargetGraph,
const ItemMap & theItemRemap,
const Mode theMode )
noexcept

◆ BRepGraph_CopyRemap() [2/2]

BRepGraph_CopyRemap::BRepGraph_CopyRemap ( const BRepGraph & theSourceGraph,
BRepGraph & theTargetGraph,
MappingKind theMappingKind,
Mode theMode )
noexcept

Identity-mapping constructor for full identity copy into an empty target. Source item ids are returned directly as target item ids after validation.

Member Function Documentation

◆ CopyMode()

Mode BRepGraph_CopyRemap::CopyMode ( ) const
inlinenodiscardnoexcept

Migration mode of this context.

◆ HasTargetItem()

bool BRepGraph_CopyRemap::HasTargetItem ( const BRepGraph_ItemId theSourceItem) const
nodiscard

Return true if the source item has a valid copied target item.

◆ IsCompact()

bool BRepGraph_CopyRemap::IsCompact ( ) const
inlinenodiscardnoexcept

True if this is a compaction migration (not a full copy).

◆ Items()

const ItemMap & BRepGraph_CopyRemap::Items ( ) const
inlinenodiscardnoexcept

Source item id -> target item id map for copied definitions, refs, and reps.

◆ SourceGraph()

const BRepGraph & BRepGraph_CopyRemap::SourceGraph ( ) const
inlinenodiscardnoexcept

Source graph the copied layer is attached to.

◆ SourceUID()

BRepGraph_ItemUID BRepGraph_CopyRemap::SourceUID ( const BRepGraph_ItemId theSourceItem) const
nodiscard

Return source UID for a source item.

◆ TargetGraph()

BRepGraph & BRepGraph_CopyRemap::TargetGraph ( ) const
inlinenodiscardnoexcept

Target graph whose structural contents have already been copied.

◆ TargetGraphConst()

const BRepGraph & BRepGraph_CopyRemap::TargetGraphConst ( ) const
inlinenodiscardnoexcept

Target graph as const.

◆ TargetItem()

BRepGraph_ItemId BRepGraph_CopyRemap::TargetItem ( const BRepGraph_ItemId theSourceItem) const
nodiscard

Return the target item for a source item, or an invalid item if not copied.

◆ TargetItemOrInvalid()

BRepGraph_ItemId BRepGraph_CopyRemap::TargetItemOrInvalid ( const BRepGraph_ItemId theSourceItem) const
nodiscard

Return the target item for a source item, or an invalid item id.

◆ TargetUID()

BRepGraph_ItemUID BRepGraph_CopyRemap::TargetUID ( const BRepGraph_ItemId theTargetItem) const
nodiscard

Return target UID for a target item.

◆ TargetUIDFromSource()

BRepGraph_ItemUID BRepGraph_CopyRemap::TargetUIDFromSource ( const BRepGraph_ItemId theSourceItem) const
nodiscard

Return target UID for a source item by source->target remap.


The documentation for this class was generated from the following file: