Vcsn  2.2
Be Rational
vcsn::rat::weight_node< Type, Context > Class Template Reference

An inner node implementing a weight. More...

#include <expression.hh>

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

Public Types

using super_t = inner< Context >
 
using weight_t = weight_t_of< Context >
 
using value_t = typename super_t::value_t
 
- 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 >
 An expression 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 expressions. More...
 

Public Member Functions

virtual type_t type () const
 The type of this node. More...
 
const value_t sub () const
 
const weight_tweight () const
 
void set_weight (weight_t w)
 
 weight_node (weight_t w, value_t exp)
 
 weight_node (const weight_node &that)
 
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 expression tree. More...
 

Private Attributes

value_t sub_
 
weight_t weight_
 

Detailed Description

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

An inner node implementing a weight.

Implements the Composite Design Pattern.

Definition at line 264 of file expression.hh.

Member Typedef Documentation

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

Definition at line 272 of file expression.hh.

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

Definition at line 274 of file expression.hh.

template<exp::type_t Type, typename Context >
using vcsn::rat::weight_node< Type, Context >::weight_t = weight_t_of<Context>

Definition at line 273 of file expression.hh.

Constructor & Destructor Documentation

template<type_t Type, typename Context >
vcsn::rat::weight_node< Type, Context >::weight_node ( weight_t  w,
value_t  exp 
)
inline

Definition at line 157 of file expression.hxx.

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

Definition at line 283 of file expression.hh.

Member Function Documentation

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

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

Definition at line 180 of file expression.hxx.

References vcsn::detail::v.

template<type_t Type, typename Context >
auto vcsn::rat::weight_node< Type, Context >::set_weight ( weight_t  w)
inline

Definition at line 174 of file expression.hxx.

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

Definition at line 162 of file expression.hxx.

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

The type of this node.

Implements vcsn::rat::exp.

Definition at line 276 of file expression.hh.

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

Definition at line 168 of file expression.hxx.

Member Data Documentation

template<exp::type_t Type, typename Context >
value_t vcsn::rat::weight_node< Type, Context >::sub_
private

Definition at line 291 of file expression.hh.

template<exp::type_t Type, typename Context >
weight_t vcsn::rat::weight_node< Type, Context >::weight_
private

Definition at line 292 of file expression.hh.


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