A Hopf, Skip and a Jump
Public Member Functions | List of all members
slidingbuffer::SegmentProducer< T > Class Template Referenceabstract

Template of a pure virtual class which populates a Segment with entities. More...

#include <slidingbuffer.h>

Public Member Functions

virtual ~SegmentProducer ()
 Destructor: to be provided by derived class.
 
virtual std::size_t generate (T seg[], const std::size_t idx, const std::size_t size)=0
 Populate the array supplied by the Segment with newly constructed entities. More...
 
virtual bool more (void)=0
 Determine whether a subsequent call to generate() would result in more entities becoming available. More...
 

Detailed Description

template<typename T>
class slidingbuffer::SegmentProducer< T >

Template of a pure virtual class which populates a Segment with entities.

Template Parameters
TType of entity produced by the SegmentProducer

Definition at line 92 of file slidingbuffer.h.

Member Function Documentation

◆ generate()

template<typename T>
virtual std::size_t slidingbuffer::SegmentProducer< T >::generate ( seg[],
const std::size_t  idx,
const std::size_t  size 
)
pure virtual

Populate the array supplied by the Segment with newly constructed entities.

The first such entity shall have the supplied index with in the SlidingBuffer.

Parameters
segStorage for the constructed entities supplied by the caller.
idxThe origin (index of the first entity from the point of view of the SlidingBuffer).
sizeThe number of entities to construct.
Returns
The number of entities actually constructed. This shall not exceed size.

Implemented in detectorcache::Producer.

◆ more()

template<typename T>
virtual bool slidingbuffer::SegmentProducer< T >::more ( void  )
pure virtual

Determine whether a subsequent call to generate() would result in more entities becoming available.

Returns
true if more data can be read, false if not.

Implemented in detectorcache::Producer.


The documentation for this class was generated from the following file: