P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::JsonObject Class Reference
Inheritance diagram for P4::JsonObject:
[legend]

Public Member Functions

 JsonObject (const JsonObject &obj)=delete
 
 JsonObject (string_map< std::unique_ptr< JsonData > > &&v)
 
 DECLARE_TYPEINFO (JsonObject, JsonData)
 
JsonObjectoperator= (JsonObject &&)=default
 
- Public Member Functions inherited from P4::JsonData
 DECLARE_TYPEINFO (JsonData)
 
- Public Member Functions inherited from P4::ICastable
template<typename T>
T & as ()
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T>
const T & as () const
 Tries to convert the class to type T. A BUG occurs if the cast fails.
 
template<typename T>
T * checkedTo ()
 Performs a checked cast. A BUG occurs if the cast fails.
 
template<typename T>
const T * checkedTo () const
 Performs a checked cast. A BUG occurs if the cast fails.
 
- Public Member Functions inherited from P4::RTTI::Base
template<typename T>
bool is () const noexcept
 
virtual bool isA (TypeId typeId) const noexcept=0
 
template<typename T>
const T * to () const noexcept
 Same as to, but returns const pointer to T.
 
template<typename T>
T * to () noexcept
 
virtual TypeId typeId () const noexcept=0
 
- Public Member Functions inherited from P4::string_map< std::unique_ptr< JsonData > >
 string_map (const string_map &a)
 
 string_map (InputIt first, InputIt last)
 
 string_map (std::initializer_list< value_type > il)
 
 string_map (string_map &&a)=default
 
std::unique_ptr< JsonData > & at (Key &&k)
 
const std::unique_ptr< JsonData > & at (Key &&k) const
 
const_iterator begin () const noexcept
 
iterator begin () noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
void clear ()
 
bool contains (cstring a) const
 
bool contains (std::string_view a) const
 
size_type count (cstring a) const
 
size_type count (std::string_view a) const
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
std::pair< iterator, bool > emplace (Key &&k, VV &&...v)
 
bool empty () const noexcept
 
const_iterator end () const noexcept
 
iterator end () noexcept
 
iterator erase (const_iterator pos)
 
size_type erase (cstring k)
 
size_type erase (std::string_view k)
 
iterator find (cstring a)
 
const_iterator find (cstring a) const
 
iterator find (std::string_view a)
 
const_iterator find (std::string_view a) const
 
std::pair< iterator, bool > insert (const value_type &value)
 
void insert (InputIterator b, InputIterator e)
 
std::pair< iterator, bool > insert (value_type &&value)
 
size_type max_size () const noexcept
 
bool operator!= (const string_map &a) const
 
string_mapoperator= (const string_map &a)
 
string_mapoperator= (string_map &&a)=default
 
bool operator== (const string_map &a) const
 
std::unique_ptr< JsonData > & operator[] (Key &&k)
 
const_reverse_iterator rbegin () const noexcept
 
reverse_iterator rbegin () noexcept
 
const_reverse_iterator rend () const noexcept
 
reverse_iterator rend () noexcept
 
size_type size () const noexcept
 
void swap (string_map &other)
 

Additional Inherited Members

- Public Types inherited from P4::string_map< std::unique_ptr< JsonData > >
using const_iterator
 
using const_reference
 
using const_reverse_iterator
 
using iterator
 
using key_type
 
using mapped_type
 
using reference
 
using reverse_iterator
 
using size_type
 
using value_type
 
- Protected Member Functions inherited from P4::JsonData
 JsonData (const JsonData &)=default
 
 JsonData (JsonData &&)=default
 
JsonDataoperator= (const JsonData &)=default
 
JsonDataoperator= (JsonData &&)=default
 
- Protected Member Functions inherited from P4::RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0