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

simth::SignalSequence< Val, Attr, Cont > Class Template Reference

Base class for implementing access to a sequence. More...

#include <signals.h>

Inheritance diagram for simth::SignalSequence< Val, Attr, Cont >:

simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > > simth::SignalSequenceAccess< Val, Attr, Cont > simth::SignalSequenceStorage< Val, Attr, Cont > List of all members.

Public Types

typedef SignalSequenceStorage<
Val, Attr, Cont > 
storage_type
typedef SignalSequenceAccess<
Val, Attr, Cont > 
access_type
typedef Val value_type
typedef Attr attributes_type
typedef Cont container_type
typedef container_type::iterator iterator
typedef container_type::const_iterator const_iterator
typedef container_type::reference reference
typedef container_type::const_reference const_reference
typedef SignalSequenceBase<
Val, Attr, Cont, storage_type,
access_type
base_type

Public Member Functions

 SignalSequence (iterator iterStart, iterator iterEnd, storage_type &seq)
 SignalSequence (storage_type &seq)
virtual ~SignalSequence ()=0

Protected Member Functions

 SignalSequence ()

Detailed Description

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
class simth::SignalSequence< Val, Attr, Cont >

Base class for implementing access to a sequence.

Note:
Why do we need such a complex structure for the Signal classes? Please read the comment in signals.h for an explanation.
This class behaves similar to a vector of the standard template library (STL), but it does not allocate any storage by itself, depending on the derived class. Either the derived class in fact allocates storage, in which case this base class is the interface to access it. Or the derived class implements a shallow copy of a storage allocated elsewhere.

This class is still abstract, but it contains typedefs for all required other classes. To allocate a storage object, use the class SignalSequence<>::storage_type. To allocate an access object, use the class SignalSequence<>::access_type. If you need the type of the value contained in here, use SignalSequence<>::value_type.

Characteristics: Element access in this class always directly affects the elements of the referenced SignalSequenceStorage class. Resizing to a larger size is only possible if the derived class is a storage object, otherwise it will throw an exception. Resizing to a smaller size does not resize the referenced storage -- instead, the begin/end iterators in this class simply point to a smaller part of the referenced storage.


Member Typedef Documentation

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef class SignalSequenceStorage< Val, Attr, Cont > simth::SignalSequence< Val, Attr, Cont >::storage_type
 

The referenced storage class.

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef class SignalSequenceAccess< Val, Attr, Cont > simth::SignalSequence< Val, Attr, Cont >::access_type
 

The referenced access class.

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef Val simth::SignalSequence< Val, Attr, Cont >::value_type
 

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >, and simth::SignalSequenceStorage< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef Attr simth::SignalSequence< Val, Attr, Cont >::attributes_type
 

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >, and simth::SignalSequenceStorage< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef Cont simth::SignalSequence< Val, Attr, Cont >::container_type
 

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >, and simth::SignalSequenceStorage< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef container_type::iterator simth::SignalSequence< Val, Attr, Cont >::iterator
 

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >, and simth::SignalSequenceStorage< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef container_type::const_iterator simth::SignalSequence< Val, Attr, Cont >::const_iterator
 

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >, and simth::SignalSequenceStorage< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef container_type::reference simth::SignalSequence< Val, Attr, Cont >::reference
 

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >, and simth::SignalSequenceStorage< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef container_type::const_reference simth::SignalSequence< Val, Attr, Cont >::const_reference
 

Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >.

Reimplemented in simth::SignalSequenceAccess< Val, Attr, Cont >, and simth::SignalSequenceStorage< Val, Attr, Cont >.

template<class Val, class Attr = NoAttributes, class Cont = simth::checkedVector<Val>>
typedef class SignalSequenceBase< Val, Attr, Cont,storage_type, access_type > simth::SignalSequence< Val, Attr, Cont >::base_type
 

This typedef is used to provide an easier instantiation of concrete classes, e.g. 'template BitSeq::base_type;' This typedef is NOT required for classes used as signal sequence, i.e. used as template argument of the interfaces.


Constructor & Destructor Documentation

template<class Val, class Attr, class Cont>
simth::SignalSequence< Val, Attr, Cont >::SignalSequence iterator  iterStart,
iterator  iterEnd,
storage_type seq
 

This constructor is used to create a shallow copy (or reference copy) of an already existing SignalSequence. This means that the newly created sequence does not allocate new memory for elements, but instead it works on a part of an already existing sequence. Hence the attributes of an object generated with this constructor are also an shallow copy of the original class.

In other words, this constructor is always cheap.

template<class Val, class Attr, class Cont>
simth::SignalSequence< Val, Attr, Cont >::SignalSequence storage_type seq  ) 
 

Copy constructor from another sequence. This object will point to the same underlying storage/deep copy than the given sequence.

This constructor is cheap, too.

template<class Val, class Attr, class Cont>
simth::SignalSequence< Val, Attr, Cont >::~SignalSequence  )  [pure virtual]
 

Default destructor. (Pure virtual to force an abstract class.)

template<class Val, class Attr, class Cont>
simth::SignalSequence< Val, Attr, Cont >::SignalSequence  )  [protected]
 


Generated on Mon Apr 24 21:19:20 2006 for simthetic by  doxygen 1.4.1