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