From e933ccb59c7f032d2ffc5c5f7046317a06e85e14 Mon Sep 17 00:00:00 2001 From: "Claudius \"keldu\" Holeksa" Date: Tue, 17 Oct 2023 02:30:52 +0200 Subject: codec,codec-minecraft: Adding basic foundations needed for the minecraft protocol --- c++/codec/schema.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'c++/codec/schema.h') diff --git a/c++/codec/schema.h b/c++/codec/schema.h index ba6dd4c..a8494fe 100644 --- a/c++/codec/schema.h +++ b/c++/codec/schema.h @@ -80,10 +80,19 @@ using UInt64 = Primitive; using Float32 = Primitive; using Float64 = Primitive; +/** + * Classes allowing to distinguish Ints from VarInts + */ +template +struct VariableLengthPrimitive {}; + +using VarInt = VariableLengthPrimitive; +using VarLong = VariableLengthPrimitive; + /** * Classes enabling Rpc calls */ -template +template struct Function {}; template struct Interface { @@ -92,8 +101,8 @@ template struct Interface { "This schema template doesn't support this type of template argument"); }; -template -struct Interface...> {}; +template +struct Interface,Names>...> {}; // NOLINTEND } // namespace schema -- cgit v1.2.3