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