/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 * 
 * File:   xreatemanager-decorators.h
 * Author: pgess <v.melnychenko@xreate.org>
 *
 * Created on July 16, 2017, 4:37 PM
 */

#ifndef XREATEMANAGER_DECORATORS_H
#define XREATEMANAGER_DECORATORS_H

#include "xreatemanager.h"

namespace xreate{

/** \brief Simple \ref xm_adapt "XreateManager's" backend intended for inheritance, does not provide much functionality. */
class XreateManagerDecoratorBase: public details::tier2::XreateManager{
public:
    virtual void initPasses() override;
    virtual void analyse();
    virtual void* run(){};

public:
    virtual void prepareCode(std::string&& code);
    virtual void prepareCode(FILE* code);
};

/** \brief \ref xm_adapt "XreateManager's" backend intended to initialize all builtin passes. */
class XreateManagerDecoratorFull: public XreateManagerDecoratorBase{
public:
    virtual void initPasses() override;
    void* run();
};

}

#endif /* XREATEMANAGER_DECORATORS_H */

