point-ref.h

Go to the documentation of this file.
00001 // Copyright 2007, Massachusetts Institute of Technology.
00002 // The use of this code is permitted for research only. There is
00003 // absolutely no warranty for this software.
00004 //
00005 // Author: John Lee (jjl@mit.edu)
00006 //
00007 
00008 #ifndef POINT_SET_POINT_REF_H
00009 #define POINT_SET_POINT_REF_H
00010 
00011 #include "point_set/point-set-list.h"
00012 #include "point_set/point.h"
00013 
00014 namespace libpmk {
00015 
00016 class PointSetList;
00017 
00019 
00034 class PointRef {
00035 public:
00037   PointRef(const PointSetList* data, int point_index);
00038 
00040   PointRef(const PointSetList* data, int which_point_set, int which_point);
00041 
00043 
00050   PointRef(const PointSetList* data, int point_index,
00051            int which_point_set, int which_point);
00052 
00053   PointRef(const PointRef& other);
00054 
00056   const Point& point() const;
00057 
00059 
00062   int which_point_set() const;
00063 
00065 
00068   int which_point() const;
00069 
00072   int point_index() const;
00073 
00074 private:
00075   const PointSetList* data_;
00076 
00077   // References a particular point.
00078   int point_index_;
00079 
00080   // These two variables combined also reference a particular point,
00081   // but we store both representations for ease of use.
00082   int which_point_set_;
00083   int which_point_;
00084 };
00085 }  // namespace libpmk
00086 
00087 #endif  // POINT_SET_POINT_REF_H

Generated on Fri Sep 21 11:39:04 2007 for libpmk2 by  doxygen 1.5.1