VR-Forces 4.7 Class Documentation
Home
Modules
Namespaces
Classes
Files
Examples
Behavior Models
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
include
vrfobjcore
keyedVrfObjectIterator.h
Go to the documentation of this file.
1
/*******************************************************************************
2
** Copyright (c) 2015 MAK Technologies, Inc.
3
** All rights reserved.
4
*******************************************************************************/
5
8
17
18
#pragma once
19
20
#include "
vrfcore/simManager.h
"
21
#include "
vrfobjcore/vrfObjectManager.h
"
22
23
template
<
class
T>
class
DtBaseSimObjectIterator
:
public
DtIteratorBase
<T>
24
{
25
private
:
26
27
//Default constructor. Do not use.
28
DtBaseSimObjectIterator
();
29
30
const
DtBaseSimObjectIterator
&
operator=
(
31
const
DtBaseSimObjectIterator
& orig);
32
33
public
:
34
38
DtBaseSimObjectIterator
(
const
DtList&
list
,
DtSimManager
*
39
simObjectManager) :
DtIteratorBase
<T>(list),
mySimObjectManager
(simObjectManager) {};
40
42
DtBaseSimObjectIterator
(
const
DtBaseSimObjectIterator
& orig) :
43
DtIteratorBase
<T>(orig),
44
mySimObjectManager
(orig.
mySimObjectManager
) {};
45
47
virtual
~DtBaseSimObjectIterator
() {};
48
49
T*
first
(
bool
move =
true
)
50
{
51
return
dataToObject
(this->
internalFirst
(move));
52
};
53
T*
next
(
bool
move =
true
)
54
{
55
return
dataToObject
(this->
internalNext
(move));
56
};
57
T*
prev
(
bool
move =
true
)
58
{
59
return
dataToObject
(this->
internalPrev
(move));
60
};
61
T*
last
(
bool
move =
true
)
62
{
63
return
dataToObject
(this->
internalLast
(move));
64
};
65
T*
wrapNext
(
bool
move =
true
)
66
{
67
return
dataToObject
(this->
internalWrapNext
(move));
68
};
69
T*
wrapPrev
(
bool
move =
true
)
70
{
71
return
dataToObject
(this->
internalWrapPrev
(move));
72
};
73
74
protected
:
75
T*
dataToObject
(
void
* data)
const
76
{
77
DtEntityIdentifier* keyP = (DtEntityIdentifier*) data;
78
if
(keyP)
79
{
80
DtSharedVrfObjectReference
object
=
mySimObjectManager
->
vrfObjectManager
()->
lookupVrfObjectByEntityIdentifier
(*keyP);
81
82
if
(
object
.isValid())
83
{
84
return
*object;
85
}
86
}
87
88
return
NULL;
89
}
90
91
protected
:
92
DtSimManager
*
mySimObjectManager
;
93
};
94
95
typedef
DtBaseSimObjectIterator<DtVrfObject>
DtKeyedVrfObjectIterator
;
Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (
www.mak.com
)