| Home | Libraries | People | FAQ | More

##### NaryGenerator

###### Description

NaryGenerator is a composite generator that has one or more subjects. The NaryGenerator allows its subjects to be treated in the same way as a single instance of a `Generator` following the Composite Design Pattern.

###### Refinement of

> `Generator`

Notation

`g`

  A NaryGenerator.

`G`

  A NaryGenerator type.

###### Valid Expressions

In addition to the requirements defined in `Generator`, for any NaryGenerator the following must be met:

Expression | Semantics | Return type
--- | --- | ---
`g.elements` | The tuple of elements. | A Boost.Fusion Sequence of `Generator` types.

###### Type Expressions

Expression | Description
--- | ---
`g.elements_type` | Elements tuple type.
`traits::is_nary_generator<G>::type` | Metafunction that evaluates to `mpl::true_` if a certain type, `G` is a NaryGenerator, `mpl::false_` otherwise (See MPL Boolean Constant).

###### Invariants

For each element, `E`, in any NaryGenerator, `G`, the following invariant always holds:

- `traits::is_generator<E>::type` evaluates to `mpl::true_`

###### Models

The following generators conform to this model:

- Sequence (`<<`),
- Alternative (`|`).

FIXME Add more links to models of NaryGenerator concept