ICF 3.1.1.10
Technical documentation of ICF Libraries
CGeneralNumericValue.h
Go to the documentation of this file.
1/********************************************************************************
2** This file is part of the ICF Framework. Copyright (C) Witold Gantzke & Kirill Lepskiy
3** ICF Framework may be used under the terms of the LGPL License v. 2.1 by the Free Software Foundation.
4********************************************************************************/
5
6#ifndef imeas_CGeneralNumericValue_included
7#define imeas_CGeneralNumericValue_included
8
9
10// Qt includes
11#include "QtCore/QMap"
12
13// ICF includes
14#include <imath/CVarVector.h>
15#include <imeas/INumericValue.h>
16
17namespace imeas
18{
19
20
22{
23public:
26
27 // reimplemented (imeas::INumericValue)
28 bool IsValueTypeSupported(ValueTypeId valueTypeId, bool editableOnly = false) const override;
30 double GetComponentValue(ValueTypeId valueTypeId) const override;
31 bool SetComponentValue(ValueTypeId valueTypeId, double value) override;
32
33 // reimplemented (iser::ISerializable)
34 bool Serialize(iser::IArchive& archive) override;
35
36 // reimplemented (istd::IChangable)
37 bool CopyFrom(const istd::IChangeable& object, CompatibilityMode mode = CM_WITHOUT_REFS) override;
38 std::unique_ptr<istd::IChangeable> CloneMe(CompatibilityMode mode = CM_WITHOUT_REFS) const override;
40
41protected:
42 typedef std::map<imeas::INumericValue::ValueTypeId, double> ComponentsMap;
44};
45
46
47} // namespace imeas
48
49
50#endif // !imeas_CGeneralNumericValue_included
51
52
bool Serialize(iser::IArchive &archive) override
Load or store state of this object as a archive stream.
bool ResetData(CompatibilityMode mode=CM_WITHOUT_REFS) override
Reset data to its default state.
bool IsValueTypeSupported(ValueTypeId valueTypeId, bool editableOnly=false) const override
Check if the given value type (or value component) is supported.
std::map< imeas::INumericValue::ValueTypeId, double > ComponentsMap
const imeas::INumericConstraints & GetNumericConstraints() const override
Get parameter constraints describing possible parameter values.
void RemoveComponentValue(ValueTypeId valueTypeId)
std::unique_ptr< istd::IChangeable > CloneMe(CompatibilityMode mode=CM_WITHOUT_REFS) const override
Make a copy of this object.
bool SetComponentValue(ValueTypeId valueTypeId, double value) override
Set component value of the given type.
double GetComponentValue(ValueTypeId valueTypeId) const override
Get access to component value of the given type.
bool CopyFrom(const istd::IChangeable &object, CompatibilityMode mode=CM_WITHOUT_REFS) override
Copy this object from another one.
Describe additional meta information for set of numeric values.
General parameter set containing list of numeric values.
INumericConstraints::ValueTypeId ValueTypeId
Represent input/output persistence archive.
Definition IArchive.h:34
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
CompatibilityMode
Control how relationship betweeen objects are interpreted.
@ CM_WITHOUT_REFS
External references are simple ignored.
This namespace contains classes for measurement system implementations.

© Witold Gantzke and Kirill Lepskiy