/* * TriangleRecord.h * * Copyright (C) 2009 Matthias Schiffer * * This program is free software: you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published by the * Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * See the GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License along * with this program. If not, see . */ #ifndef ZOOM_TRIANGLERECORD_H_ #define ZOOM_TRIANGLERECORD_H_ #include "Triangle.h" #include namespace Zoom { class TriangleRecord { public: class TriangleData { protected: TriangleData() {} public: virtual ~TriangleData() {} }; TriangleRecord(const Triangle& triangle0, boost::shared_ptr data0) : triangle(triangle0), data(data0) {} TriangleRecord(const Triangle& triangle0) : triangle(triangle0) {} TriangleRecord() {} const Triangle& getTriangle() const {return triangle;} Triangle& getTriangle() {return triangle;} void setTriangle(const Triangle &t) {triangle = t;} boost::shared_ptr getData() const {return data;} void setData(boost::shared_ptr d) {data = d;} private: Triangle triangle; boost::shared_ptr data; }; } #endif /* ZOOM_TRIANGLERECORD_H_ */