VR-Forces 4.10 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
gdb
networkEdgePointConstIter.h
Go to the documentation of this file.
1
/*********************************************************************
2
** Copyright (c) 2004 MAK Technologies, Inc.
3
** All rights reserved.
4
*********************************************************************/
5
/*********************************************************************
6
** $RCSfile: networkEdgePointConstIter.h,v $ $Revision: 1.5 $ $State: Exp $
7
*********************************************************************/
8
#ifndef networkEdgePointConstIter_H_
9
#define networkEdgePointConstIter_H_
10
11
//
12
// \file networkEdgePointConstIter.h
13
// \brief Contains the DtNetworkEdgePointConstIter class declaration.
14
//
15
16
#include "
gdb/gdbDefines.h
"
17
#include "
gdb/networkEdge.h
"
18
19
class
DtPoint
;
20
class
DtString
;
21
22
//
23
// DtNetworkEdgePointConstIter is an ABC representing
24
// a const iterator over the points representing a DtNetworkEdge.
25
// \invariant At all times, this iterator must point to a valid DtNetworkEdge.
26
// \invariant This iterator can not be used to modify the referenced DtNetworkEdge
27
class
DT_DLL_gdb
DtNetworkEdgePointConstIter
28
{
29
public
:
30
31
// constructor
32
// \param edge The DtNetworkEdge to iterate over
33
DtNetworkEdgePointConstIter
(
const
DtNetworkEdge
& edge);
34
35
// constructor that allows the user to specify that
36
// the iterator is initialized to the end of the
37
// points of the edge.
38
// \param edge The DtNetworkEdge to iterate over
39
// \param isend Is the iterator at the end or not.
40
DtNetworkEdgePointConstIter
(
const
DtNetworkEdge
& edge,
bool
isEnd);
41
42
// destructor
43
virtual
~
DtNetworkEdgePointConstIter
();
44
45
// copy constructor
46
DtNetworkEdgePointConstIter
(
const
DtNetworkEdgePointConstIter
& orig);
47
48
// assignment operator
49
virtual
DtNetworkEdgePointConstIter
& operator=(
const
DtNetworkEdgePointConstIter
& orig);
50
51
// Increment/Decrement to the next/previous points.
52
// \note Incrementing is defined as moving to the next point in the direction
53
// in which the iterator is iterating over the edge, NOT necessarily the
54
// next point in the order in which they are defined in the edge itself.
55
virtual
void
operator++() = 0;
56
virtual
void
operator--() = 0;
57
58
// \return A reference to a const DtPoint in the edge
59
virtual
const
DtPoint
& operator*()
const
= 0;
60
// \return A pointer to a const DtPoint in the edge
61
virtual
const
DtPoint
* operator->()
const
= 0;
62
63
// \return A boolean signifying whether the iteration is equal to the other
64
// iterator or not.
65
virtual
bool
operator==
(
const
DtNetworkEdgePointConstIter
& other)
const
;
66
virtual
bool
operator!=
(
const
DtNetworkEdgePointConstIter
& other)
const
;
67
68
// \return the DtString "DtNetworkEdgePointConstIter"
69
virtual
const
DtString
type()
const
;
70
71
protected
:
72
// Tests the invariant for the class (described above)
73
// \return true if the invariant is valid.
74
// false otherwise.
75
bool
testInvariant
()
const
;
76
77
const
DtNetworkEdge
*
myEdge
;
78
bool
myIsEnd
;
79
80
private
:
81
// default constructor
82
DtNetworkEdgePointConstIter
();
83
};
84
85
86
inline
DtNetworkEdgePointConstIter::DtNetworkEdgePointConstIter
(
const
DtNetworkEdge
& edge):
87
myEdge(&edge),
88
myIsEnd(false)
89
{
90
}
91
92
inline
DtNetworkEdgePointConstIter::DtNetworkEdgePointConstIter
(
const
DtNetworkEdge
& edge,
bool
isEnd):
93
myEdge(&edge),
94
myIsEnd(isEnd)
95
{
96
}
97
98
99
inline
DtNetworkEdgePointConstIter::~DtNetworkEdgePointConstIter
()
100
{
101
}
102
103
inline
DtNetworkEdgePointConstIter::DtNetworkEdgePointConstIter
(
const
DtNetworkEdgePointConstIter
& orig)
104
{
105
myEdge
= orig.
myEdge
;
106
myIsEnd
= orig.
myIsEnd
;
107
}
108
109
inline
DtNetworkEdgePointConstIter
&
DtNetworkEdgePointConstIter::operator=
(
const
DtNetworkEdgePointConstIter
& orig)
110
{
111
if
(*
this
!= orig)
112
{
113
myEdge
= orig.
myEdge
;
114
myIsEnd
= orig.
myIsEnd
;
115
}
116
117
return
*
this
;
118
}
119
120
inline
const
DtString
DtNetworkEdgePointConstIter::type
()
const
121
{
122
return
"DtNetworkEdgePointConstIter"
;
123
}
124
125
126
#endif
DtNetworkEdgePointConstIter::type
virtual const DtString type() const
Definition:
networkEdgePointConstIter.h:120
DtNetworkEdgePointConstIter::myEdge
const DtNetworkEdge * myEdge
Definition:
networkEdgePointConstIter.h:77
operator==
DT_DLL_terrainCS bool operator==(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
testInvariant
*bool testInvariant() const
gdbDefines.h
DT_DLL_gdb
#define DT_DLL_gdb
Definition:
gdbDefines.h:25
networkEdge.h
DtNetworkEdgePointConstIter::myIsEnd
bool myIsEnd
Definition:
networkEdgePointConstIter.h:78
DtNetworkEdgePointConstIter::~DtNetworkEdgePointConstIter
virtual ~DtNetworkEdgePointConstIter()
Definition:
networkEdgePointConstIter.h:99
DtNetworkEdgePointConstIter
Definition:
networkEdgePointConstIter.h:27
DtNetworkEdge
Definition:
networkEdge.h:28
operator!=
DT_DLL_terrainCS bool operator!=(const DtDegMinSec &lhs, const DtDegMinSec &rhs)
DtString
DtNetworkEdgePointConstIter::operator=
virtual DtNetworkEdgePointConstIter & operator=(const DtNetworkEdgePointConstIter &orig)
Definition:
networkEdgePointConstIter.h:109
DtPoint
Definition:
point.h:34
DtNetworkEdgePointConstIter::DtNetworkEdgePointConstIter
DtNetworkEdgePointConstIter()
Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (
www.mak.com
)