Home | History | Annotate | Download | only in protobuf

Lines Matching defs:Environment

5105 ** upb::Environment (upb_env)
5107 ** A upb::Environment provides a means for injecting malloc and an
5109 ** independent of nearly all assumptions about their actual environment.
5124 class Environment;
5129 UPB_DECLARE_TYPE(upb::Environment, upb_env)
5138 /* An environment is *not* thread-safe. */
5139 class upb::Environment {
5141 Environment();
5142 ~Environment();
5144 /* Set a custom memory allocation function for the environment. May ONLY
5150 * must ensure that the memory is valid for the lifetime of the Environment,
5154 * outlive the Environment. Another possibility is that the allocation
5156 * life of the Environment. */
5178 /* Reports an error to this environment's callback, returning true if
5182 /* Allocate memory. Uses the environment's allocation function.
5185 * guaranteed to outlive the Environment. */
5194 /* Add a cleanup function to run when the environment is destroyed.
5207 UPB_DISALLOW_COPY_AND_ASSIGN(Environment)
5311 inline Environment::Environment() {
5314 inline Environment::~Environment() {
5317 inline void Environment::SetAllocationFunction(upb_alloc_func *alloc,
5321 inline void Environment::SetErrorFunction(upb_error_func *func, void *ud) {
5324 inline void Environment::ReportErrorsTo(Status* status) {
5327 inline bool Environment::ok() const {
5330 inline bool Environment::ReportError(const Status* status) {
5333 inline void *Environment::Malloc(size_t size) {
5336 inline void *Environment::Realloc(void *ptr, size_t oldsize, size_t size) {
5339 inline bool Environment::AddCleanup(upb_cleanup_func *func, void *ud) {
5342 inline size_t Environment::BytesAllocated() const {
6179 static Reader* Create(Environment* env, const Handlers* handlers);
6216 inline Reader* Reader::Create(Environment* e, const Handlers *h) {
7139 static Decoder* Create(Environment* env, const DecoderMethod* method,
7271 inline Decoder* Decoder::Create(Environment* env, const DecoderMethod* m,
7865 /* Creates a new encoder in the given environment. The Handlers must have
7867 static Encoder* Create(Environment* env, const Handlers* handlers,
7898 inline Encoder* Encoder::Create(Environment* env, const Handlers* handlers,
8018 static TextPrinter *Create(Environment *env, const upb::Handlers *handlers,
8049 inline TextPrinter *TextPrinter::Create(Environment *env,
8106 static Parser* Create(Environment* env, Sink* output);
8127 inline Parser* Parser::Create(Environment* env, Sink* output) {
8170 static Printer* Create(Environment* env, const upb::Handlers* handlers,
8202 inline Printer* Printer::Create(Environment* env, const upb::Handlers* handlers,