![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/parse.hpp"
Sum Model : results from a disjunction of parsing clauses, which are are tested and accepted as alternatives, one at least.
Public Types | |
| using | Alt = lib::BranchCase< CASES... > |
| template<typename EXTRA > | |
| using | Additionally = AltModel< CASES..., EXTRA > |
| using | SubSeq = _Vari< AltModel, CASES... >::Prefix |
| a nested sub-model to extend | |
| using | Penult = _Vari< AltModel, CASES... >::Penult |
| plain value expected for left-branch | |
| using | Ultima = _Vari< AltModel, CASES... >::Ultima |
| plain value expected for right-branch | |
Public Types inherited from BranchCase< CASES... > | |
| using | SlotType = std::tuple_element_t< idx, tuple< TYPES... > > |
Static Public Attributes | |
| static constexpr size_t | N = sizeof...(CASES) |
Static Public Attributes inherited from BranchCase< CASES... > | |
| static constexpr auto | TOP |
| static constexpr auto | SIZ |
Static Public Member Functions | |
| static AltModel | mark_left (SubSeq &&leftCases) |
| static AltModel | mark_left (Penult &&leftCase) |
| static AltModel | mark_right (Ultima &&rightCase) |
Public Member Functions | |
| template<typename EXTRA > | |
| Additionally< EXTRA > | addBranch () |
Public Member Functions inherited from BranchCase< CASES... > | |
| BranchCase (size_t idx, INITS &&...inits) | |
| Standard constructor: select branch and provide initialiser. | |
| BranchCase (BranchCase const &o) | |
| BranchCase (BranchCase &&ro) | |
| auto | accept (FUN &&visitor) |
| Accept a visitor-functor (double dispatch). | |
| ~BranchCase () | |
| BranchCase & | operator= (BranchCase ref) |
| size_t | selected () const |
| SlotType< idx > & | get () |
| re-access the value, using compile-time slot-index param. | |
| auto | getAny () |
| access the selected value of a homogeneous model. | |
Private Member Functions | |
| template<typename INIT > | |
| AltModel (size_t branchID, INIT &&init) | |
Additional Inherited Members | |
Protected Member Functions inherited from BranchCase< CASES... > | |
| BranchCase ()=default | |
| TX & | emplace (INITS &&...inits) |
| TX & | access () |
| auto | selectBranch (FUN &&fun) |
| apply generic functor to the currently selected branch | |
Protected Attributes inherited from BranchCase< CASES... > | |
| size_t | branch_ |
| selector field to designate the chosen branch | |
| std::byte | buffer_ [SIZ] |
| opaque inline storage buffer with suitable size and alignment | |
|
inlineprivate |
| using Alt = lib::BranchCase<CASES...> |
Definition at line 456 of file parse.hpp.
References BranchCase< CASES... >::TOP.
Definition at line 462 of file parse.hpp.
References BranchCase< CASES... >::TOP.
|
staticconstexpr |
Inheritance diagram for AltModel< CASES >:
Collaboration diagram for AltModel< CASES >: