ACF $AcfVersion:0$
TIValueManip.h
Go to the documentation of this file.
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ACF-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QString>
7
8// ACF includes
9#include <istd/IPolymorphic.h>
10#include <imath/imath.h>
11
12
13namespace imath
14{
15
16
20template <class ValueType>
21class TIValueManip: virtual public istd::IPolymorphic
22{
23public:
27 virtual ValueType GetRounded(const ValueType& value) const = 0;
33 virtual bool AreValuesEqual(const ValueType& value1, const ValueType& value2) const = 0;
39 virtual bool IsSmaller(const ValueType& value1, const ValueType& value2) const = 0;
45 virtual bool IsSmallerEqual(const ValueType& value1, const ValueType& value2) const = 0;
50 virtual QString GetString(const ValueType& value) const = 0;
57 virtual bool GetParsed(const QString& text, ValueType& result) const = 0;
61 virtual ValueType GetSmallerValue(const ValueType& value) const = 0;
65 virtual ValueType GetBiggerValue(const ValueType& value) const = 0;
66};
67
68
69} // namespace imath
70
71
Interface for all classes providing simply arithmetic functions on predefined data type.
virtual ValueType GetBiggerValue(const ValueType &value) const =0
Return smallest value bigger that specified one.
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 bool AreValuesEqual(const ValueType &value1, const ValueType &value2) const =0
Compare two values and check, if there are equal.
virtual QString GetString(const ValueType &value) const =0
Get this value as string.
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 ValueType GetSmallerValue(const ValueType &value) const =0
Return biggest value smaller that specified one.
virtual ValueType GetRounded(const ValueType &value) const =0
Get the nearest value rounded used this arithmetik.
virtual bool GetParsed(const QString &text, ValueType &result) const =0
Get value converted from string.
Base interface for all used interfaces and implementations.
Package with mathematical functions and algebraical primitives.