Compare commits
2 Commits
b4fa5cca4a
...
29a71d1a4b
Author | SHA1 | Date |
---|---|---|
Claudius Holeksa | 29a71d1a4b | |
Claudius Holeksa | 9704302b19 |
|
@ -1,5 +1,5 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, stdenvNoCC
|
||||
, zlib
|
||||
, fetchFromGitHub
|
||||
, scons
|
||||
|
@ -9,14 +9,14 @@
|
|||
, gnutls
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "forstio";
|
||||
version = "0.0.0";
|
||||
|
||||
nativeBuildInputs = [
|
||||
scons
|
||||
clang_12
|
||||
clang-tools
|
||||
clang_15
|
||||
clang-tools_15
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
#include "json.h"
|
||||
|
||||
|
||||
|
||||
namespace saw {
|
||||
|
||||
class json_codec::impl {
|
||||
public:
|
||||
|
||||
};
|
||||
|
||||
json_codec::json_codec():
|
||||
impl_{heap<json_codec::impl>()}
|
||||
{}
|
||||
|
||||
json_codec::~json_codec(){}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
|
||||
namespace saw {
|
||||
class json_codec {
|
||||
public:
|
||||
struct limits {
|
||||
size_t depth = 8;
|
||||
size_t length = 2048;
|
||||
};
|
||||
|
||||
json_codec();
|
||||
~json_codec();
|
||||
|
||||
template<class Schema, class Container>
|
||||
error encode(typename message<Schema, Container>::reader reader, buffer& buffer);
|
||||
|
||||
template<class Schema, class Container>
|
||||
error decode(typename message<Schema, Container>::builder builder, buffer& buffer, const limits& lim = limits{});
|
||||
private:
|
||||
class impl;
|
||||
own<impl> impl_;
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue