00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef __UT_RandomSequence_H__
00015 #define __UT_RandomSequence_H__
00016
00017 #include "UT_API.h"
00018
00019 class UT_API UT_RandomSequence
00020 {
00021 public:
00022 explicit UT_RandomSequence (int n = 0, int c = 0);
00023
00024 void setCurrent(int c = 0) { current = (unsigned)(c + 1); }
00025 void setSize(int n);
00026
00027 unsigned getCurrent(void) { return(current - 1); }
00028 unsigned getSize(void) { return(size); }
00029
00030
00031 unsigned getNext(void);
00032
00033 protected:
00034 private:
00035
00036 unsigned current;
00037 unsigned mask;
00038 unsigned size;
00039 };
00040
00041 #endif