VR-Forces 4.0.4 Class Documentation
include/gdb/networkEdgeForwardPointIter.h
Go to the documentation of this file.
00001 /*********************************************************************
00002 ** Copyright (c) 2004 MAK Technologies, Inc.
00003 ** All rights reserved.
00004 *********************************************************************/
00005 /*********************************************************************
00006 ** $RCSfile: networkEdgeForwardPointIter.h,v $ $Revision: 1.5 $ $State: Exp $
00007 *********************************************************************/
00008 #ifndef networkEdgeForwardPointIter_H_
00009 #define networkEdgeForwardPointIter_H_
00010 
00011 //
00012 // \file networkEdgeForwardPointIter.h
00013 // \brief This file contains the DtNetworkEdgeForwardPointIter class declaration.
00014 //
00015 
00016 #include "gdb/gdbDefines.h"
00017 #include "gdb/netwrkEdge.h"
00018 #include "gdb/networkEdgePointIter.h"
00019 
00020 class DtPoint;
00021 class DtString;
00022 
00023 // DtNetworkEdgeForwardPointIter is a bidirectional iterator over the points 
00024 // representing a DtNetworkEdge, traversing in the FORWARD direction.
00025 // INVARIANT:  At all times, this iterator must point to a valid DtNetworkEdge.
00026 class DT_DLL_gdb DtNetworkEdgeForwardPointIter : public DtNetworkEdgePointIter
00027 {
00028 public:
00029 
00030    // constructor
00031    // \param edge The DtNetworkEdge to iterate over
00032    DtNetworkEdgeForwardPointIter(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    DtNetworkEdgeForwardPointIter(DtNetworkEdge& edge,
00040                                  bool isEnd);
00041 
00042    // Constructs a forward point iterator starting at the specified 
00043    // segment along the edge, which means the current point will be the starting 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    DtNetworkEdgeForwardPointIter(DtNetworkEdge& edge,
00050                                  const DtPoint& initialPoint);
00051 
00052    // destructor
00053    virtual ~DtNetworkEdgeForwardPointIter();
00054 
00055    // assignment operator
00056    DtNetworkEdgeForwardPointIter& operator=(const DtNetworkEdgeForwardPointIter& orig);
00057 
00058    // copy constructor
00059    DtNetworkEdgeForwardPointIter(const DtNetworkEdgeForwardPointIter& orig);
00060 
00061    void operator++(); 
00062    void operator--(); 
00063    const DtPoint& operator*() const; 
00064    const DtPoint* operator->() const;
00065 
00066    bool operator==(const DtNetworkEdgePointIter& other) const;
00067    bool operator!=(const DtNetworkEdgePointIter& other) const;
00068    
00069    bool operator==(const DtNetworkEdgeForwardPointIter& other) const;
00070    bool operator!=(const DtNetworkEdgeForwardPointIter& other) const;
00071 
00072    // \return the DtString "DtNetworkEdgeForwardPointIter"
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::iterator myPointIter;
00079 
00080 private:
00081    // default constructor
00082    DtNetworkEdgeForwardPointIter();
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)