VR-Forces 4.0.4 Class Documentation
include/gdb/networkEdgeForwardPointConstIter.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2004 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: networkEdgeForwardPointConstIter.h,v $ $Revision: 1.5 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef networkEdgeForwardPointConstIter_H_
00009 #define networkEdgeForwardPointConstIter_H_
00010 
00011 #include "gdb/gdbDefines.h"
00012 #include "gdb/netwrkEdge.h"
00013 #include "gdb/networkEdgePointConstIter.h"
00014 
00015 class DtPoint;
00016 class DtString;
00017 
00018 // DtNetworkEdgeForwardPointConstIter is a bidirectional const iterator over the points 
00019 // representing a DtNetworkEdge, traversing in the FORWARD direction.
00020 // INVARIANT:  At all times, this iterator must point to a valid DtNetworkEdge.
00021 class DT_DLL_gdb DtNetworkEdgeForwardPointConstIter : public DtNetworkEdgePointConstIter
00022 {
00023 public:
00024 
00025    // constructor
00026    // \param edge The DtNetworkEdge to iterate over
00027    DtNetworkEdgeForwardPointConstIter(const DtNetworkEdge& edge);
00028 
00029    // constructor that allows the user to specify that
00030    // the iterator is initialized to the end of the 
00031    // points of the edge.
00032    // \param edge The DtNetworkEdge to iterate over
00033    // \param isend Is the iterator at the end or not.
00034    DtNetworkEdgeForwardPointConstIter(const DtNetworkEdge& edge,
00035                                       bool isEnd);
00036 
00037    // Constructs a forward point iterator starting at the specified 
00038    // segment along the edge, which means the current point will be the starting point
00039    // of the specified segment.  
00040    // \param edge The DtNetworkEdge to iterate over
00041    // \param initialPoint The point in the edge to intialize to.
00042    // \note If the initialPoint is NOT in the edge, then the iterator is 
00043    // initialized to the first point as if no point had been specified.
00044    DtNetworkEdgeForwardPointConstIter(const DtNetworkEdge& edge,
00045                                       const DtPoint& initialPoint);
00046 
00047    // destructor
00048    virtual ~DtNetworkEdgeForwardPointConstIter();
00049 
00050    // assignment operator
00051    DtNetworkEdgeForwardPointConstIter& operator=(const DtNetworkEdgeForwardPointConstIter& orig);
00052 
00053    // copy constructor
00054    DtNetworkEdgeForwardPointConstIter(const DtNetworkEdgeForwardPointConstIter& orig);
00055 
00056    void operator++(); 
00057    void operator--(); 
00058    const DtPoint& operator*() const; 
00059    const DtPoint* operator->() const;
00060 
00061    bool operator==(const DtNetworkEdgePointConstIter& other) const;
00062    bool operator!=(const DtNetworkEdgePointConstIter& other) const;
00063    
00064    bool operator==(const DtNetworkEdgeForwardPointConstIter& other) const;
00065    bool operator!=(const DtNetworkEdgeForwardPointConstIter& other) const;
00066 
00067    virtual const DtString type() const ;
00068 
00069 protected:
00070    // Used to keep track of where we are in the parent edge since the last segment
00071    // in either direction will have both a starting and ending point.
00072    DtNetworkEdge::DtPointContainer::const_iterator myConstPointIter;
00073 
00074 private:
00075    // default constructor
00076    DtNetworkEdgeForwardPointConstIter();
00077 };
00078 
00079 
00080 #endif

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)