itom 1.3.0
D:/git-itom/sources/itom/common/interval.h
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 bool isAuto() const { return m_auto; }
00064 
00065         void setRange(float min, float max);
00066         void setAuto(bool autoInterval);
00067 
00068         bool operator==( const AutoInterval & ) const;
00069         bool operator!=( const AutoInterval & ) const;
00070 };
00071 
00072 
00073 } //end namespace ito
00074 
00075 #ifdef __APPLE__
00076 }
00077 #endif
00078 
00079 #endif
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends