#include <PsnAbstractFifo.h>
Inheritance diagram for PsnAbstractFifo< Type >:


Public Methods | |
| PsnAbstractFifo (const int taille) | |
| constructor | |
| virtual | ~PsnAbstractFifo () |
| destructor | |
| virtual int | getMaximumNumberOfValues () const |
| get the size of the fifo | |
| virtual unsigned int | getNumberOfPresentValues (int lookingFor=-1) const=0 |
| get the number of values in the fifo | |
| virtual const Type & | getPreceedingValue (const unsigned int index) const=0 |
| get a value before the current value | |
| virtual const PsDate & | getPreceedingDate (const unsigned int indice) const=0 |
| get the date associated to a value before the current value | |
| virtual void | set (const Type &val, const PsDate &date)=0 |
| add a value to the fifo | |
| virtual void | setInPlace (const Type &val, const PsDate &date)=0 |
| make an allready copied value available for reading | |
| virtual Type & | getNextPlaceHolder ()=0 |
| get a reference to the next place that will be used to store a value | |
| virtual void | clear ()=0 |
| clear the fifo | |
| virtual void | printDebuggingInformation (void) const=0 |
| printDebuggingInformation print any usefull debugging information | |
| virtual void | extract (istream &=cin) |
| extract from an input stream | |
| virtual void | insertInStream (ostream &=cout) const |
| insert in a output stream | |
| virtual void | unpack (PsIncomingSynchronisationMessage &) |
| unpack an update from a message (suppose the value's timestamp is the message's timestamp | |
| virtual void | pack (PsOutgoingSynchronisationMessage &) const |
| pack in an update message | |
| virtual void | unpackAllValues (PsIncomingSynchronisationMessage &) |
| unpack a complete (implemented in a minimal fashion) from a message | |
| virtual void | packAllValues (PsOutgoingSynchronisationMessage &) const |
| pack a complete message | |
Protected Attributes | |
| unsigned int | _fifoSize |
| Number of values that can be contained in the FIFO. | |
Definition at line 29 of file PsnAbstractFifo.h.
|
||||||||||
|
constructor
Definition at line 124 of file PsnAbstractFifo.h.
00124 : _fifoSize ( taille ) { 00125 00126 } |
|
|||||||||
|
destructor
Definition at line 129 of file PsnAbstractFifo.h.
00129 {
00130
00131 }
|
|
|||||||||
|
clear the fifo
Implemented in PsnFifo< Type >, PsnMomeFifo< Type >, PsnMomeReaderFifo< Type >, and PsnMomeWriterFifo< Type >. |
|
||||||||||
|
extract from an input stream
Implements PsFlowable. Definition at line 141 of file PsnAbstractFifo.h. References PsDate, and PsnAbstractFifo< Type >::set().
|
|
|||||||||
|
get the size of the fifo
Definition at line 119 of file PsnAbstractFifo.h. References PsnAbstractFifo< Type >::_fifoSize.
00119 {
00120 return _fifoSize ;
00121 }
|
|
|||||||||
|
get a reference to the next place that will be used to store a value
Implemented in PsnFifo< Type >, PsnMomeFifo< Type >, PsnMomeReaderFifo< Type >, and PsnMomeWriterFifo< Type >. Referenced by PsnAbstractFifo< Type >::unpack(), and PsnAbstractFifo< Type >::unpackAllValues(). |
|
||||||||||
|
get the number of values in the fifo
Implemented in PsnFifo< Type >, PsnMomeFifo< Type >, PsnMomeReaderFifo< Type >, and PsnMomeWriterFifo< Type >. |
|
||||||||||
|
get the date associated to a value before the current value
Implemented in PsnFifo< Type >, and PsnMomeFifo< Type >. Referenced by PsnAbstractFifo< Type >::insertInStream(), and PsnAbstractFifo< Type >::packAllValues(). |
|
||||||||||
|
get a value before the current value
Implemented in PsnFifo< Type >, and PsnMomeFifo< Type >. Referenced by PsnAbstractFifo< Type >::insertInStream(), PsnAbstractFifo< Type >::pack(), and PsnAbstractFifo< Type >::packAllValues(). |
|
||||||||||
|
insert in a output stream
Implements PsFlowable. Definition at line 151 of file PsnAbstractFifo.h. References PsnAbstractFifo< Type >::getPreceedingDate(), and PsnAbstractFifo< Type >::getPreceedingValue().
00152 {
00153 out << getPreceedingDate (0) << " "<<getPreceedingValue (0) << " ";
00154 }
|
|
||||||||||
|
pack in an update message
Reimplemented from PsFlowable. Definition at line 176 of file PsnAbstractFifo.h. References PsnAbstractFifo< Type >::getPreceedingValue().
00177 {
00178 getPreceedingValue (0).pack (out) ;
00179 }
|
|
||||||||||
|
pack a complete message
Definition at line 182 of file PsnAbstractFifo.h. References PsnAbstractFifo< Type >::getPreceedingDate(), and PsnAbstractFifo< Type >::getPreceedingValue().
00183 {
00184 // implement in a minimal fashion
00185 getPreceedingDate (0).pack(out) ;
00186 getPreceedingValue (0).pack (out) ;
00187 }
|
|
||||||||||
|
printDebuggingInformation print any usefull debugging information
Implemented in PsnFifo< Type >, PsnMomeFifo< Type >, PsnMomeReaderFifo< Type >, and PsnMomeWriterFifo< Type >. Definition at line 134 of file PsnAbstractFifo.h. References PsnAbstractFifo< Type >::_fifoSize. Referenced by PsnMomeFifo< Type >::printDebuggingInformation(), and PsnFifo< Type >::printDebuggingInformation().
00134 {
00135 cerr<< "Capacity of fifo : "<<_fifoSize<<endl;
00136 }
|
|
||||||||||||||||
|
add a value to the fifo
Implemented in PsnFifo< Type >, PsnMomeFifo< Type >, PsnMomeReaderFifo< Type >, and PsnMomeWriterFifo< Type >. Referenced by PsnAbstractFifo< Type >::extract(). |
|
||||||||||||||||
|
make an allready copied value available for reading
Implemented in PsnFifo< Type >, PsnMomeFifo< Type >, PsnMomeReaderFifo< Type >, and PsnMomeWriterFifo< Type >. Referenced by PsnAbstractFifo< Type >::unpack(), and PsnAbstractFifo< Type >::unpackAllValues(). |
|
||||||||||
|
unpack an update from a message (suppose the value's timestamp is the message's timestamp
Reimplemented from PsFlowable. Definition at line 158 of file PsnAbstractFifo.h. References PsIncomingSynchronisationMessage::getMessageDate(), PsnAbstractFifo< Type >::getNextPlaceHolder(), and PsnAbstractFifo< Type >::setInPlace().
00159 {
00160 Type & receivedValue ( getNextPlaceHolder() ) ;
00161 receivedValue.unpack( in ) ;
00162 setInPlace( receivedValue, in.getMessageDate() );
00163 }
|
|
||||||||||
|
unpack a complete (implemented in a minimal fashion) from a message
Definition at line 166 of file PsnAbstractFifo.h. References PsnAbstractFifo< Type >::getNextPlaceHolder(), PsDate, and PsnAbstractFifo< Type >::setInPlace().
00167 {
00168 Type & receivedValue ( getNextPlaceHolder() ) ;
00169 PsDate dateOfReceivedValue ;
00170 dateOfReceivedValue.unpack ( in ) ;
00171 receivedValue.unpack( in ) ;
00172 setInPlace( receivedValue , dateOfReceivedValue );
00173 }
|
|
|||||
| Documentation generated on Mon Nov 25 15:25:51 2002 |
Generated with doxygen 1.2.12 by Dimitri van Heesch , 1997-2001 |