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 ()
 
 ContainerIterator (Handle< IteratorBuffer > &iteratorBuffer)
 
 ContainerIterator (const ContainerIterator &rhs)
 
template<typename T >
boost::shared_ptr< Tget ()
 
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 ( )

Definition at line 5 of file Container.cc.

5  :
6  m_buffer(){
7 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:42
ora::ContainerIterator::ContainerIterator ( Handle< IteratorBuffer > &  iteratorBuffer)
explicit

Definition at line 9 of file Container.cc.

9  :
10  m_buffer( iteratorBuffer ){
11 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:42
ora::ContainerIterator::ContainerIterator ( const ContainerIterator rhs)

Definition at line 13 of file Container.cc.

13  :
14  m_buffer( rhs.m_buffer ){
15 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:42
ora::ContainerIterator::~ContainerIterator ( )
virtual

Definition at line 17 of file Container.cc.

17  {
18 }

Member Function Documentation

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

Definition at line 115 of file Container.h.

References getItemAsType().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), and betterConfigParser.BetterConfigParser::getResultingSection().

115  {
116  return boost::static_pointer_cast<T>( getItemAsType( typeid(T) ));
117 }
boost::shared_ptr< void > getItemAsType(const std::type_info &asTypeInfo)
Definition: Container.cc:41
long double T
ora::Object ora::ContainerIterator::getItem ( )

Definition at line 37 of file Container.cc.

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

Definition at line 41 of file Container.cc.

References ora::ClassUtils::lookupDictionary().

Referenced by get().

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

Definition at line 33 of file Container.cc.

33  {
34  return m_buffer->itemId();
35 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:42
bool ora::ContainerIterator::next ( void  )

Definition at line 29 of file Container.cc.

Referenced by BeautifulSoup.PageElement::_invert().

29  {
30  return m_buffer->next();
31 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:42
ora::ContainerIterator & ora::ContainerIterator::operator= ( const ContainerIterator rhs)

Definition at line 20 of file Container.cc.

References m_buffer.

20  {
21  if(this != &rhs ) m_buffer = rhs.m_buffer;
22  return *this;
23 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:42
void ora::ContainerIterator::reset ( void  )

Definition at line 25 of file Container.cc.

Referenced by MatrixReader.MatrixReader::__init__(), and MatrixReader.MatrixReader::showRaw().

25  {
26  m_buffer->reset();
27 }
Handle< IteratorBuffer > m_buffer
Definition: Container.h:42

Member Data Documentation

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

Definition at line 42 of file Container.h.

Referenced by operator=().