Vcsn  2.0
Be Rational
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
vcsn::rat::variadic< Type, Context > Class Template Reference

An inner node with multiple children. More...

#include <fwd.hh>

Inheritance diagram for vcsn::rat::variadic< Type, Context >:
Collaboration diagram for vcsn::rat::variadic< Type, Context >:

Public Types

using super_t = inner< Context >
 
using value_t = typename super_t::value_t
 
using values_t = typename super_t::values_t
 
using const_iterator = typename values_t::const_iterator
 
using iterator = const_iterator
 
using const_reverse_iterator = typename values_t::const_reverse_iterator
 
using reverse_iterator = const_reverse_iterator
 
- Public Types inherited from vcsn::rat::inner< Context >
using super_t = node< Context >
 
using value_t = typename super_t::value_t
 
- Public Types inherited from vcsn::rat::node< Context >
using context_t = Context
 
using node_t = rat::node< context_t >
 
using value_t = std::shared_ptr< const node_t >
 A ratexp usable with value semantics. More...
 
using values_t = std::vector< value_t >
 
using const_visitor = vcsn::rat::const_visitor< context_t >
 
- Public Types inherited from vcsn::rat::exp
using type_t = rat::type_t
 The possible types of ratexps. More...
 

Public Member Functions

virtual type_t type () const
 The type of this node. More...
 
const_iterator begin () const
 
const_iterator end () const
 
const_reverse_iterator rbegin () const
 
const_reverse_iterator rend () const
 
size_t size () const
 
const value_t operator[] (size_t n) const
 Access the n-th element. More...
 
const value_t head () const
 The first item of this variadic. More...
 
const value_t back () const
 The last item of this variadic. More...
 
auto tail () const -> decltype(boost::make_iterator_range(*this, 1, 0))
 The non-first items. More...
 
 variadic (const values_t &ns=values_t())
 
 variadic (const variadic &that)
 
values_t subs () const
 Return a copy of children. More...
 
virtual void accept (typename super_t::const_visitor &v) const
 
- Public Member Functions inherited from vcsn::rat::exp
virtual ~exp ()=default
 
bool is_unary () const
 Whether star, complement. More...
 
bool is_leaf () const
 Whether a leaf of the ratexp tree. More...
 

Private Attributes

values_t sub_
 

Detailed Description

template<type_t Type, typename Context>
class vcsn::rat::variadic< Type, Context >

An inner node with multiple children.

Implements the Composite Design Pattern.

Definition at line 123 of file fwd.hh.

Member Typedef Documentation

template<type_t Type, typename Context >
using vcsn::rat::variadic< Type, Context >::const_iterator = typename values_t::const_iterator

Definition at line 130 of file ratexp.hh.

template<type_t Type, typename Context >
using vcsn::rat::variadic< Type, Context >::const_reverse_iterator = typename values_t::const_reverse_iterator

Definition at line 135 of file ratexp.hh.

template<type_t Type, typename Context >
using vcsn::rat::variadic< Type, Context >::iterator = const_iterator

Definition at line 134 of file ratexp.hh.

template<type_t Type, typename Context >
using vcsn::rat::variadic< Type, Context >::reverse_iterator = const_reverse_iterator

Definition at line 136 of file ratexp.hh.

template<type_t Type, typename Context >
using vcsn::rat::variadic< Type, Context >::super_t = inner<Context>

Definition at line 126 of file ratexp.hh.

template<type_t Type, typename Context >
using vcsn::rat::variadic< Type, Context >::value_t = typename super_t::value_t

Definition at line 127 of file ratexp.hh.

template<type_t Type, typename Context >
using vcsn::rat::variadic< Type, Context >::values_t = typename super_t::values_t

Definition at line 128 of file ratexp.hh.

Constructor & Destructor Documentation

template<type_t Type, typename Context >
vcsn::rat::variadic< Type, Context >::variadic ( const values_t ns = values_t())
inline

Definition at line 63 of file ratexp.hxx.

template<type_t Type, typename Context >
vcsn::rat::variadic< Type, Context >::variadic ( const variadic< Type, Context > &  that)
inline

Definition at line 159 of file ratexp.hh.

Member Function Documentation

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::accept ( typename super_t::const_visitor v) const
inlinevirtual

Implements vcsn::rat::node< Context >.

Definition at line 128 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::back ( ) const
inline

The last item of this variadic.

Definition at line 110 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::begin ( ) const
inline

Definition at line 68 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::end ( ) const
inline

Definition at line 74 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::head ( ) const
inline

The first item of this variadic.

Definition at line 104 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::operator[] ( size_t  n) const
inline

Access the n-th element.

precondition 0 <= n < size.

Definition at line 98 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::rbegin ( ) const
inline

Definition at line 80 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::rend ( ) const
inline

Definition at line 86 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::size ( ) const
inline

Definition at line 92 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::subs ( ) const
inline

Return a copy of children.

Definition at line 122 of file ratexp.hxx.

template<type_t Type, typename Context >
auto vcsn::rat::variadic< Type, Context >::tail ( ) const -> decltype(boost::make_iterator_range(*this, 1, 0))
inline

The non-first items.

Definition at line 116 of file ratexp.hxx.

template<type_t Type, typename Context >
virtual type_t vcsn::rat::variadic< Type, Context >::type ( ) const
inlinevirtual

The type of this node.

Implements vcsn::rat::exp.

Definition at line 138 of file ratexp.hh.

Member Data Documentation

template<type_t Type, typename Context >
values_t vcsn::rat::variadic< Type, Context >::sub_
private

Definition at line 170 of file ratexp.hh.


The documentation for this class was generated from the following files: