//! file="amma/StdType/StdList/OList.hh" //! lib=MstdList //! userlevel=Obsolete //! author="Radek Marik" //! docentry="Obsolete" //! rcsid="$Id: OList.hh,v 1.6 1999/02/04 18:45:16 eep1rr Exp $" //! date="06/08/95" /* IAPS - Image analysis program system - include file File name : OrientedList.hh Description: a oriented list Last change: 26.11.1992 Author : R. Marik Libraries : iaps _____________________________________________________________________ Modifications: */ #ifndef ORIENTEDLIST_HH #define ORIENTEDLIST_HH #include "amma/List.hh" #include "amma/FBOrient.hh" /*-------------------------------------------------------------------------*/ /*********** OrientedListC *************************************************/ /*-------------------------------------------------------------------------*/ template class OrientedListC: public ListC { public: OrientedListC(); OrientedListC(const FBOrientationC & orient); OrientedListC(const OrientedListC & list); OrientedListC Copy(); OrientedListC & Reverse(); OrientedListC & OrientationSet(const FBOrientationC & orient); const FBOrientationC & Orientation() const; protected: OrientedListC(const ListC & list, const FBOrientationC & orient); private: FBOrientationC orientation; }; //*********************************************************************** //************* Templates ********************************************* //*********************************************************************** template OrientedListC::OrientedListC() /***********************************/ : ListC(), orientation(FBOrientationC::FORWARD) {} template OrientedListC::OrientedListC(const FBOrientationC & orient) /**************************************************************/ : ListC(), orientation(orient) {} template OrientedListC::OrientedListC(const OrientedListC & list) /*******************************************************/ : ListC(list), orientation(list.Orientation()) {} template OrientedListC OrientedListC::Copy() //========================== { return(ListC::Copy(),orientation); } template OrientedListC & OrientedListC::Reverse() //============================= { orientation.Change(); ListC::Reverse(); return(*this); } template OrientedListC & OrientedListC::OrientationSet(const FBOrientationC & orient) /*****************************************************************/ { if (Orientation() != orient) Reverse(); return(*this); } template const FBOrientationC & OrientedListC::Orientation() const //======================================= { return(orientation); } template OrientedListC::OrientedListC(const ListC & list, const FBOrientationC & orient) //================================================================ : ListC(list), orientation(orient) {} #endif // IAPS - Image analysis program system. // End of include file OrientedList.hh