A container of options. More...
#include "IOption.hpp"
Inheritance diagram for IContainer< nam, Opts >:Public Types | |
| using | Name = NameT< nam > |
| using | Element = IGroup< nam, Opts... > |
| using | Feed = ifeed::Type< Element > |
Public Member Functions | |
| virtual size_t | size () const =0 |
| The number of actual elements. | |
| virtual bool | empty () const =0 |
| Returns size() == 0. | |
Access an actual element. | |
| virtual const Element & | operator[] (size_t idx) const =0 |
| virtual Element & | operator[] (size_t idx)=0 |
Access the default element. | |
Changes to it are also applied immediately to all actual elements. | |
| virtual const Element & | all () const =0 |
| virtual Element & | all ()=0 |
Access the feed element. | |
Values set on it are distributed over the actual elements and thereby define their number. | |
| virtual const Feed & | feed () const =0 |
| virtual Feed & | feed ()=0 |
iterator traversal | |
| Iterator< IContainer > | begin () |
| Iterator< const IContainer > | begin () const |
| Iterator< IContainer > | end () |
| Iterator< const IContainer > | end () const |
Public Member Functions inherited from IBase | |
| virtual Names | enumerator () const =0 |
| The option name as enumerator. | |
| virtual String | name () const =0 |
| The option name as string. | |
| virtual String | path () const =0 |
| The option name as string, preceded by the names of its parents, if any, interspersed with '.'. | |
| virtual String | shortDescription () const =0 |
| One-liner that describes this option. | |
| virtual String | longDescription () const =0 |
| Longer text that describes this option in more detail. | |
| virtual UsageLevel | minUsageLevel () const =0 |
| For a leaf, this is its own usage level. Otherwise, this is the minimum usage level of all descendants: basic < mid < pro. | |
| virtual Nodes | node () const =0 |
| The node type of this option. | |
A container of options.
| nam | The name of the container and its elements. |
| Opts | The sequence of options that composes each element. Provides access to specific elements by index, to the default-element, and to the feed-element. |