CProperty



Base class for single state properties.

You can find more information in comments below. Overrided methods can be found in corresponding base interface.

class CProperty :public virtual IProperty
{
public:
    using FSkip = bool(*)(IClass *parent);
protected:
    String m_sPropertyHandlerName;

    String Prefix(const EXPORT_PREFIX_TYPE prefix_type, const String &prefix = L""); // Generate prefix depending on prefix type specified
public:
    IPropertyList *getPropertyList() override;
    IClass *getParent() override;
    String getName() override;
    String getPropertyHandlerName() override;
    bool isSkip() override;
    bool isAffectItems() override;

    void setParent(IClass *parent) override;
    IProperty *setAffectItems(const bool value) override;

    void Release() override;

    /**
    Constructor
    @param list List of properties to which this property belongs
    @param parent Parent object which property this one describes
    @param name Property name
    @param handler Property handler name
    @param skip Function checking if the property could be skipped when saving in Form Builder. Could be nullptr
    @param read_only Whether the property is read only
    */
    CProperty(IPropertyList *list, IClass *parent, const String &name, const String &handler, FSkip skip, const bool read_only);
    virtual ~CProperty() = default;

    bool isReadOnly() const; // Return whether the property is read only
};
Namespace: nitisa
Include: Nitisa/Core/Property.h