CNameParamComp.h
Go to the documentation of this file.
1 #ifndef iprm_CNameParamComp_included
2 #define iprm_CNameParamComp_included
3 
4 
5 // ACF includes
6 #include <icomp/CComponentBase.h>
7 
8 #include <iprm/CNameParam.h>
9 
10 
11 namespace iprm
12 {
13 
14 
19  public icomp::CComponentBase,
20  public iprm::CNameParam
21 {
22 public:
25 
26  I_BEGIN_COMPONENT(CNameParamComp);
27  I_REGISTER_INTERFACE(iprm::INameParam);
28  I_REGISTER_INTERFACE(iser::ISerializable);
29  I_REGISTER_INTERFACE(istd::IChangeable);
30  I_ASSIGN(m_defaultNameAttrPtr, "DefaultName", "Default name", false, "");
31  I_ASSIGN(m_isNameFixedAttrPtr, "IsNameFixed", "When enabled, the name is fixed and cannot be changed during run tume", true, false);
32  I_END_COMPONENT;
33 
34  // reimplemented (iprm::INameParam)
35  virtual void SetName(const QString& name);
36  virtual bool IsNameFixed() const;
37 
38 protected:
39  // reimplemented (icomp::CComponentBase)
40  virtual void OnComponentCreated();
41 
42 private:
43  I_TEXTATTR(m_defaultNameAttrPtr);
44  I_ATTR(bool, m_isNameFixedAttrPtr);
45 };
46 
47 
48 } // namespace iprm
49 
50 
51 #endif // !iprm_CNameParamComp_included
52 
53 
icomp::CComponentBase BaseClass
Interface for a object containing simple text.
Definition: INameParam.h:20
Base class for component implementation.
virtual void OnComponentCreated()
Component for automatic creation of the Universally Unique Identifier (UUID)
virtual void SetName(const QString &name)
Set the object name.
Implementation of a named object over iprm::INameParam interface.
Definition: CNameParam.h:16
Common class for all classes which objects can be archived or restored from archive.
Definition: ISerializable.h:23
Common interface for data model objects, which can be changed.
Definition: IChangeable.h:24
virtual bool IsNameFixed() const
Return true, if the name setting is enabled.
iprm::CNameParam BaseClass2

© 2007-2017 Witold Gantzke and Kirill Lepskiy