From c4019f7916b6e148e3f9a0e3c7dece422d78c342 Mon Sep 17 00:00:00 2001 From: pans <pans@454eff88-639b-444f-9e54-f578c98de674> Date: 星期三, 09 八月 2017 12:35:20 +0800 Subject: [PATCH] update capnp --- VisitFace/RtspNativeCodec/app/libs/capnproto/include/capnp/any.h | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/VisitFace/RtspNativeCodec/app/libs/capnproto/include/capnp/any.h b/VisitFace/RtspNativeCodec/app/libs/capnproto/include/capnp/any.h index 6df9dc8..2ac427d 100644 --- a/VisitFace/RtspNativeCodec/app/libs/capnproto/include/capnp/any.h +++ b/VisitFace/RtspNativeCodec/app/libs/capnproto/include/capnp/any.h @@ -461,6 +461,8 @@ inline Reader(T&& value) : _reader(_::PointerHelpers<FromReader<T>>::getInternalReader(kj::fwd<T>(value))) {} + inline MessageSize totalSize() const { return _reader.totalSize().asPublic(); } + kj::ArrayPtr<const byte> getDataSection() { return _reader.getDataSectionAsBlob(); } @@ -483,6 +485,11 @@ // T must be a struct type. return typename T::Reader(_reader); } + + template <typename T> + ReaderFor<T> as(StructSchema schema) const; + // T must be DynamicStruct. Defined in dynamic.h. + private: _::StructReader _reader; @@ -529,6 +536,11 @@ // T must be a struct type. return typename T::Builder(_builder); } + + template <typename T> + BuilderFor<T> as(StructSchema schema); + // T must be DynamicStruct. Defined in dynamic.h. + private: _::StructBuilder _builder; friend class Orphanage; -- Gitblit v1.8.0