ICF 3.0.5.47
Technical documentation of ICF Libraries
CSelectionConstraintsComp.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 iprm_CSelectionConstraintsComp_included
7#define iprm_CSelectionConstraintsComp_included
8
9
10// ICF includes
11#include <iser/ISerializable.h>
13#include <iprm/IOptionsList.h>
15
16
17namespace iprm
18{
19
20
26 virtual public iprm::IOptionsList
27{
28public:
30
31 I_BEGIN_COMPONENT(CSelectionConstraintsComp);
32 I_REGISTER_INTERFACE(istd::IChangeable);
33 I_REGISTER_INTERFACE(iprm::IOptionsList);
34 I_ASSIGN_MULTI_0(m_optionNamesAttrPtr, "OptionNames", "Names of selectable options", true);
35 I_ASSIGN_MULTI_0(m_optionDescriptionsAttrPtr, "OptionDescriptions", "Descriptions of selectable options", true);
36 I_ASSIGN_MULTI_0(m_optionIdsAttrPtr, "OptionIds", "List of option IDs", true);
37 I_ASSIGN_MULTI_0(m_optionsEnablersCompPtr, "OptionEnablers", "List of enablers for the options", false);
38 I_END_COMPONENT;
39
40 // reimplemented (iprm::IOptionsList)
41 int GetOptionsFlags() const override;
42 int GetOptionsCount() const override;
43 QString GetOptionName(int index) const override;
44 QString GetOptionDescription(int index) const override;
45 QByteArray GetOptionId(int index) const override;
46 bool IsOptionEnabled(int index) const override;
47
48private:
49 I_MULTITEXTATTR(m_optionNamesAttrPtr);
50 I_MULTITEXTATTR(m_optionDescriptionsAttrPtr);
51 I_MULTIATTR(QByteArray, m_optionIdsAttrPtr);
52 I_MULTIREF(iprm::IEnableableParam, m_optionsEnablersCompPtr);
53};
54
55
56} // namespace iprm
57
58
59#endif // !iprm_CSelectionConstraintsComp_included
60
61
Base class for component implementation.
Implementation of selection constraints.
QString GetOptionDescription(int index) const override
Get human readable description for a option with the index index.
QString GetOptionName(int index) const override
Get name of specified option.
bool IsOptionEnabled(int index) const override
Return true if the option is enabled and can be selected.
int GetOptionsCount() const override
Get number of managed options.
QByteArray GetOptionId(int index) const override
Get option ID.
int GetOptionsFlags() const override
Get constraints flags.
Interface for objects which can be enabled/disabled.
Constraints of selection from set of possibilities.
Common interface for data model objects, which can be changed.
Definition IChangeable.h:32
#define I_MULTITEXTATTR(member)
Declare translatable multiple text attribute member.
Contains interfaces and implementations of flexible parameter concept.

© Witold Gantzke and Kirill Lepskiy