CFx SDK Documentation
2020SP3
SDK
CFx
bim_ifc
sdai
daiIterator.h
Go to the documentation of this file.
1
// Copyright (C) 2002-2019, Open Design Alliance (the "Alliance").
3
// All rights reserved.
4
//
5
// This software and its documentation and related materials are owned by
6
// the Alliance. The software may only be incorporated into application
7
// programs owned by members of the Alliance, subject to a signed
8
// Membership Agreement and Supplemental Software License Agreement with the
9
// Alliance. The structure and organization of this software are the valuable
10
// trade secrets of the Alliance and its suppliers. The software is also
11
// protected by copyright law and international treaty provisions. Application
12
// programs incorporating this software must include the following statement
13
// with their copyright notices:
14
//
15
// This application incorporates Open Design Alliance software pursuant to a license
16
// agreement with Open Design Alliance.
17
// Open Design Alliance Copyright (C) 2002-2019 by Open Design Alliance.
18
// All rights reserved.
19
//
20
// By use of this software, its documentation or related materials, you
21
// acknowledge and accept the above terms.
23
24
#ifndef _DAI_ITERATOR_H
25
#define _DAI_ITERATOR_H
26
27
#include "
OdPlatformSettings.h
"
28
#include "
OdaCommon.h
"
29
30
//#include "RxObject.h"
31
//#include "RxObjectImpl.h"
32
#include "
SharedPtr.h
"
33
#include "
RxValue.h
"
34
35
#include "
daiBuildOptions.h
"
36
#include "
daiValueTypes.h
"
37
38
namespace
OdDAI
{
39
40
class
AggrBase;
41
class
AggrIsntance;
42
43
class
DAI_EXPORT
Iterator
44
{
45
public
:
46
47
virtual
void
start
() = 0;
48
virtual
bool
done
() = 0;
49
virtual
bool
next
() = 0;
50
virtual
int
size
() = 0;
51
52
virtual
const
OdRxValueType
&
type
() = 0;
53
virtual
OdRxValue
get
() = 0;
54
virtual
bool
test
() = 0;
55
56
};
57
typedef
OdSharedPtr<Iterator>
IteratorPtr
;
58
59
template
<
class
T >
60
class
DAI_EXPORT
IteratorArr
:
public
Iterator
61
{
62
OdArray<T>
m_arr;
63
T* m_it;
64
65
public
:
66
67
IteratorArr
(
const
OdArray<T>
&arr)
68
: m_arr(arr)
69
{ start(); };
70
71
virtual
void
start
() { m_it = m_arr.begin() - 1; };
72
virtual
bool
done
() {
return
m_it >= m_arr.end() - 1; }
73
virtual
bool
next
() {
if
(!done()) { ++m_it;
return
true
; }
return
false
; }
74
virtual
int
size
() {
return
m_arr.size(); };
75
virtual
const
OdRxValueType
&
type
() {
return
OdRxValueType::Desc<T>::value
(); };
76
virtual
bool
test
() {
return
m_it >= m_arr.begin() && m_it < m_arr.end(); };
77
virtual
OdRxValue
get
() {
if
(test())
return
OdRxValue
(*m_it);
return
OdRxValue
(); }
78
79
};
80
//typedef OdSharedPtr<Iterator> DictionaryInstancePtr;//*/
81
82
}
83
84
#endif // _DAI_ITERATOR_H
OdDAI::Iterator::done
virtual bool done()=0
OdDAI::IteratorArr::next
virtual bool next()
Definition:
daiIterator.h:73
RxValue.h
OdDAI::Iterator::type
virtual const OdRxValueType & type()=0
OdDAI::IteratorArr::start
virtual void start()
Definition:
daiIterator.h:71
OdSharedPtr
Definition:
SharedPtr.h:49
OdArray< T >
OdDAI::IteratorArr::size
virtual int size()
Definition:
daiIterator.h:74
OdDAI::IteratorArr::done
virtual bool done()
Definition:
daiIterator.h:72
OdRxValue
Definition:
RxValue.h:64
OdDAI
Definition:
daiAccessDefines.h:31
OdRxValueType::Desc::value
static const OdRxValueType & value()
OdDAI::Iterator::start
virtual void start()=0
daiValueTypes.h
SharedPtr.h
OdaCommon.h
OdPlatformSettings.h
daiBuildOptions.h
OdDAI::IteratorArr::get
virtual OdRxValue get()
Definition:
daiIterator.h:77
OdRxValueType
Definition:
RxValueType.h:137
OdDAI::IteratorArr::IteratorArr
IteratorArr(const OdArray< T > &arr)
Definition:
daiIterator.h:67
OdDAI::Iterator::next
virtual bool next()=0
OdDAI::Iterator
Definition:
daiIterator.h:44
OdDAI::IteratorPtr
OdSharedPtr< Iterator > IteratorPtr
Definition:
daiIterator.h:57
OdDAI::IteratorArr::type
virtual const OdRxValueType & type()
Definition:
daiIterator.h:75
OdDAI::IteratorArr::test
virtual bool test()
Definition:
daiIterator.h:76
OdDAI::IteratorArr
Definition:
daiIterator.h:61
DAI_EXPORT
#define DAI_EXPORT
Definition:
daiBuildOptions.h:28
OdDAI::Iterator::size
virtual int size()=0
OdDAI::Iterator::get
virtual OdRxValue get()=0
OdDAI::Iterator::test
virtual bool test()=0
Generated on Mon Oct 12 2020 11:49:30