itom 1.4.0
|
00001 /* ******************************************************************** 00002 itom software 00003 URL: http://www.uni-stuttgart.de/ito 00004 Copyright (C) 2014, Institut für Technische Optik (ITO), 00005 Universität Stuttgart, Germany 00006 00007 This file is part of itom and its software development toolkit (SDK). 00008 00009 itom is free software; you can redistribute it and/or modify it 00010 under the terms of the GNU Library General Public Licence as published by 00011 the Free Software Foundation; either version 2 of the Licence, or (at 00012 your option) any later version. 00013 00014 In addition, as a special exception, the Institut für Technische 00015 Optik (ITO) gives you certain additional rights. 00016 These rights are described in the ITO LGPL Exception version 1.0, 00017 which can be found in the file LGPL_EXCEPTION.txt in this package. 00018 00019 itom is distributed in the hope that it will be useful, but 00020 WITHOUT ANY WARRANTY; without even the implied warranty of 00021 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library 00022 General Public Licence for more details. 00023 00024 You should have received a copy of the GNU Library General Public License 00025 along with itom. If not, see <http://www.gnu.org/licenses/>. 00026 *********************************************************************** */ 00027 00028 #ifndef INTERVAL_H 00029 #define INTERVAL_H 00030 00031 #ifdef __APPLE__ 00032 extern "C++" { 00033 #endif 00034 00035 /* includes */ 00036 #include "commonGlobal.h" 00037 00038 namespace ito 00039 { 00040 00041 //---------------------------------------------------------------------------------------------------------------------------------- 00049 class ITOMCOMMON_EXPORT AutoInterval 00050 { 00051 private: 00052 float m_min; 00053 float m_max; 00054 bool m_auto; 00055 00056 public: 00057 AutoInterval(); 00058 AutoInterval(float min, float max, bool autoInterval = false); 00059 virtual ~AutoInterval(); 00060 00061 inline float minimum() const { return m_min; } 00062 inline float maximum() const { return m_max; } 00063 inline float & rmin() { return m_min; } 00064 inline float & rmax() { return m_max; } 00065 00066 inline bool isAuto() const { return m_auto; } 00067 inline bool &rauto() { return m_auto; } 00068 00069 void setRange(float min, float max); 00070 void setMinimum(float min); 00071 void setMaximum(float max); 00072 void setAuto(bool autoInterval); 00073 00074 bool operator==( const AutoInterval & ) const; 00075 bool operator!=( const AutoInterval & ) const; 00076 }; 00077 00078 00079 } //end namespace ito 00080 00081 #ifdef __APPLE__ 00082 } 00083 #endif 00084 00085 #endif