PenetrateBase/PenetrateBasic/main.cpp

54 lines
1011 B
C++
Raw Normal View History

2024-11-11 08:29:59 +00:00
#include <QtCore/QCoreApplication>
#include <qdebug.h>
#include "cmds_basic.h"
#include "dispatch.h"
#include "cmds.h"
2024-11-17 15:36:43 +00:00
#include "validate.h"
2024-11-17 15:03:54 +00:00
#include "validate_impl.h"
2024-11-11 08:29:59 +00:00
int vp(int c) {
qDebug() << c;
return c;
}
2024-11-17 15:36:43 +00:00
verify::T<int(int)>::Validate<vp> vp_check;
2024-11-17 15:06:22 +00:00
auto args0 = vp_check.pos<0>() & new impls::Int32Limit<true, true>(u8"Hello World", 0, 3);
2024-11-17 15:03:54 +00:00
2024-11-17 15:36:43 +00:00
cmds::T<int(int)>::Cmd<vp> entry("hello");
2024-11-17 14:39:24 +00:00
2024-11-11 08:29:59 +00:00
namespace xproc {
int xmp(int arg) {
qDebug() << "xmp";
return 3;
}
}
2024-11-17 14:08:08 +00:00
cmds::T<int(int)>::Cmd<xproc::xmp> xvv("sfaf");
2024-11-17 15:36:43 +00:00
template<> void datas::dataSet<int>(IDataObject& object, const QString& key, int value) { }
template<> int datas::dataGet<int>(IDataObject& object, const QString& key) {
return 0;
}
2024-11-11 08:29:59 +00:00
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);
2024-11-17 15:03:54 +00:00
entry(2);
entry(0);
entry(3);
2024-11-17 14:08:08 +00:00
xvv(2);
2024-11-11 08:29:59 +00:00
return a.exec();
}