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*>
82f284
49e693
	std::string filename;
82f284
	Surface* surface;
49e693
	bool tga;
a04770
	bool hide;
a04770
	bool hide_subs;
82f284
	bool repeat;
82f284
82f284
	bool has_subs;
b09c5d
	long long subs;
b09c5d
	long long t;
82f284
	std::vector<long long=""> repeats;</long>
49e693
82f284
	Measure(const Measure&): surface(), tga(), hide(), hide_subs(), repeat(), has_subs(), subs(), t() { }
49e693
	Measure& operator= (const Measure&) { return *this; }
a04770
	void init();
49e693
public:
82f284
	Measure(const std::string &filename, bool hide_subs = false, bool repeat = false):
82f284
		filename(filename), surface(), tga(), hide(), hide_subs(hide_subs), repeat(repeat), has_subs(), subs(), t()
a04770
	{ init(); }
a04770
82f284
	Measure(const std::string &filename, Surface &surface, bool hide_subs = false, bool repeat = false):
82f284
		filename(filename), surface(&surface), tga(), hide(), hide_subs(hide_subs), repeat(repeat), has_subs(), subs(), t()
a04770
	{ init(); }
a04770
49e693
	~Measure();
49e693
};
49e693
49e693
#endif