00001
00002
00003
00004
00005
00006 #ifndef _GRID3D_H_20050124_1113
00007 #define _GRID3D_H_20050124_1113
00008 #include <exception>
00009 #include <string>
00010
00011 namespace RDKit {
00012 class DiscreteValueVect;
00013 }
00014 namespace RDGeom {
00015 class Point3D;
00016
00017 class GridException : public std::exception {
00018 public:
00019
00020 GridException(const char *msg) : _msg(msg) {};
00021
00022 GridException(const std::string msg) : _msg(msg) {};
00023
00024 const char *message () const { return _msg.c_str(); };
00025 ~GridException () throw () {};
00026 private:
00027 std::string _msg;
00028 };
00029
00030
00031 class Grid3D {
00032 public:
00033 virtual ~Grid3D() {};
00034 virtual int getGridPointIndex(const Point3D &point) const = 0;
00035 virtual int getVal(const Point3D &point) const = 0;
00036 virtual void setVal(const Point3D &point, unsigned int val) = 0;
00037
00038 virtual Point3D getGridPointLoc(unsigned int pointId) const = 0;
00039 virtual unsigned int getVal(unsigned int pointId) const = 0;
00040 virtual void setVal(unsigned int pointId, unsigned int val) = 0;
00041
00042 virtual bool compareParams(const Grid3D &other) const {
00043 return false;
00044 };
00045
00046 virtual unsigned int getSize() const = 0;
00047
00048 virtual const RDKit::DiscreteValueVect *getOccupancyVect() const = 0;
00049 };
00050 }
00051
00052 #endif