Main Page   Packages   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

C:/temp/src/j2k/nto/Track.hpp

Go to the documentation of this file.
00001 #ifndef __J2K__Track_HPP__
00002 #define __J2K__Track_HPP__
00003 
00004 #include <j2k/Fred/Standard.hpp>
00005 
00006 class Track;
00007 class TrackArray;
00008 class Train;
00009 class Semaphore;
00010 
00011 #include <j2k/nto/TrackStruct.hpp>
00012 #include <j2k/nto/Semaphore.hpp>
00013 #include <j2k/nto/Train.hpp>
00014 
00015 class Track
00016 {
00017 public:
00018   Track( int index = 0 );
00019   Track( track_segment_t  seg );
00020   Track( track_init_t init, track_segment_t  seg, double* length );
00021 
00022   virtual  ~Track();
00023 
00024 
00025   long     setTrain();
00026   long     setTrain( Train* t, long reserved = 1 );
00027 
00028   BOOL     isEmpty();
00029   BOOL     isFull();
00030   long     isReserved();
00031 
00032   Train*   getTrain();
00033 
00034   long     getLeft(  size_t index = 0 );
00035   long     getRight( size_t index = 0 );
00036 
00037   long     getLeftEmpty(  Track** tracks );
00038   long     getRightEmpty( Track** tracks ); 
00039 
00040   long     getMaxLeft();
00041   long     getMaxRight();
00042 
00043   double   getLength(     size_t index = 0 );
00044   long     getLengthName( size_t index = 0 );
00045 
00046   track_type_t  getType(  size_t index = 0 );
00047 
00048 protected:
00049   int        index;
00050   long       reserved;
00051 
00052   Train*     current;
00053   double     length[ 10 ];
00054 
00055   Semaphore  occupied;
00056   Semaphore  lock;
00057 
00058   track_segment_t segment;
00059 
00060 private:
00061   Track( const Track& src );
00062   const Track& operator=( const Track& src );
00063 };
00064 
00065 #endif
00066 

Generated on Sun Oct 14 18:46:37 2001 for Standard J2K Library by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001