-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdynamic-value-converter.h
More file actions
22 lines (16 loc) · 906 Bytes
/
dynamic-value-converter.h
File metadata and controls
22 lines (16 loc) · 906 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#ifndef CAPNP_PHP_DYNAMIC_VALUE_CONVERTER_H
#define CAPNP_PHP_DYNAMIC_VALUE_CONVERTER_H
#include <phpcpp.h>
#include <capnp/dynamic.h>
namespace capnp_php {
class DynamicValueConverter {
public:
static capnp::DynamicValue::Reader convertFromPhp(const Php::Value & value);
static void convertToCapnp(capnp::DynamicList::Builder& builder, capnp::uint field, const Php::Value& value);
static void convertToCapnp(capnp::DynamicStruct::Builder& builder, capnp::StructSchema::Field field, const Php::Value& value);
static Php::Value convertFromCapnp(capnp::DynamicValue::Reader value, Php::Value parent);
static Php::Value convertFromCapnp(capnp::DynamicValue::Builder value, Php::Value parent);
static Php::Value convertTextToPhpString(capnp::Text::Reader text);
};
}
#endif /* CAPNP_PHP_DYNAMIC_VALUE_CONVERTER_H */