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
5 
7  const edm::TypeWithDict& 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.size();
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  edm::TypeWithDict elementType = m_type.toType();
40  m_elementType = ClassUtils::resolvedType( elementType );
41 
42 }
43 
45 }
46 
47 size_t
49 {
50  return ClassUtils::arrayLength( m_type );
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.
CArrayHandler(const edm::TypeWithDict &dictionary)
Constructor.
edm::TypeWithDict resolvedType(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:486
edm::TypeWithDict & returnType()
Returns the return type of the iterator dereference method.
edm::TypeWithDict & iteratorReturnType()
Returns the iterator return type.
IArrayIteratorHandler * iterate(const void *address)
Returns an initialized iterator.
void clear(const void *address)
Clear the content of the container.
CArrayIteratorHandler(const void *startAddress, const edm::TypeWithDict &iteratorReturnType)
Constructor.
Definition: CArrayHandler.cc:6
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.
TypeWithDict toType() const
size_t size(const void *address)
Returns the size of the container.
edm::TypeWithDict m_elementType
The iterator return type.
Definition: CArrayHandler.h:69
edm::TypeWithDict m_type
The dictionary information.
Definition: CArrayHandler.h:66
size_t arrayLength(const edm::TypeWithDict &typ)
Definition: ClassUtils.cc:493