Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

vcsn::Element Class Template Reference
[Fundamental C++ : the Element design pattern.]

Glue class between structural elements and implementation values. More...

Inheritance diagram for vcsn::Element:

Inheritance graph
[legend]
List of all members.

Public Types

typedef S set_t
 Structure type for structural elements.

typedef T value_t
 Implementation type for values.


Public Methods

 Element ()
 Default constructor. More...

 Element (const Element &other)
 Copy constructor from Element instances of exactly the same type.

template<typename U>  Element (const Element< S, U > &other)
 Copy constructor from Element instances with different value type.

template<typename OtherS, typename U>  Element (const Element< OtherS, U > &other)
 Copy constructor from foreign Element instances. More...

 Element (const S &set)
 Default constructor with the structural element specified. More...

 Element (const S &set, const T &other)
 Explicit construction from structural element and value.

template<typename U>  Element (const S &set, const U &other)
 Explicit construction from structural element and foreign value.

template<typename OtherS, typename U>  Element (const S &set, const Element< OtherS, U > &other)
 Explicit construction with foreign Element conversion.

Element & operator= (const Element &other)
 Assignment from the same Element type.

template<typename U> Element & operator= (const Element< S, U > &other)
 Assignment from other implementation value types.

template<typename OtherS, typename U> Element & operator= (const Element< OtherS, U > &other)
 Assignment from foreign Element types.

template<typename U> Element & operator= (const U &other)
 Assignment from foreign implementation types.

const S & set () const
 Accessor to the structural element.

void attach (const S &set)
 Post-construction link to a structural element.

bool bound () const
 Tell whether the Element instance is linked or not.

 Element (const T &other)
 Copy constructor from anonymous values. More...

template<typename U>  Element (const U &other)
 Copy constructor from anonymous values. More...

T & value ()
 Accessor to the value data.

const T & value () const
 Accessor to the value data.


Static Public Attributes

const bool dynamic
 Attribute indicating whether Element instances have run-time data. More...


Detailed Description

template<typename S, typename T>
class vcsn::Element< S, T >

Glue class between structural elements and implementation values.

Element is the center of the design pattern used in Vaucanson to have an orthogonal construction of object from two different viewpoints:

Element proposes a lot of different constructors so as to allow the largest set of type conversions. Calling foreign constructors assume that there exist compatible "op_convert" functions.

See also:


Constructor & Destructor Documentation

Element   [inline]
 

Default constructor.

Note that using this constructor when the structural element is dynamic, leaves the constructed Element instance in an incomplete state, i.e. not linked to any structural element.

Element const Element< OtherS, U > &    other [inline]
 

Copy constructor from foreign Element instances.

Note that using this constructor when the structural element is dynamic, leaves the constructed Element instance in an incomplete state, i.e. not linked to any structural element.

Element const T &    other [inline]
 

Copy constructor from anonymous values.

Note that using this constructor when the structural element is dynamic, leaves the constructed Element instance in an incomplete state, i.e. not linked to any structural element.

Element const U &    other [inline]
 

Copy constructor from anonymous values.

Note that using this constructor when the structural element is dynamic, leaves the constructed Element instance in an incomplete state, i.e. not linked to any structural element.

Element const S &    set [inline, explicit]
 

Default constructor with the structural element specified.

This constructor invokes the default constructor of the implementation value type.


Member Data Documentation

const bool dynamic [static]
 

Initial value:

 dynamic_traits<S>::ret 
                                   || MetaElement<S, T>::dynamic_value
Attribute indicating whether Element instances have run-time data.


Generated on Wed Jul 2 19:09:11 2003 for Vaucanson by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002