CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions | Private Attributes
ora::ContainerIterator Class Reference

#include <Container.h>

Public Member Functions

 ContainerIterator (Handle< IteratorBuffer > &iteratorBuffer)
 
 ContainerIterator (const ContainerIterator &rhs)
 
template<typename T >
boost::shared_ptr< T > get ()
 
Object getItem ()
 
int itemId ()
 
bool next ()
 
ContainerIteratoroperator= (const ContainerIterator &rhs)
 
void reset ()
 
virtual ~ContainerIterator ()
 

Private Member Functions

boost::shared_ptr< void > getItemAsType (const std::type_info &asTypeInfo)
 

Private Attributes

Handle< IteratorBufferm_buffer
 

Detailed Description

Definition at line 15 of file Container.h.

Constructor & Destructor Documentation

ora::ContainerIterator::ContainerIterator ( Handle< IteratorBuffer > &  iteratorBuffer)

Definition at line 5 of file Container.cc.

5  :
6  m_buffer( iteratorBuffer ){
7 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40
ora::ContainerIterator::ContainerIterator ( const ContainerIterator rhs)

Definition at line 9 of file Container.cc.

9  :
10  m_buffer( rhs.m_buffer ){
11 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40
ora::ContainerIterator::~ContainerIterator ( )
virtual

Definition at line 13 of file Container.cc.

13  {
14 }

Member Function Documentation

template<typename T >
boost::shared_ptr< T > ora::ContainerIterator::get ( void  )
inline

Definition at line 105 of file Container.h.

References getItemAsType().

Referenced by Options.Options::__getitem__(), and cond::IOVService::deleteAll().

105  {
106  return boost::static_pointer_cast<T>( getItemAsType( typeid(T) ));
107 }
boost::shared_ptr< void > getItemAsType(const std::type_info &asTypeInfo)
Definition: Container.cc:37
ora::Object ora::ContainerIterator::getItem ( )

Definition at line 33 of file Container.cc.

33  {
34  return Object( m_buffer->getItem(), m_buffer->type() );
35 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40
boost::shared_ptr< void > ora::ContainerIterator::getItemAsType ( const std::type_info &  asTypeInfo)
private

Definition at line 37 of file Container.cc.

References ora::ClassUtils::lookupDictionary().

Referenced by get().

37  {
38  Reflex::Type castType = ClassUtils::lookupDictionary( asTypeInfo );
39  void* ptr = m_buffer->getItemAsType( castType );
40  return boost::shared_ptr<void>( ptr, RflxDeleter( m_buffer->type() ) );
41 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40
Reflex::Type lookupDictionary(const std::type_info &typeInfo, bool throwFlag=true)
Definition: ClassUtils.cc:84
int ora::ContainerIterator::itemId ( )

Definition at line 29 of file Container.cc.

Referenced by cond::IOVService::deleteAll().

29  {
30  return m_buffer->itemId();
31 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40
bool ora::ContainerIterator::next ( void  )

Definition at line 25 of file Container.cc.

Referenced by cond::IOVService::deleteAll().

25  {
26  return m_buffer->next();
27 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40
ora::ContainerIterator & ora::ContainerIterator::operator= ( const ContainerIterator rhs)

Definition at line 16 of file Container.cc.

References m_buffer.

16  {
17  if(this != &rhs ) m_buffer = rhs.m_buffer;
18  return *this;
19 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40
void ora::ContainerIterator::reset ( void  )

Definition at line 21 of file Container.cc.

Referenced by runTheMatrix.MatrixReader::__init__(), and BeautifulSoup.BeautifulStoneSoup::__init__().

21  {
22  m_buffer->reset();
23 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:40

Member Data Documentation

Handle<IteratorBuffer> ora::ContainerIterator::m_buffer
private

Definition at line 40 of file Container.h.

Referenced by operator=().