summaryrefslogtreecommitdiff
path: root/c++/codec/schema.h
diff options
context:
space:
mode:
Diffstat (limited to 'c++/codec/schema.h')
-rw-r--r--c++/codec/schema.h15
1 files changed, 12 insertions, 3 deletions
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
@@ -81,9 +81,18 @@ using Float32 = Primitive<FloatingPoint, 4>;
using Float64 = Primitive<FloatingPoint, 8>;
/**
+ * Classes allowing to distinguish Ints from VarInts
+ */
+template<typename T, std::size_t MaxLen>
+struct VariableLengthPrimitive {};
+
+using VarInt = VariableLengthPrimitive<SignedInteger, 5>;
+using VarLong = VariableLengthPrimitive<SignedInteger, 10>;
+
+/**
* Classes enabling Rpc calls
*/
-template <class Request, class Response, string_literal Literal>
+template <class Request, class Response>
struct Function {};
template <class... T> struct Interface {
@@ -92,8 +101,8 @@ template <class... T> struct Interface {
"This schema template doesn't support this type of template argument");
};
-template <class... Request, class... Response, string_literal... Literal>
-struct Interface<Function<Request, Response, Literal>...> {};
+template <class... Requests, class... Responses, string_literal... Names>
+struct Interface<Member<Function<Requests, Responses>,Names>...> {};
// NOLINTEND
} // namespace schema