IPackageListItem



Describes list items. Used in packages and Form Builder.

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

class IPackageListItem :public virtual IPackageEntity
{
public:
    virtual bool isInstance(IListItem *listitem) = 0; // Return whether a specified listitem is instance of listitem corresponding to this package entity

    /**
     Create corresponding list item and property list
    @param [out] properties  Created property list will be stored here. Pass nullptr to avoid property list creation
    @return  Created list item
    */
    virtual IListItem *Create(IPropertyList **properties) = 0;
    virtual IPropertyList *CreatePropertyList(IListItem *listitem) = 0; // Create properties for specified listitem
    virtual void Save(Variant &dest, IPropertyList *properties) = 0; // Save properties into Variant
    virtual void Load(const Variant &src, IPropertyList *properties) = 0; // Load properties from Variant
    virtual void Load(const String &src, IPropertyList *properties) = 0; // Load properties from json decoded string
    /**
    Should output properties as c++ code
    @param f File stream
    @param shift Just a spaces for good code alignment. Add it to output
    @param owner Component/Control name which owns the list items
    @param properties Property list
    */
    virtual void Export(std::wofstream &f, const String &shift, const String &owner, IPropertyList *properties) = 0;
};
Namespace: nitisa
Include: Nitisa/Interfaces/IPackageListItem.h