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

simth::InputInterface Class Reference

Abstract base class of all input interfaces. More...

#include <interfaces.h>

Inheritance diagram for simth::InputInterface:

simth::DataInterface simth::InputInterfaceT< T > List of all members.

Public Member Functions

 InputInterface (Device *const dev, int ID)
virtual ~InputInterface ()
virtual void reset ()=0
virtual void acceptNewData (size_t newElements)=0
virtual size_t sequenceLength () const =0
virtual void setSequenceLength (size_t newLen)=0
virtual bool isFilled () const =0
bool isConnected () const
virtual void acceptConnection ()
virtual void flushProcessedSequence ()=0
virtual void releaseProcessedSequence ()=0
virtual void processFinished ()=0

Detailed Description

Abstract base class of all input interfaces.


Constructor & Destructor Documentation

simth::InputInterface::InputInterface Device *const   dev,
int  ID
 

Class constructor. The first argument is a pointer the parent device, the second specifies the identity number of the interface within the parent device.

virtual simth::InputInterface::~InputInterface  )  [virtual]
 


Member Function Documentation

virtual void simth::InputInterface::reset  )  [pure virtual]
 

Resets the interface. After calling that function the interface should behave as before any data had arrived.

Implemented in simth::InputInterfaceT< T >.

virtual void simth::InputInterface::acceptNewData size_t  newElements  )  [pure virtual]
 

This function is invoked, when the interface got new data from the connected interface. If the number of stored elements (including the number of the new data elements) is larger than the sequence length (see sequenceLenght()), the interface invokes itself the function acceptNewData(..) of the parent device. If the sequence length is undefined when calling this function (i.e. it was not set so far), the sequence length will be set to 'newElements'.

Implemented in simth::InputInterfaceT< T >.

virtual size_t simth::InputInterface::sequenceLength  )  const [pure virtual]
 

Returns the sequence length of the input interface.

The sequence length specifies when the parent device (see device()) is informed about new incoming data, i.e. if the number of stored elements exceeds the sequence length,

          device()->acceptNewData(ID()) 
is called (see InputInterface::acceptNewData(size)). Without setting the sequence length to a certain value, the sequence length is undefined. In that case the return value of this function equals the constant DataInterface::undefinedLength.

Implemented in simth::InputInterfaceT< T >.

virtual void simth::InputInterface::setSequenceLength size_t  newLen  )  [pure virtual]
 

Sets the number of elements needed at least to fill the buffer.

Implemented in simth::InputInterfaceT< T >.

virtual bool simth::InputInterface::isFilled  )  const [pure virtual]
 

Returns true if the input buffer is filled (i.e. the buffer is filled with more than sequenceLength() elements) or if the interface is not connected with another device.

Implemented in simth::InputInterfaceT< T >.

bool simth::InputInterface::isConnected  )  const [inline]
 

Returns true if the input interface is connected with another device

virtual void simth::InputInterface::acceptConnection  )  [virtual]
 

This function is calling, when an output device intends to connect to this interface.

virtual void simth::InputInterface::flushProcessedSequence  )  [pure virtual]
 

Flushes the processed data elements.

This function is called after input data elements had been passed by the function internSequence() to the parent device. The number of elements that had been passed and that are now flushed equals the sequence length number (see sequenceLength()). The reference counter of the interface is subtracted by one.

Implemented in simth::InputInterfaceT< T >.

virtual void simth::InputInterface::releaseProcessedSequence  )  [pure virtual]
 

Releases the processed data elements.

Like in flushProcessedSequence() the reference counter of the interface is subtracted by one to release the accessed sequence. Unlike in flushProcessedSequence() the data is not flushed from the internal buffer.

Implemented in simth::InputInterfaceT< T >.

virtual void simth::InputInterface::processFinished  )  [pure virtual]
 

This function is called by the connected device if it finished writing new data to this input interface.

Implemented in simth::InputInterfaceT< T >.


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