NodesLib::Variant Struct Reference

#include <nodeslib.h>

Detailed Description

A Variant describes one of the possibilities among which a user can choose for a variant node template.

Public Member Functions

String ToString (const FormatStatement *fs=nullptr) const
 

Public Attributes

Id name
 
NodeTemplate templ
 
InternedId childSelector
 
Id childDefault
 

Member Function Documentation

◆ ToString()

String ToString ( const FormatStatement fs = nullptr) const

Member Data Documentation

◆ name

Id name

The name of the variant. If empty the key of the VariantTreeMap is used as name. This is used for leaf nodes as well as for inner nodes of the VariantTreeMap.

◆ templ

NodeTemplate templ

The actual node template to use. This is only needed for a leaf node of the VariantTreeMap.

◆ childSelector

InternedId childSelector

The name of the template parameter port to create for the selection of children. This is only needed for inner nodes of the VariantTreeMap.

◆ childDefault

Id childDefault

The default child to choose. This is only needed for inner nodes of the VariantTreeMap.