#include <signals.h>
Inheritance diagram for simth::SignalSequenceStorage< Val, Attr, Cont >:
Public Types | |
typedef Cont::iterator | iterator |
typedef Cont::const_iterator | const_iterator |
typedef Cont::reference | reference |
typedef Cont::const_reference | const_reference |
typedef Val | value_type |
typedef Attr | attributes_type |
typedef Cont | container_type |
Public Member Functions | |
SignalSequenceStorage () | |
SignalSequenceStorage (size_t size, const value_type &val=value_type()) | |
SignalSequenceStorage (const SignalSequence< value_type, attributes_type, container_type > &seq) | |
virtual | ~SignalSequenceStorage () |
size_t | capacity () const |
virtual void | resize (size_t i) |
attributes_type & | wAttributes () |
const attributes_type & | rAttributes () const |
void | lock () |
void | unlock () |
bool | isLocked () const |
This class is used as a class to implement signal sequences. A signal sequence is any class that can be used as template argument of interfaces. Two interfaces that are connected use these sequences to exchange information (e.g. a bit sequence) between each other.
Characteristics: Resizing is possible into both larger and smaller size. Note: After resizing, all other iterators and shallow copies will become invalid. If there are other shallow copies around, they need to do seek() before they can be used again.
Note: This class is new (since March 2003). Previously, the functionality of all SignalSequenceAccess and SignalSequenceStorage was combined into one class with two different 'modes of operation'. Eventually we agreed into clearly state that we are dealing with two different concepts here.
|
Reimplemented from simth::SignalSequence< Val, Attr, Cont >. |
|
Reimplemented from simth::SignalSequence< Val, Attr, Cont >. |
|
Reimplemented from simth::SignalSequence< Val, Attr, Cont >. |
|
Reimplemented from simth::SignalSequence< Val, Attr, Cont >. |
|
Reimplemented from simth::SignalSequence< Val, Attr, Cont >. |
|
Reimplemented from simth::SignalSequence< Val, Attr, Cont >. |
|
Reimplemented from simth::SignalSequence< Val, Attr, Cont >. |
|
Creates an empty sequence. |
|
Creates a new sequence with a specific length. Probably an expensive operation.
|
|
Creates a new sequence as a deep copy of an already existing sequence. Watch out -- this is probably a very expensive operation. |
|
Destructor |
|
Returns the number of currently allocated elements in the storage of this sequence. Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >. |
|
Resize this sequence. WATCH OUT: After resizing, iterators and shallow copies to this sequence might have become invalid. You must take care that no other shallow copy keeps around old pointers/iterators. Those will be invalid if the sequence has been truncated, or if the sequence has grown larger and thus moved to a different place in memory. Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >. |
|
Returns a reference to the attributes class of the sequence. Use this pointer obtain write access. If this object holds a lock on the attributes, this function will throw an Error. (If you only need read access to the class use the function rAttributes().) Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >. |
|
Returns a constant reference to the attributes class of the sequence. Use this pointer obtain read only access. (If you need write acces to the class use the function wAttributes(). Reimplemented from simth::SignalSequenceBase< Val, Attr, Cont, SignalSequenceStorage< Val, Attr, Cont >, SignalSequenceAccess< Val, Attr, Cont > >. |
|
Locks write access to the attributes, i.e. if calling wAttributes() while the attributes are locked, a std::runtime_error is thrown. To unlock the attributes use the function unlockAttributes(). |
|
Unlocks write acces to the attributes again. After calling this, calling wAttributes() is allowed again. |
|
Returns true if the attributes are locked, otherwise false. |