update
This commit is contained in:
parent
93247b6231
commit
1dcd862a60
|
@ -103,8 +103,8 @@
|
||||||
<ClInclude Include="dispatch.h" />
|
<ClInclude Include="dispatch.h" />
|
||||||
<ClInclude Include="msgs_types.h" />
|
<ClInclude Include="msgs_types.h" />
|
||||||
<ClInclude Include="validate_impl.h" />
|
<ClInclude Include="validate_impl.h" />
|
||||||
<ClInclude Include="validation.h" />
|
<ClInclude Include="validate.h" />
|
||||||
<ClInclude Include="validation_basic.h" />
|
<ClInclude Include="validate_basic.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
|
||||||
|
|
|
@ -49,13 +49,13 @@
|
||||||
<ClInclude Include="msgs_types.h">
|
<ClInclude Include="msgs_types.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="validation.h">
|
<ClInclude Include="validate.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="validate_impl.h">
|
<ClInclude Include="validate_impl.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="validation_basic.h">
|
<ClInclude Include="validate_basic.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QHash>
|
#include <QHash>
|
||||||
#include "cmds_basic.h"
|
#include "cmds_basic.h"
|
||||||
#include "validation_basic.h"
|
#include "validate_basic.h"
|
||||||
|
|
||||||
namespace dispatch {
|
namespace dispatch {
|
||||||
class IOutput {
|
class IOutput {
|
||||||
|
|
|
@ -4,16 +4,18 @@
|
||||||
#include "cmds_basic.h"
|
#include "cmds_basic.h"
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
#include "cmds.h"
|
#include "cmds.h"
|
||||||
#include "validation.h"
|
#include "validate.h"
|
||||||
#include "validate_impl.h"
|
#include "validate_impl.h"
|
||||||
|
|
||||||
int vp(int c) {
|
int vp(int c) {
|
||||||
qDebug() << c;
|
qDebug() << c;
|
||||||
return c;
|
return c;
|
||||||
}
|
}
|
||||||
verify::T<int(int)>::Validation<vp> vp_check;
|
verify::T<int(int)>::Validate<vp> vp_check;
|
||||||
auto args0 = vp_check.pos<0>() & new impls::Int32Limit<true, true>(u8"Hello World", 0, 3);
|
auto args0 = vp_check.pos<0>() & new impls::Int32Limit<true, true>(u8"Hello World", 0, 3);
|
||||||
|
|
||||||
|
cmds::T<int(int)>::Cmd<vp> entry("hello");
|
||||||
|
|
||||||
|
|
||||||
namespace xproc {
|
namespace xproc {
|
||||||
int xmp(int arg) {
|
int xmp(int arg) {
|
||||||
|
@ -21,9 +23,13 @@ namespace xproc {
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cmds::T<int(int)>::Cmd<vp> entry("hello");
|
|
||||||
cmds::T<int(int)>::Cmd<xproc::xmp> xvv("sfaf");
|
cmds::T<int(int)>::Cmd<xproc::xmp> xvv("sfaf");
|
||||||
|
|
||||||
|
template<> void datas::dataSet<int>(IDataObject& object, const QString& key, int value) { }
|
||||||
|
template<> int datas::dataGet<int>(IDataObject& object, const QString& key) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
using namespace Inlet;
|
using namespace Inlet;
|
||||||
int main(int argc, char* argv[]) {
|
int main(int argc, char* argv[]) {
|
||||||
|
@ -45,8 +51,3 @@ int main(int argc, char* argv[]) {
|
||||||
|
|
||||||
return a.exec();
|
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;
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "validation_basic.h"
|
#include "validate_basic.h"
|
||||||
#include "dispatch.h"
|
#include "dispatch.h"
|
||||||
|
|
||||||
namespace verify {
|
namespace verify {
|
||||||
|
@ -9,12 +9,12 @@ namespace verify {
|
||||||
template<typename Ret, typename... Args>
|
template<typename Ret, typename... Args>
|
||||||
struct T<Ret(Args...)> {
|
struct T<Ret(Args...)> {
|
||||||
template<Inlet::Callable<Ret, Args...> func>
|
template<Inlet::Callable<Ret, Args...> func>
|
||||||
struct Validation {
|
struct Validate {
|
||||||
private:
|
private:
|
||||||
validate::ValidateImpls<(void*)func, Ret, Args...> _helper;
|
validate::ValidateImpls<(void*)func, Ret, Args...> _helper;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Validation() {
|
Validate() {
|
||||||
auto core = dispatch::Dispatch::unique();
|
auto core = dispatch::Dispatch::unique();
|
||||||
core->setCmdValidator(_helper.address(), & _helper);
|
core->setCmdValidator(_helper.address(), & _helper);
|
||||||
}
|
}
|
|
@ -1,6 +1,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "validation_basic.h"
|
#include "validate_basic.h"
|
||||||
|
|
||||||
namespace impls {
|
namespace impls {
|
||||||
template<bool min_equal, bool max_equal, uint precision>
|
template<bool min_equal, bool max_equal, uint precision>
|
||||||
|
|
Loading…
Reference in New Issue