OCCT-Light 0.1
C ABI and C++ veneer for multi-language CAD workflows
Loading...
Searching...
No Matches
occtl::Batch Class Reference

RAII handle for a batched graph mutation scope. Mirrors occtl_batch_t. More...

#include <topo.hpp>

Public Member Functions

 Batch (const Batch &)=delete
 
Batchoperator= (const Batch &)=delete
 
 Batch (Batch &&theOther) noexcept
 Move constructor — takes ownership from theOther.
 
Batchoperator= (Batch &&theOther) noexcept
 Move assignment — releases any previously-owned batch.
 
 ~Batch () noexcept
 Calls abort on destruction if the batch has not been committed. Swallows the abort status so the destructor never throws.
 
::occtl_graph_tgraph () noexcept
 Returns a borrowed pointer to the graph this batch is scoped over.
 
void commit ()
 Commits all deferred mutations in the batch to the graph. After this call the batch handle is freed; further calls are no-ops.
 
void abort ()
 Aborts the batch, discarding all deferred mutations. NULL-tolerant; idempotent.
 

Friends

class Graph
 

Detailed Description

RAII handle for a batched graph mutation scope. Mirrors occtl_batch_t.

Created by Graph::begin_batch(). Mutations performed on the graph while a Batch is alive are deferred; commit() applies them, abort() discards them. The destructor calls occtl_batch_abort if the batch has not been committed or moved-from. Move-only.

Member Function Documentation

◆ commit()

void occtl::Batch::commit ( )
inline

Commits all deferred mutations in the batch to the graph. After this call the batch handle is freed; further calls are no-ops.

Exceptions
Erroron failure.

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