IContainer< name_, readOnly_, Opts_ > Struct Template Reference

A container of read-only options. More...

#include "IOption.hpp"

+ Inheritance diagram for IContainer< name_, readOnly_, Opts_ >:

Public Types

typedef std::conditional
< IsCons< Opts_ >::value,
IGroup< name_, readOnly_,
Opts_ >, ILeaf< name_,
readOnly_, Opts_ > >::type 
Element

Public Member Functions

virtual std::size_t size () const =0
 The number of actual elements.
virtual const Element & all () const =0
 Access the default element.
virtual const Element & operator[] (std::size_t idx) const =0
 Access an actual element.
- Public Member Functions inherited from IBase
virtual Names::Type 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 bool readOnly () const =0
 Returns true if this or any of its parents is read-only.
virtual UsageLevel::Type minUsageLevel () const =0
 For a leaf, this is its own usage level. For a node, this is the minimum usage level of all of its descendants: basic < mid < pro.
virtual Specs::Type specialization () const =0
 The sub-type of this option.

Detailed Description

template<Names::Type name_, bool readOnly_, class Opts_>
struct opals::opts::IContainer< name_, readOnly_, Opts_ >

A container of read-only options.

Template Parameters
name_The name of the container and its elements.
readOnly_If true, then this container and its elements may not be changed.
Opts_If a scalar, then the element type is ILeaf, with that scalar as value type. Otherwise, it is IGroup, with the respective sequence of group members. Provides access to specific elements and to the default element.

Member Function Documentation

virtual const Element& all ( ) const
pure virtual

Access the default element.

Changes to it are applied immediately to all actual elements.