TIValueManip.h
Go to the documentation of this file.
1 #ifndef imath_TIValueManip_included
2 #define imath_TIValueManip_included
3 
4 
5 // Qt includes
6 #include <QtCore/QString>
7 
8 // ACF includes
9 #include <istd/IPolymorphic.h>
10 
11 #include <imath/imath.h>
12 
13 
14 namespace imath
15 {
16 
17 
21 template <class ValueType>
22 class TIValueManip: virtual public istd::IPolymorphic
23 {
24 public:
28  virtual ValueType GetRounded(const ValueType& value) const = 0;
34  virtual bool IsEqual(const ValueType& value1, const ValueType& value2) const = 0;
40  virtual bool IsSmaller(const ValueType& value1, const ValueType& value2) const = 0;
46  virtual bool IsSmallerEqual(const ValueType& value1, const ValueType& value2) const = 0;
51  virtual QString GetString(const ValueType& value) const = 0;
58  virtual bool GetParsed(const QString& text, ValueType& result) const = 0;
62  virtual ValueType GetSmallerValue(const ValueType& value) const = 0;
66  virtual ValueType GetBiggerValue(const ValueType& value) const = 0;
67 };
68 
69 
70 } // namespace imath
71 
72 
73 #endif // !imath_TIValueManip_included
74 
75 
virtual ValueType GetBiggerValue(const ValueType &value) const =0
Return smallest value bigger that specified one.
virtual bool GetParsed(const QString &text, ValueType &result) const =0
Get value converted from string.
virtual ValueType GetRounded(const ValueType &value) const =0
Get the nearest value rounded used this arithmetik.
Base interface for all used interfaces and implementations.
Definition: IPolymorphic.h:17
virtual bool IsSmallerEqual(const ValueType &value1, const ValueType &value2) const =0
Compare two values and check, if first one is smaller or equal as the second.
virtual bool IsSmaller(const ValueType &value1, const ValueType &value2) const =0
Compare two values and check, if first one is smaller as the second.
virtual ValueType GetSmallerValue(const ValueType &value) const =0
Return biggest value smaller that specified one.
Interface for all classes providing simply arithmetic functions on predefined data type...
Definition: TIValueManip.h:22
virtual QString GetString(const ValueType &value) const =0
Get this value as string.
virtual bool IsEqual(const ValueType &value1, const ValueType &value2) const =0
Compare two values and check, if there are equal.

© 2007-2017 Witold Gantzke and Kirill Lepskiy