/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Types | Public Member Functions | Protected Attributes | Private Member Functions
DataBuffer< Data > Class Template Reference

#include <DataBuffer.h>

Inheritance diagram for DataBuffer< Data >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef std::deque< Data * >
::iterator 
Iterator

Public Member Functions

 DataBuffer ()
virtual ~DataBuffer ()
Iterator begin ()
Iterator current ()
Iterator end ()
Iterator find (const Data *data)
Iterator seek (int pos)
Data * curEvt ()
Data * seekEvt (int pos)
int totalSize ()
int forwardSize ()
int backwardSize ()
void clear ()
template<>
 ~DataBuffer ()
template<>
void clear ()
template<>
 ~DataBuffer ()
template<>
void clear ()

Protected Attributes

unsigned int m_iCur
std::deque< Data * > m_dBuf

Private Member Functions

 DataBuffer (const DataBuffer &)
DataBufferoperator= (const DataBuffer &)

Detailed Description

template<typename Data>
class DataBuffer< Data >

Definition at line 8 of file DataBuffer.h.


Member Typedef Documentation

template<typename Data >
typedef std::deque<Data*>::iterator DataBuffer< Data >::Iterator

Definition at line 12 of file DataBuffer.h.


Constructor & Destructor Documentation

template<typename Data >
DataBuffer< Data >::DataBuffer ( )

Definition at line 48 of file DataBuffer.h.

    : m_iCur(0xFFFFFFFF)
{
}
template<typename Data >
DataBuffer< Data >::~DataBuffer ( ) [virtual]

Definition at line 54 of file DataBuffer.h.

{
    clear();
}
template<typename Data >
DataBuffer< Data >::DataBuffer ( const DataBuffer< Data > &  ) [private]
template<>
DataBuffer< PhyEvent >::~DataBuffer ( )

Definition at line 3 of file PhyEventBuffer.cc.

{
    this->clear();
}
template<>
DataBuffer< PhyEvent >::~DataBuffer ( )

Member Function Documentation

template<typename Data >
DataBuffer< Data >::Iterator DataBuffer< Data >::begin ( ) [inline]

Definition at line 60 of file DataBuffer.h.

{
    return m_dBuf.begin();
}
template<typename Data >
DataBuffer< Data >::Iterator DataBuffer< Data >::current ( ) [inline]

Definition at line 66 of file DataBuffer.h.

{
    return (m_dBuf.begin()+m_iCur);
}
template<typename Data >
DataBuffer< Data >::Iterator DataBuffer< Data >::end ( ) [inline]

Definition at line 72 of file DataBuffer.h.

{
    return m_dBuf.end();
}
template<typename Data >
DataBuffer< Data >::Iterator DataBuffer< Data >::find ( const Data *  data) [inline]

Definition at line 78 of file DataBuffer.h.

{
    return std::find(m_dBuf.begin(), m_dBuf.end(), data);
}
template<typename Data >
DataBuffer< Data >::Iterator DataBuffer< Data >::seek ( int  pos) [inline]

Definition at line 84 of file DataBuffer.h.

{
    return (m_dBuf.begin()+(int(m_iCur)+pos));
}
template<typename Data >
Data * DataBuffer< Data >::curEvt ( ) [inline]

Definition at line 90 of file DataBuffer.h.

{
    if ( !m_dBuf.empty() ) {
        return m_dBuf[m_iCur];
    }
    return (Data*)0;
}
template<typename Data >
Data * DataBuffer< Data >::seekEvt ( int  pos) [inline]

Definition at line 99 of file DataBuffer.h.

{
    return m_dBuf.at(m_iCur+pos);
}
template<typename Data >
int DataBuffer< Data >::totalSize ( ) [inline]

Definition at line 105 of file DataBuffer.h.

{
    return m_dBuf.size();
}
template<typename Data >
int DataBuffer< Data >::forwardSize ( ) [inline]

Definition at line 111 of file DataBuffer.h.

{
    return (m_dBuf.size()-m_iCur-1);
}
template<typename Data >
int DataBuffer< Data >::backwardSize ( ) [inline]

Definition at line 117 of file DataBuffer.h.

{
    return m_iCur;
}
template<typename Data >
void DataBuffer< Data >::clear ( void  )

Definition at line 123 of file DataBuffer.h.

{
    for(typename std::deque<Data*>::iterator it=m_dBuf.begin(); it!=m_dBuf.end(); ++it) {
        delete (*it);
    }
    m_dBuf.clear();
}
template<typename Data >
DataBuffer& DataBuffer< Data >::operator= ( const DataBuffer< Data > &  ) [private]
template<>
void DataBuffer< PhyEvent >::clear ( void  )

Definition at line 8 of file PhyEventBuffer.cc.

{
    for(std::deque<PhyEvent*>::iterator it=m_dBuf.begin(); it!=m_dBuf.end(); ++it) {
        (*it)->ReleaseInstance();
    }
    m_dBuf.clear();
}
template<>
void DataBuffer< PhyEvent >::clear ( )

Member Data Documentation

template<typename Data >
unsigned int DataBuffer< Data >::m_iCur [protected]

Definition at line 37 of file DataBuffer.h.

template<typename Data >
std::deque<Data*> DataBuffer< Data >::m_dBuf [protected]

Definition at line 38 of file DataBuffer.h.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 09:50:18 for LafKernel by doxygen 1.7.4