CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
CArrayHandler.cc
Go to the documentation of this file.
1 #include "CArrayHandler.h"
2 #include "ClassUtils.h"
3 // externals
4 #include "Reflex/Object.h"
5 
7  const Reflex::Type& iteratorReturnType ):
8  m_returnType(iteratorReturnType),
9  m_currentElement(startAddress){
10 
11 }
12 
14 
15 void
17 {
18  m_currentElement = static_cast< const char* >( m_currentElement) + m_returnType.SizeOf();
19 }
20 
21 void*
23 {
24  return const_cast<void*>(m_currentElement);
25 }
26 
29 {
30  return m_returnType;
31 }
32 
34  m_type( dictionary ),
35  m_elementType()
36 {
37 
38  // find the iterator return type
39  Reflex::Type elementType = m_type.ToType();
40  m_elementType = ClassUtils::resolvedType( elementType );
41 
42 }
43 
45 }
46 
47 size_t
49 {
50  return m_type.ArrayLength();
51 }
52 
53 
55 ora::CArrayHandler::iterate( const void* address )
56 {
57  return new ora::CArrayIteratorHandler( address, m_elementType );
58 }
59 
60 
61 void
63 {
64 }
65 
66 void
68 {
69 }
70 
73 {
74  return m_elementType;
75 }
void increment()
Increments itself.
~CArrayHandler()
Destructor.
Reflex::Type & returnType()
Returns the return type of the iterator dereference method.
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
void clear(const void *address)
Clear the content of the container.
void * object()
Returns the current object.
void appendNewElement(void *address, void *data)
Appends a new element and returns its address of the object reference.
~CArrayIteratorHandler()
Destructor.
size_t size(const void *address)
Returns the size of the container.
Reflex::Type & iteratorReturnType()
Returns the iterator return type.
CArrayHandler(const Reflex::Type &dictionary)
Constructor.
Reflex::Type m_type
The dictionary information.
Definition: CArrayHandler.h:66
Reflex::Type resolvedType(const Reflex::Type &typ)
Definition: ClassUtils.cc:404
Reflex::Type m_elementType
The iterator return type.
Definition: CArrayHandler.h:69
CArrayIteratorHandler(const void *startAddress, const Reflex::Type &iteratorReturnType)
Constructor.
Definition: CArrayHandler.cc:6