class CCL::PresetStore

Overview

#include <presetstore.h>

class PresetStore
{
public:
    // classes

    class PresetFilter;
    class PresetSearcher;

    // methods

    bool isEmpty () const;
    bool hasPresets (IAttributeList& metaInfo) const;

    IUnknownList* getPresets (
        IAttributeList* metaInfo,
        IProgressNotify* progress = nullptr
    ) const;

    bool presetExists (
        IAttributeList* metaInfo,
        StringRef name,
        const FileType* fileType = nullptr
    ) const;

    ISearcher* createSearcher (ISearchDescription& description);
    void onPresetCreated (UrlRef url, const IPreset& preset);
    void onPresetRemoved (UrlRef url, const IPreset& preset);
    void addPreset (UrlRef url, const IPreset& preset);
    void addPreset (PresetDescriptor* newPreset);
    void updatePreset (PresetDescriptor* existingPreset);
    void removePreset (PresetDescriptor* existingPreset);
    void flush (bool force);
    PresetDescriptor* getPresetDescriptor (UrlRef url) const;
    Iterator* query (Persistence::IExpression* condition = nullptr) const;
    Iterator* queryFolderDeep (UrlRef folder) const;
    void getPresetLocations (Container& locations);
    void collectClassKeys ();

    void collectSubFolders (
        IMutableArray& subFolders,
        const IAttributeList* metaInfo
    );

    DataStore& getDataStore () const;
    static String getClassKey (const IAttributeList& metaInfo);
    static Persistence::Expression makeClassCondition (const IAttributeList& metaInfo);
};

Detailed Documentation

Methods

void onPresetCreated (UrlRef url, const IPreset& preset)

adds or updates if necessary

void onPresetRemoved (UrlRef url, const IPreset& preset)

removes preset from db

PresetDescriptor* getPresetDescriptor (UrlRef url) const

query for PresetDescriptors

caller owns descriptor

Iterator* query (Persistence::IExpression* condition = nullptr) const

returns iterator of PresetDescriptors

Iterator* queryFolderDeep (UrlRef folder) const

returns iterator of PresetDescriptors

void getPresetLocations (Container& locations)

adds PresetLocation (DataItem) objects