Blame c++/contourgl/measure.h

49e693
/*
49e693
    ......... 2015 Ivan Mahonin
49e693
49e693
    This program is free software: you can redistribute it and/or modify
49e693
    it under the terms of the GNU General Public License as published by
49e693
    the Free Software Foundation, either version 3 of the License, or
49e693
    (at your option) any later version.
49e693
49e693
    This program is distributed in the hope that it will be useful,
49e693
    but WITHOUT ANY WARRANTY; without even the implied warranty of
49e693
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
49e693
    GNU General Public License for more details.
49e693
49e693
    You should have received a copy of the GNU General Public License
49e693
    along with this program.  If not, see <http: licenses="" www.gnu.org="">.</http:>
49e693
*/
49e693
49e693
#ifndef _MEASURE_H_
49e693
#define _MEASURE_H_
49e693
49e693
#include <vector></vector>
49e693
#include <string></string>
49e693
572d9c
#include "swrender.h"
49e693
49e693
49e693
class Measure {
49e693
private:
49e693
	static std::vector<measure*> stack;</measure*>
49e693
	std::string filename;
49e693
	Surface *surface;
49e693
	bool tga;
a04770
	bool hide;
a04770
	bool hide_subs;
b09c5d
	long long subs;
b09c5d
	long long t;
49e693
a04770
	Measure(const Measure&): surface(), tga(), hide(), hide_subs(), subs(), t() { }
49e693
	Measure& operator= (const Measure&) { return *this; }
a04770
	void init();
49e693
public:
a04770
	Measure(const std::string &filename, bool hide_subs = false):
a04770
		filename(filename), surface(), tga(), hide(), hide_subs(hide_subs), subs(), t()
a04770
	{ init(); }
a04770
a04770
	Measure(const std::string &filename, Surface &surface, bool hide_subs = false):
a04770
		filename(filename), surface(&surface), tga(), hide(), hide_subs(hide_subs), subs(), t()
a04770
	{ init(); }
a04770
49e693
	~Measure();
49e693
};
49e693
49e693
#endif