@LICENCE@

#ifndef @HEADDEF@_H
#define @HEADDEF@_H

#include <QObject>

#include<ComponentExtension.h>

class @EXTENSIONCLASSNAME@ : public camitk::ComponentExtension {
    Q_OBJECT
    Q_INTERFACES(camitk::ComponentExtension);
    Q_PLUGIN_METADATA(IID "fr.imag.camitk.@EXTENSIONNAME@.component.@EXTENSIONCLASSNAME@")

public:
    /// Constructor
    @EXTENSIONCLASSNAME@() : ComponentExtension() {};

    /// Method returning the component extension name
    virtual QString getName() const override {
        return "@EXTENSIONNAME@";
    };

    /// Method returning the component extension description
    virtual QString getDescription() const override {
        return "@EXTENSIONDESCRIPTION@";
    };

    /** Get the list of managed extensions
     * (each file with an extension in the list can be loaded by this extension)
     */
    virtual QStringList getFileExtensions() const override;

    /** Get a new instance from data stored in a file.
     *  This is the most important method of this class as it contains all the algorithm to create a CamiTK
     *  @EXTENSIONCLASSNAME@ from external data.
     *  This method may throw an camitk::AbortException if a problem occurs.
     */
    virtual camitk::Component * open(const QString &) override;

    /** Save a given Component (does not have to be top-level)
     *  into one of the currently managed format.
     *  @return false if the operation was not performed properly or not performed at all.
     */
    virtual bool save(camitk::Component *) const override;

protected:
    /// Destructor
    virtual ~@EXTENSIONCLASSNAME@() = default;

};

#endif // @HEADDEF@
