IdOrBuilder Class Reference

#include <corenodes_helpers.h>

Detailed Description

This helper class wraps an Id or an IdBuilder (with implicit conversion constructors) and is used for the CoreNodeGroupInterface::Add methods to allow both types as arguments.

Public Member Functions

MAXON_IMPLICIT IdOrBuilder (const Id &nodeId)
 
MAXON_IMPLICIT IdOrBuilder (const LiteralId &nodeId)
 
MAXON_IMPLICIT IdOrBuilder (IdBuilder &&builder)
 
Result< IdGetId () const
 

Private Attributes

Id _id
 
IdBuilder _builder
 

Constructor & Destructor Documentation

◆ IdOrBuilder() [1/3]

MAXON_IMPLICIT IdOrBuilder ( const Id nodeId)

Implicitly constructs an IdOrBuilder from an Id.

Parameters
[in]nodeIdThe Id to wrap.

◆ IdOrBuilder() [2/3]

MAXON_IMPLICIT IdOrBuilder ( const LiteralId nodeId)

Implicitly constructs an IdOrBuilder from a LiteralId.

Parameters
[in]nodeIdThe Id to wrap.

◆ IdOrBuilder() [3/3]

Implicitly constructs an IdOrBuilder from an IdBuilder.

Parameters
[in]builderThe IdBuilder to wrap.

Member Function Documentation

◆ GetId()

Result<Id> GetId ( void  ) const

Returns the wrapped identifier as an Id.

Returns
The wrapped identifier.

Member Data Documentation

◆ _id

Id _id
private

◆ _builder

IdBuilder _builder
private