range.h

Go to the documentation of this file.
00001 //
00002 //******************************************************************************
00003 //                    RANGE.H
00004 //******************************************************************************
00005 //
00006 //
00007 //********************************************************************************
00008 //
00009 //            Chris Anderson (C) UCLA 1995
00010 //
00011 //            Thu Oct 26 11:40:59 1995
00012 //
00013 //********************************************************************************
00014 //
00015 
00016 #include <iostream.h>
00017 
00018 #ifndef __CAMUNDERSCORE__  
00019     class CAMunderscore;
00020 #endif
00021 
00022 #ifndef __CAMRANGE__
00023 #define __CAMRANGE__
00024 
00025 #include "mvaimpexp.h" // A
00026 
00027 class __IMPEXP__ CAMrange
00028 {
00029 
00030 protected :
00031 
00032     long  base;
00033     long  bound;
00034     long  stride;
00035     int  singleArgumentFlag;
00036     int  underscoreFlag;
00037     int  nullFlag;
00038 
00039 public :
00040 
00041 //
00042 //  Constructors
00043 //
00044     CAMrange();
00045     CAMrange( const CAMrange& A);
00046     CAMrange(long inputSize);
00047     CAMrange(long inputBase, long inputBound);
00048     CAMrange(long inputBase, long inputBound, long inputStride);
00049     CAMrange(const CAMunderscore& A);
00050 //
00051 //  Destructor 
00052 //
00053     ~CAMrange();
00054 //
00055 //  Assignment 
00056 //
00057     CAMrange& operator = ( const CAMrange& A);
00058 //
00059 //  Output 
00060 //
00061     __IMPEXP__ friend ostream& operator <<(ostream& out_stream, const CAMrange& A);
00062 //
00063 //  initialize
00064 //
00065     void      initialize();
00066     void      initialize(const CAMrange& R);
00067     void      initialize(long inputSize);
00068     void      initialize(long inputBase, long inputBound);
00069     void      initialize(long inputBase, long inputBound, long inputStride);
00070 //
00071 //  Public Member Functions
00072 //
00073     long          getBase()        const {return base;};
00074     long          getBound()    const {return bound;};
00075     long          getCount()    const {return long((bound - base)/stride + 1);};
00076     long          getStride()    const {return stride;};
00077     long          length()        const {return long((bound - base)/stride + 1);};
00078     int          getUnderscoreFlag()        const {return underscoreFlag;};
00079     int          getNullFlag()        const {return nullFlag;};
00080     int          getSingleArgumentFlag()    const {return singleArgumentFlag;};
00081     CAMrange      operator ++ (int);
00082     CAMrange      operator -- (int);
00083     CAMrange      operator + (long i);
00084     CAMrange      operator - (long i);
00085     friend CAMrange  operator + (long i, CAMrange& A);
00086     static void  CAMrangeError(const CAMrange& A);
00087 
00088 };
00089 
00090 #endif
00091 //
00092 //********************************************************************************
00093 //                     Header File End 
00094 //********************************************************************************
00095 //
00096 
00097 
00098   

Generated on Wed Aug 6 12:58:50 2003 for Open-Sessame Framework by doxygen1.3