Lines Matching refs:Sink
5801 ** upb::Sink (upb_sink)
5825 class Sink;
5831 UPB_DECLARE_TYPE(upb::Sink, upb_sink)
5835 /* A upb::Sink is an object that binds a upb::Handlers object to some runtime
5842 * sink->StartString(FOO_FIELD_START_STRING, ...)
5844 * sink->StartString(FOO_FIELD, ...)
5866 * Handlers it will be bound to, so when it calls sink->StartString() what
5871 class upb::Sink {
5874 Sink() {}
5876 /* Constructs a new sink for the given frozen handlers and closure.
5880 template <class T> Sink(const Handlers* handlers, T* closure);
5882 /* Resets the value of the sink. */
5885 /* Returns the top-level object that is bound to this sink.
5891 /* Functions for pushing data into the sink.
5896 * These may not be called from within one of the same sink's handlers (in
5902 * sink->StartSubMessage(startsubmsg_selector);
5903 * sink->StartMessage();
5905 * sink->EndMessage(&status);
5906 * sink->EndSubMessage(endsubmsg_selector); */
5924 * For StartString(), the function will write a sink for the string to "sub."
5925 * The sub-sink must be used for any/all PutStringBuffer() calls. */
5926 bool StartString(Handlers::Selector s, size_t size_hint, Sink* sub);
5933 * For StartSubMessage(), the function will write a sink for the string to
5934 * "sub." The sub-sink must be used for any/all handlers called within the
5936 bool StartSubMessage(Handlers::Selector s, Sink* sub);
5942 * For StartSequence(), the function will write a sink for the string to
5943 * "sub." The sub-sink must be used for any/all handlers called within the
5945 bool StartSequence(Handlers::Selector s, Sink* sub);
5964 /* Constructs a new sink for the given frozen handlers and closure.
5970 /* Resets the value of the sink. */
5993 BufferSource(const char* buf, size_t len, BytesSink* sink);
6002 static bool PutBuffer(const char* buf, size_t len, BytesSink* sink);
6004 template <class T> static bool PutBuffer(const T& str, BytesSink* sink) {
6005 return PutBuffer(str.c_str(), str.size(), sink);
6065 upb_bytessink *sink) {
6071 ret = upb_bytessink_start(sink, len, &subc);
6073 ret = (upb_bytessink_putbuf(sink, subc, buf, len, &handle) >= len);
6076 ret = upb_bytessink_end(sink);
6240 template <class T> Sink::Sink(const Handlers* handlers, T* closure) {
6244 inline void Sink::Reset(const Handlers* handlers, T* closure) {
6247 inline bool Sink::StartMessage() {
6250 inline bool Sink::EndMessage(Status* status) {
6253 inline bool Sink::PutInt32(Handlers::Selector sel, int32_t val) {
6256 inline bool Sink::PutInt64(Handlers::Selector sel, int64_t val) {
6259 inline bool Sink::PutUInt32(Handlers::Selector sel, uint32_t val) {
6262 inline bool Sink::PutUInt64(Handlers::Selector sel, uint64_t val) {
6265 inline bool Sink::PutFloat(Handlers::Selector sel, float val) {
6268 inline bool Sink::PutDouble(Handlers::Selector sel, double val) {
6271 inline bool Sink::PutBool(Handlers::Selector sel, bool val) {
6274 inline bool Sink::StartString(Handlers::Selector sel, size_t size_hint,
6275 Sink *sub) {
6278 inline size_t Sink
6282 inline bool Sink::EndString(Handlers::Selector sel) {
6285 inline bool Sink::StartSubMessage(Handlers::Selector sel, Sink* sub) {
6288 inline bool Sink::EndSubMessage(Handlers::Selector sel) {
6291 inline bool Sink::StartSequence(Handlers::Selector sel, Sink* sub) {
6294 inline bool Sink::EndSequence(Handlers::Selector sel) {
6319 BytesSink *sink) {
6320 return upb_bufsrc_putbuf(buf, len, sink);
6626 Sink* input();
6659 inline Sink* Reader::input() { return upb_descreader_input(this); }
7405 * This method is only capable of outputting to a sink that uses these
7433 /* A Decoder receives binary protobuf data on its input sink and pushes the
7434 * decoded data to its output sink. */
7441 * The sink must match the given method. */
7443 Sink* output);
7448 /* The sink on which this decoder receives input. */
7575 Sink* sink) {
7576 return upb_pbdecoder_create(env, m, sink);
7765 * doesn't need at all; the upb_handlers* inside the sink and
7769 upb_sink sink;
7826 /* Our input sink. */
8171 Sink* input();
8202 inline Sink* Encoder::input() {
8318 Sink* input();
8352 inline Sink* TextPrinter::input() {
8401 * sink. */
8405 Sink* output);
8422 * This method is only capable of outputting to a sink that uses these
8459 Sink* output) {
8520 Sink* input();
8557 inline Sink* Printer::input() { return upb_json_printer_input(this); }