CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
cond::persistency::QueryIterator< Types > Class Template Reference

#include <DbCore.h>

Inheritance diagram for cond::persistency::QueryIterator< Types >:

Public Member Functions

template<typename T >
T::type get () const
 
 operator bool () const
 
bool operator!= (const QueryIterator &rhs) const
 
auto operator* () -> decltype(std::make_tuple(this->get< Types >()...))
 
QueryIteratoroperator++ ()
 
QueryIterator operator++ (int)
 
QueryIteratoroperator= (const QueryIterator &rhs)
 
bool operator== (const QueryIterator &rhs) const
 
 QueryIterator ()
 
 QueryIterator (const QueryIterator &rhs)
 
 QueryIterator (Query< Types... > *parent)
 

Private Attributes

const coral::AttributeList * m_currentRow = 0
 
Query< Types... > * m_query = 0
 

Detailed Description

template<typename... Types>
class cond::persistency::QueryIterator< Types >

Definition at line 309 of file DbCore.h.

Constructor & Destructor Documentation

template<typename... Types>
cond::persistency::QueryIterator< Types >::QueryIterator ( )
inline

Definition at line 312 of file DbCore.h.

312  {
313  }
template<typename... Types>
cond::persistency::QueryIterator< Types >::QueryIterator ( const QueryIterator< Types > &  rhs)
inline

Definition at line 315 of file DbCore.h.

315  :
316  m_query( rhs.m_query ),
317  m_currentRow( rhs.m_currentRow ){
318  }
Query< Types... > * m_query
Definition: DbCore.h:363
const coral::AttributeList * m_currentRow
Definition: DbCore.h:364
template<typename... Types>
cond::persistency::QueryIterator< Types >::QueryIterator ( Query< Types... > *  parent)
inlineexplicit

Definition at line 320 of file DbCore.h.

320  :
321  m_query( parent ){
322  }
Query< Types... > * m_query
Definition: DbCore.h:363

Member Function Documentation

template<typename... Types>
template<typename T >
T::type cond::persistency::QueryIterator< Types >::get ( ) const
inline
template<typename... Types>
cond::persistency::QueryIterator< Types >::operator bool ( ) const
inline

Definition at line 358 of file DbCore.h.

358  {
359  return m_currentRow;
360  }
const coral::AttributeList * m_currentRow
Definition: DbCore.h:364
template<typename... Types>
bool cond::persistency::QueryIterator< Types >::operator!= ( const QueryIterator< Types > &  rhs) const
inline

Definition at line 354 of file DbCore.h.

References operator==().

354  {
355  return !operator==(rhs);
356  }
bool operator==(const QueryIterator &rhs) const
Definition: DbCore.h:349
template<typename... Types>
auto cond::persistency::QueryIterator< Types >::operator* ( ) -> decltype( std::make_tuple( this->get<Types>()... ) )
inline

Definition at line 334 of file DbCore.h.

334  {
335  return std::make_tuple( get<Types>()... );
336  }
template<typename... Types>
QueryIterator& cond::persistency::QueryIterator< Types >::operator++ ( )
inline

Definition at line 338 of file DbCore.h.

338  {
339  m_currentRow = m_query->next() ? &m_query->currentRow() : nullptr;
340  return *this;
341  }
Query< Types... > * m_query
Definition: DbCore.h:363
const coral::AttributeList * m_currentRow
Definition: DbCore.h:364
const coral::AttributeList & currentRow() const
Definition: DbCore.h:462
template<typename... Types>
QueryIterator cond::persistency::QueryIterator< Types >::operator++ ( int  )
inline

Definition at line 343 of file DbCore.h.

References tmp.

343  {
344  QueryIterator tmp( *this );
345  operator++();
346  return tmp;
347  }
QueryIterator & operator++()
Definition: DbCore.h:338
std::vector< std::vector< double > > tmp
Definition: MVATrainer.cc:100
template<typename... Types>
QueryIterator& cond::persistency::QueryIterator< Types >::operator= ( const QueryIterator< Types > &  rhs)
inline

Definition at line 324 of file DbCore.h.

References cond::persistency::QueryIterator< Types >::m_currentRow, and cond::persistency::QueryIterator< Types >::m_query.

324  {
325  m_query = rhs.m_query;
326  m_currentRow = rhs.m_currentRow;
327  return *this;
328  }
Query< Types... > * m_query
Definition: DbCore.h:363
const coral::AttributeList * m_currentRow
Definition: DbCore.h:364
template<typename... Types>
bool cond::persistency::QueryIterator< Types >::operator== ( const QueryIterator< Types > &  rhs) const
inline

Definition at line 349 of file DbCore.h.

References cond::persistency::QueryIterator< Types >::m_currentRow, and cond::persistency::QueryIterator< Types >::m_query.

349  {
350  if (rhs.m_query == nullptr && m_query == nullptr)
351  return true;
352  return m_query == rhs.m_query && m_currentRow == rhs.m_currentRow;
353  }
Query< Types... > * m_query
Definition: DbCore.h:363
const coral::AttributeList * m_currentRow
Definition: DbCore.h:364

Member Data Documentation

template<typename... Types>
const coral::AttributeList* cond::persistency::QueryIterator< Types >::m_currentRow = 0
private
template<typename... Types>
Query<Types...>* cond::persistency::QueryIterator< Types >::m_query = 0
private