//Auto-generated by /usr/bin/smokegen. DO NOT EDIT.
#include <ktexteditor_includes.h>
#include <typeinfo>

#include <smoke.h>
#include <ktexteditor_smoke.h>

class __internal_SmokeClass {};

namespace __smokektexteditor {

class x_KTextEditor__CodeCompletionModelControllerInterface2 : public KTextEditor::CodeCompletionModelControllerInterface2, public __internal_SmokeClass {
    SmokeBinding* _binding;
public:
    void x_0(Smoke::Stack x) {
        // set the smoke binding
        _binding = (SmokeBinding*)x[1].s_class;
    }
    void x_1(Smoke::Stack x) {
        // virtual KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction matchingItem(const QModelIndex&)
        if (dynamic_cast<__internal_SmokeClass*>(static_cast<KTextEditor::CodeCompletionModelControllerInterface2*>(this))) {
            KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction xret = this->KTextEditor::CodeCompletionModelControllerInterface2::matchingItem(*(const QModelIndex*)x[1].s_class);
            x[0].s_enum = xret;
        } else {
            KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction xret = this->matchingItem(*(const QModelIndex*)x[1].s_class);
            x[0].s_enum = xret;
        }
    }
    static void x_2(Smoke::Stack x) {
        // KTextEditor::CodeCompletionModelControllerInterface2* CodeCompletionModelControllerInterface2()
        x_KTextEditor__CodeCompletionModelControllerInterface2* xret = new x_KTextEditor__CodeCompletionModelControllerInterface2();
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__CodeCompletionModelControllerInterface2() : CodeCompletionModelControllerInterface2() {}
    static void x_3(Smoke::Stack x) {
        // KTextEditor::CodeCompletionModelControllerInterface2* CodeCompletionModelControllerInterface2(const KTextEditor::CodeCompletionModelControllerInterface2&)
        x_KTextEditor__CodeCompletionModelControllerInterface2* xret = new x_KTextEditor__CodeCompletionModelControllerInterface2(*(const KTextEditor::CodeCompletionModelControllerInterface2*)x[1].s_class);
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__CodeCompletionModelControllerInterface2(const KTextEditor::CodeCompletionModelControllerInterface2& x1) : CodeCompletionModelControllerInterface2(x1) {}
    static void x_4(Smoke::Stack x) {
        x[0].s_enum = (long)KTextEditor::CodeCompletionModelControllerInterface2::None;
    }
    static void x_5(Smoke::Stack x) {
        x[0].s_enum = (long)KTextEditor::CodeCompletionModelControllerInterface2::HideListIfAutomaticInvocation;
    }
    virtual KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction matchingItem(const QModelIndex& x1) {
        Smoke::StackItem x[2];
        x[1].s_class = (void*)&x1;
        if (this->_binding->callMethod(230, (void*)this, x)) return (KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction)x[0].s_enum;
        return this->KTextEditor::CodeCompletionModelControllerInterface2::matchingItem(x1);
    }
    virtual bool shouldStartCompletion(KTextEditor::View* x1, const QString& x2, bool x3, const KTextEditor::Cursor& x4) {
        Smoke::StackItem x[5];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        x[3].s_bool = x3;
        x[4].s_class = (void*)&x4;
        if (this->_binding->callMethod(221, (void*)this, x)) return (bool)x[0].s_bool;
        return this->KTextEditor::CodeCompletionModelControllerInterface::shouldStartCompletion(x1, x2, x3, x4);
    }
    virtual KTextEditor::Range completionRange(KTextEditor::View* x1, const KTextEditor::Cursor& x2) {
        Smoke::StackItem x[3];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        if (this->_binding->callMethod(222, (void*)this, x)) {
            KTextEditor::Range* xptr = (KTextEditor::Range*)x[0].s_class;
            KTextEditor::Range xret(*xptr);
            delete xptr;
            return xret;
        }
        return this->KTextEditor::CodeCompletionModelControllerInterface::completionRange(x1, x2);
    }
    virtual void updateCompletionRange(KTextEditor::View* x1, KTextEditor::SmartRange& x2) {
        Smoke::StackItem x[3];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        if (this->_binding->callMethod(223, (void*)this, x)) return;
        this->KTextEditor::CodeCompletionModelControllerInterface::updateCompletionRange(x1, x2);
    }
    virtual QString filterString(KTextEditor::View* x1, const KTextEditor::SmartRange& x2, const KTextEditor::Cursor& x3) {
        Smoke::StackItem x[4];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        x[3].s_class = (void*)&x3;
        if (this->_binding->callMethod(224, (void*)this, x)) {
            QString* xptr = (QString*)x[0].s_class;
            QString xret(*xptr);
            delete xptr;
            return xret;
        }
        return this->KTextEditor::CodeCompletionModelControllerInterface::filterString(x1, x2, x3);
    }
    virtual bool shouldAbortCompletion(KTextEditor::View* x1, const KTextEditor::SmartRange& x2, const QString& x3) {
        Smoke::StackItem x[4];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        x[3].s_class = (void*)&x3;
        if (this->_binding->callMethod(225, (void*)this, x)) return (bool)x[0].s_bool;
        return this->KTextEditor::CodeCompletionModelControllerInterface::shouldAbortCompletion(x1, x2, x3);
    }
    virtual bool shouldExecute(const QModelIndex& x1, QChar x2) {
        Smoke::StackItem x[3];
        x[1].s_class = (void*)&x1;
        x[2].s_class = (void*)new QChar(x2);
        if (this->_binding->callMethod(226, (void*)this, x)) return (bool)x[0].s_bool;
        return this->KTextEditor::CodeCompletionModelControllerInterface::shouldExecute(x1, x2);
    }
    virtual void aborted(KTextEditor::View* x1) {
        Smoke::StackItem x[2];
        x[1].s_class = (void*)x1;
        if (this->_binding->callMethod(227, (void*)this, x)) return;
        this->KTextEditor::CodeCompletionModelControllerInterface::aborted(x1);
    }
    static void xenum_operation(Smoke::EnumOperation xop, Smoke::Index xtype, void *&xdata, long &xvalue) {
        switch(xtype) {
        case 43: //KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction
            switch(xop) {
                case Smoke::EnumNew:
                    xdata = (void*)new KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction;
                    break;
                case Smoke::EnumDelete:
                    delete (KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction*)xdata;
                    break;
                case Smoke::EnumFromLong:
                    *(KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction*)xdata = (KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction)xvalue;
                    break;
                case Smoke::EnumToLong:
                    xvalue = (long)*(KTextEditor::CodeCompletionModelControllerInterface2::MatchReaction*)xdata;
                    break;
            }
            break;
        }
    }
    ~x_KTextEditor__CodeCompletionModelControllerInterface2() { this->_binding->deleted(29, (void*)this); }
};
void xenum_KTextEditor__CodeCompletionModelControllerInterface2(Smoke::EnumOperation xop, Smoke::Index xtype, void *&xdata, long &xvalue) {
    x_KTextEditor__CodeCompletionModelControllerInterface2::xenum_operation(xop, xtype, xdata, xvalue);
}
void xcall_KTextEditor__CodeCompletionModelControllerInterface2(Smoke::Index xi, void *obj, Smoke::Stack args) {
    x_KTextEditor__CodeCompletionModelControllerInterface2 *xself = (x_KTextEditor__CodeCompletionModelControllerInterface2*)obj;
    switch(xi) {
        case 0: xself->x_0(args);	break;
        case 1: xself->x_1(args);	break;
        case 2: x_KTextEditor__CodeCompletionModelControllerInterface2::x_2(args);	break;
        case 3: x_KTextEditor__CodeCompletionModelControllerInterface2::x_3(args);	break;
        case 4: x_KTextEditor__CodeCompletionModelControllerInterface2::x_4(args);	break;
        case 5: x_KTextEditor__CodeCompletionModelControllerInterface2::x_5(args);	break;
        case 6: delete (KTextEditor::CodeCompletionModelControllerInterface2*)xself;	break;
    }
}
class x_KTextEditor__Command : public KTextEditor::Command, public __internal_SmokeClass {
    SmokeBinding* _binding;
public:
    void x_0(Smoke::Stack x) {
        // set the smoke binding
        _binding = (SmokeBinding*)x[1].s_class;
    }
    void x_1(Smoke::Stack x) {
        // virtual const QStringList& cmds() = 0
        const QStringList& xret = this->cmds();
        x[0].s_class = (void*)&xret;
    }
    void x_2(Smoke::Stack x) {
        // virtual bool exec(KTextEditor::View*, const QString&, QString&) = 0
        bool xret = this->exec((KTextEditor::View*)x[1].s_class,*(const QString*)x[2].s_class,*(QString*)x[3].s_class);
        x[0].s_bool = xret;
    }
    void x_3(Smoke::Stack x) {
        // virtual bool help(KTextEditor::View*, const QString&, QString&) = 0
        bool xret = this->help((KTextEditor::View*)x[1].s_class,*(const QString*)x[2].s_class,*(QString*)x[3].s_class);
        x[0].s_bool = xret;
    }
    static void x_4(Smoke::Stack x) {
        // KTextEditor::Command* Command()
        x_KTextEditor__Command* xret = new x_KTextEditor__Command();
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__Command() : Command() {}
    static void x_5(Smoke::Stack x) {
        // KTextEditor::Command* Command(const KTextEditor::Command&)
        x_KTextEditor__Command* xret = new x_KTextEditor__Command(*(const KTextEditor::Command*)x[1].s_class);
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__Command(const KTextEditor::Command& x1) : Command(x1) {}
    virtual const QStringList& cmds() {
        Smoke::StackItem x[1];
        this->_binding->callMethod(236, (void*)this, x, true /*pure virtual*/);
        const QStringList* xptr = (const QStringList*)x[0].s_class;
        const QStringList& xret(*xptr);
        delete xptr;
        return xret;
    }
    virtual bool exec(KTextEditor::View* x1, const QString& x2, QString& x3) {
        Smoke::StackItem x[4];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        x[3].s_class = (void*)&x3;
        this->_binding->callMethod(237, (void*)this, x, true /*pure virtual*/);
        return (bool)x[0].s_bool;
    }
    virtual bool help(KTextEditor::View* x1, const QString& x2, QString& x3) {
        Smoke::StackItem x[4];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        x[3].s_class = (void*)&x3;
        this->_binding->callMethod(238, (void*)this, x, true /*pure virtual*/);
        return (bool)x[0].s_bool;
    }
    ~x_KTextEditor__Command() { this->_binding->deleted(30, (void*)this); }
};
void xcall_KTextEditor__Command(Smoke::Index xi, void *obj, Smoke::Stack args) {
    x_KTextEditor__Command *xself = (x_KTextEditor__Command*)obj;
    switch(xi) {
        case 0: xself->x_0(args);	break;
        case 1: xself->x_1(args);	break;
        case 2: xself->x_2(args);	break;
        case 3: xself->x_3(args);	break;
        case 4: x_KTextEditor__Command::x_4(args);	break;
        case 5: x_KTextEditor__Command::x_5(args);	break;
        case 6: delete (KTextEditor::Command*)xself;	break;
    }
}
class x_KTextEditor__CommandExtension : public KTextEditor::CommandExtension, public __internal_SmokeClass {
    SmokeBinding* _binding;
public:
    void x_0(Smoke::Stack x) {
        // set the smoke binding
        _binding = (SmokeBinding*)x[1].s_class;
    }
    void x_1(Smoke::Stack x) {
        // virtual void flagCompletions(QStringList&) = 0
        this->flagCompletions(*(QStringList*)x[1].s_class);
        (void)x; // noop (for compiler warning)
    }
    void x_2(Smoke::Stack x) {
        // virtual KCompletion* completionObject(KTextEditor::View*, const QString&) = 0
        KCompletion* xret = this->completionObject((KTextEditor::View*)x[1].s_class,*(const QString*)x[2].s_class);
        x[0].s_class = (void*)xret;
    }
    void x_3(Smoke::Stack x) {
        // virtual bool wantsToProcessText(const QString&) = 0
        bool xret = this->wantsToProcessText(*(const QString*)x[1].s_class);
        x[0].s_bool = xret;
    }
    void x_4(Smoke::Stack x) {
        // virtual void processText(KTextEditor::View*, const QString&) = 0
        this->processText((KTextEditor::View*)x[1].s_class,*(const QString*)x[2].s_class);
        (void)x; // noop (for compiler warning)
    }
    static void x_5(Smoke::Stack x) {
        // KTextEditor::CommandExtension* CommandExtension()
        x_KTextEditor__CommandExtension* xret = new x_KTextEditor__CommandExtension();
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__CommandExtension() : CommandExtension() {}
    static void x_6(Smoke::Stack x) {
        // KTextEditor::CommandExtension* CommandExtension(const KTextEditor::CommandExtension&)
        x_KTextEditor__CommandExtension* xret = new x_KTextEditor__CommandExtension(*(const KTextEditor::CommandExtension*)x[1].s_class);
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__CommandExtension(const KTextEditor::CommandExtension& x1) : CommandExtension(x1) {}
    virtual void flagCompletions(QStringList& x1) {
        Smoke::StackItem x[2];
        x[1].s_class = (void*)&x1;
        this->_binding->callMethod(242, (void*)this, x, true /*pure virtual*/);
    }
    virtual KCompletion* completionObject(KTextEditor::View* x1, const QString& x2) {
        Smoke::StackItem x[3];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        this->_binding->callMethod(243, (void*)this, x, true /*pure virtual*/);
        return (KCompletion*)x[0].s_class;
    }
    virtual bool wantsToProcessText(const QString& x1) {
        Smoke::StackItem x[2];
        x[1].s_class = (void*)&x1;
        this->_binding->callMethod(244, (void*)this, x, true /*pure virtual*/);
        return (bool)x[0].s_bool;
    }
    virtual void processText(KTextEditor::View* x1, const QString& x2) {
        Smoke::StackItem x[3];
        x[1].s_class = (void*)x1;
        x[2].s_class = (void*)&x2;
        this->_binding->callMethod(245, (void*)this, x, true /*pure virtual*/);
    }
    ~x_KTextEditor__CommandExtension() { this->_binding->deleted(31, (void*)this); }
};
void xcall_KTextEditor__CommandExtension(Smoke::Index xi, void *obj, Smoke::Stack args) {
    x_KTextEditor__CommandExtension *xself = (x_KTextEditor__CommandExtension*)obj;
    switch(xi) {
        case 0: xself->x_0(args);	break;
        case 1: xself->x_1(args);	break;
        case 2: xself->x_2(args);	break;
        case 3: xself->x_3(args);	break;
        case 4: xself->x_4(args);	break;
        case 5: x_KTextEditor__CommandExtension::x_5(args);	break;
        case 6: x_KTextEditor__CommandExtension::x_6(args);	break;
        case 7: delete (KTextEditor::CommandExtension*)xself;	break;
    }
}
class x_KTextEditor__CommandInterface : public KTextEditor::CommandInterface, public __internal_SmokeClass {
    SmokeBinding* _binding;
public:
    void x_0(Smoke::Stack x) {
        // set the smoke binding
        _binding = (SmokeBinding*)x[1].s_class;
    }
    void x_1(Smoke::Stack x) {
        // virtual bool registerCommand(KTextEditor::Command*) = 0
        bool xret = this->registerCommand((KTextEditor::Command*)x[1].s_class);
        x[0].s_bool = xret;
    }
    void x_2(Smoke::Stack x) {
        // virtual bool unregisterCommand(KTextEditor::Command*) = 0
        bool xret = this->unregisterCommand((KTextEditor::Command*)x[1].s_class);
        x[0].s_bool = xret;
    }
    void x_3(Smoke::Stack x) {
        // virtual KTextEditor::Command* queryCommand(const QString&) const = 0
        KTextEditor::Command* xret = ((const x_KTextEditor__CommandInterface*)this)->queryCommand(*(const QString*)x[1].s_class);
        x[0].s_class = (void*)xret;
    }
    void x_4(Smoke::Stack x) {
        // virtual QList<KTextEditor::Command*> commands() const = 0
        QList<KTextEditor::Command*> xret = ((const x_KTextEditor__CommandInterface*)this)->commands();
        x[0].s_class = (void*)new QList<KTextEditor::Command*>(xret);
    }
    void x_5(Smoke::Stack x) {
        // virtual QStringList commandList() const = 0
        QStringList xret = ((const x_KTextEditor__CommandInterface*)this)->commandList();
        x[0].s_class = (void*)new QStringList(xret);
    }
    static void x_6(Smoke::Stack x) {
        // KTextEditor::CommandInterface* CommandInterface()
        x_KTextEditor__CommandInterface* xret = new x_KTextEditor__CommandInterface();
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__CommandInterface() : CommandInterface() {}
    static void x_7(Smoke::Stack x) {
        // KTextEditor::CommandInterface* CommandInterface(const KTextEditor::CommandInterface&)
        x_KTextEditor__CommandInterface* xret = new x_KTextEditor__CommandInterface(*(const KTextEditor::CommandInterface*)x[1].s_class);
        x[0].s_class = (void*)xret;
    }
    explicit x_KTextEditor__CommandInterface(const KTextEditor::CommandInterface& x1) : CommandInterface(x1) {}
    virtual bool registerCommand(KTextEditor::Command* x1) {
        Smoke::StackItem x[2];
        x[1].s_class = (void*)x1;
        this->_binding->callMethod(249, (void*)this, x, true /*pure virtual*/);
        return (bool)x[0].s_bool;
    }
    virtual bool unregisterCommand(KTextEditor::Command* x1) {
        Smoke::StackItem x[2];
        x[1].s_class = (void*)x1;
        this->_binding->callMethod(250, (void*)this, x, true /*pure virtual*/);
        return (bool)x[0].s_bool;
    }
    virtual KTextEditor::Command* queryCommand(const QString& x1) const {
        Smoke::StackItem x[2];
        x[1].s_class = (void*)&x1;
        this->_binding->callMethod(251, (void*)this, x, true /*pure virtual*/);
        return (KTextEditor::Command*)x[0].s_class;
    }
    virtual QList<KTextEditor::Command*> commands() const {
        Smoke::StackItem x[1];
        this->_binding->callMethod(252, (void*)this, x, true /*pure virtual*/);
        QList<KTextEditor::Command*>* xptr = (QList<KTextEditor::Command*>*)x[0].s_class;
        QList<KTextEditor::Command*> xret(*xptr);
        delete xptr;
        return xret;
    }
    virtual QStringList commandList() const {
        Smoke::StackItem x[1];
        this->_binding->callMethod(253, (void*)this, x, true /*pure virtual*/);
        QStringList* xptr = (QStringList*)x[0].s_class;
        QStringList xret(*xptr);
        delete xptr;
        return xret;
    }
    ~x_KTextEditor__CommandInterface() { this->_binding->deleted(32, (void*)this); }
};
void xcall_KTextEditor__CommandInterface(Smoke::Index xi, void *obj, Smoke::Stack args) {
    x_KTextEditor__CommandInterface *xself = (x_KTextEditor__CommandInterface*)obj;
    switch(xi) {
        case 0: xself->x_0(args);	break;
        case 1: xself->x_1(args);	break;
        case 2: xself->x_2(args);	break;
        case 3: xself->x_3(args);	break;
        case 4: xself->x_4(args);	break;
        case 5: xself->x_5(args);	break;
        case 6: x_KTextEditor__CommandInterface::x_6(args);	break;
        case 7: x_KTextEditor__CommandInterface::x_7(args);	break;
        case 8: delete (KTextEditor::CommandInterface*)xself;	break;
    }
}

}
