53 lines
1014 B
C++
53 lines
1014 B
C++
#include <QtCore/QCoreApplication>
|
|
#include <qdebug.h>
|
|
|
|
#include "cmds_basic.h"
|
|
#include "dispatch.h"
|
|
#include "cmds.h"
|
|
#include "validation.h"
|
|
#include "validate_impl.h"
|
|
|
|
int vp(int c) {
|
|
qDebug() << c;
|
|
return c;
|
|
}
|
|
verify::T<int(int)>::Validation<vp> vp_check;
|
|
auto args0 = vp_check.pos<0>() & new impls::Int32Limit<true, true>(u8"Hello World", 0, 3);
|
|
|
|
|
|
namespace xproc {
|
|
int xmp(int arg) {
|
|
qDebug() << "xmp";
|
|
return 3;
|
|
}
|
|
}
|
|
cmds::T<int(int)>::Cmd<vp> entry("hello");
|
|
cmds::T<int(int)>::Cmd<xproc::xmp> xvv("sfaf");
|
|
|
|
|
|
using namespace Inlet;
|
|
int main(int argc, char* argv[]) {
|
|
QCoreApplication a(argc, argv);
|
|
|
|
SignatureImpl<int, int> v(3);
|
|
v.execute(vp);
|
|
|
|
Callable<int, int> vptr = vp;
|
|
|
|
CmdsImpl<(void*) vp, int, int> exec;
|
|
exec.execute(5);
|
|
|
|
entry(50);
|
|
entry(2);
|
|
entry(0);
|
|
entry(3);
|
|
xvv(2);
|
|
|
|
return a.exec();
|
|
}
|
|
|
|
template<> void datas::dataSet<int>(IDataObject& object, const QString& key, int value) { }
|
|
template<> int datas::dataGet<int>(IDataObject& object, const QString& key) {
|
|
return 0;
|
|
}
|