P4C
The P4 Compiler
All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
json Namespace Reference

Classes

struct  bson_wrap
 
class  False
 
class  map
 
class  number
 
class  obj
 
class  string
 
class  True
 
class  vector
 

Typedefs

typedef ordered_map< obj *, std::unique_ptr< obj >, obj::ptrlessmap_base
 
typedef std::vector< std::unique_ptr< obj > > vector_base
 

Functions

template<class T>
bson_wrap< T > binary (T &o)
 
std::string bson_encode (const json::map &m)
 
std::string bson_encode (const json::vector &v)
 
std::string bson_encode_element (const std::string &key, const json::obj *o)
 
template<class T, class... Args>
std::unique_ptr< T > mkuniq (Args &&...args)
 
std::ostream & operator<< (std::ostream &out, bson_wrap< const map > m)
 
std::ostream & operator<< (std::ostream &out, bson_wrap< const obj * > json)
 
std::ostream & operator<< (std::ostream &out, bson_wrap< const obj > json)
 
std::ostream & operator<< (std::ostream &out, bson_wrap< const std::unique_ptr< obj > > json)
 
std::ostream & operator<< (std::ostream &out, bson_wrap< const vector > v)
 
std::ostream & operator<< (std::ostream &out, bson_wrap< obj * > json)
 
std::ostream & operator<< (std::ostream &out, const map::element_ref &el)
 
std::ostream & operator<< (std::ostream &out, const obj *json)
 
std::ostream & operator<< (std::ostream &out, const std::unique_ptr< obj > &json)
 
std::istream & operator>> (std::istream &in, bson_wrap< json::map > o)
 
std::istream & operator>> (std::istream &in, bson_wrap< json::vector > o)
 
std::istream & operator>> (std::istream &in, bson_wrap< obj * > json)
 
std::istream & operator>> (std::istream &in, bson_wrap< std::unique_ptr< obj > > json)
 
std::istream & operator>> (std::istream &in, obj *&json)
 
std::istream & operator>> (std::istream &in, std::unique_ptr< obj > &json)
 

Detailed Description

Copyright (C) 2024 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0