
#ifndef _CESTYPES

#define _CESTYPES

#define VersionString "This is a pre-version-number version."


/*

class CesBase {

 public: 
 
   char *     ObjectName;
 //OID_t      Identity;
 //MagicHat * magicHat;
   
   CesBase::CesBase {
     ObjectName[] = {"CesBase"};
 //  Identity     = magicHat->draw();
   };

}

*/


struct Point2D_t {
  int64_t X;
  int64_t Y;
};

struct Point3D_t {
  int64_t X;
  int64_t Y;
  int64_t Z;
};


 #define MIN(X,Y)  ((Y)>(X)?(X):(Y))
 
 #define MAX(X,Y)  ((Y)<(X)?(X):(Y))
 
 // is Z within X and Y?
 //  god... you would think it was lisp...
 #define WITHIN(X,Y,Z)  ( ( ((Z) >= MIN((X),(Y))) & ((Z) <= MAX((X),(Y))) ) ? (1):(0) )


/* 
  This is a round up for all the character buffer offset types.
    This primarily effects the maximum size of a file that can be 
  handled.
*/
 #define ChrOffset  long         /* use uint64 when possable :-) */ 
 #define TagType    int
 #define OID_t      unsinged long
 
 // #defint AOffset_t  long   // and this is what its called in accumulator.h
 
 enum CESError_t {
   NoError,
   UnknownError,
   OverRange,
   UnderRange,
   IndexNotFound,
   NoMemory,
   NoCode,
   InputError,
   OutputError,
   NoData
  };

/*  this needs to go in a cpp file...
 char * CESErrorStrings[] = {
  "An unknown error occurred, WHY!",
  "There was no error.",
  "Value excedded legal range",
  "Value under legel range",
  "Index not found",
  "Cannot allocate memory",
  "Method not written yet",
  "Error occured in read operation",
  "Error occured in write operation"
 };
*/
 
#endif
