Fetching contributors…
Cannot retrieve contributors at this time
48 lines (34 sloc) 1.18 KB
/* Copyright (C) 2004 Rainmeter Project Developers
* This Source Code Form is subject to the terms of the GNU General Public
* License; either version 2 of the License, or (at your option) any later
* version. If a copy of the GPL was not distributed with this file, You can
* obtain one at <>. */
#ifndef __MEASURECALC_H__
#define __MEASURECALC_H__
#include "Measure.h"
class MeasureCalc : public Measure
MeasureCalc(Skin* skin, const WCHAR* name);
virtual ~MeasureCalc();
MeasureCalc(const MeasureCalc& other) = delete;
MeasureCalc& operator=(MeasureCalc other) = delete;
virtual UINT GetTypeID() { return TypeID<MeasureCalc>(); }
virtual void ReadOptions(ConfigParser& parser, const WCHAR* section);
virtual void UpdateValue();
static bool GetMeasureValue(const WCHAR* str, int len, double* value, void* context);
void FormulaReplace();
int GetRandom();
std::wstring m_Formula;
bool m_ParseError;
int m_LowBound;
int m_HighBound;
bool m_UpdateRandom;
bool m_UniqueRandom;
std::vector<int> m_UniqueNumbers;
void UpdateUniqueNumberList();