P4C
The P4 Compiler
Util::JsonObject Class Referencefinal
Inheritance diagram for Util::JsonObject:
[legend]

Public Member Functions

 DECLARE_TYPEINFO (JsonObject, IJson)
 
JsonObjectemplace (cstring label, big_int v)
 
JsonObjectemplace (cstring label, const char *s)
 
JsonObjectemplace (cstring label, cstring s)
 
JsonObjectemplace (cstring label, float v)
 
JsonObjectemplace (cstring label, IJson *value)
 
JsonObjectemplace (cstring label, std::string s)
 
template<typename T , typename std::enable_if< std::is_integral< T >::value, int >::type = 0>
JsonObjectemplace (cstring label, T v)
 
JsonObjectemplace_non_null (cstring label, IJson *value)
 
IJsonget (cstring label) const
 
void serialize (std::ostream &out) const override
 
- Public Member Functions inherited from Util::IJson
 DECLARE_TYPEINFO (IJson)
 
void dump () const
 
cstring toString () const
 
- Public Member Functions inherited from 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 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 ordered_map< cstring, IJson * >
 ordered_map (const ordered_map &a)
 
 ordered_map (InputIt first, InputIt last)
 
 ordered_map (ordered_map &&a)=default
 
 ordered_map (std::initializer_list< value_type > il)
 
IJson * & at (const cstring &x)
 
const IJson * & at (const cstring &x) const
 
const_iterator begin () const noexcept
 
iterator begin () noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
void clear ()
 
size_type count (const key_type &a) const
 
const_reverse_iterator crbegin () const noexcept
 
const_reverse_iterator crend () const noexcept
 
std::pair< iterator, bool > emplace (KK &&k, VV &&...v)
 
std::pair< iterator, bool > emplace_hint (iterator pos, KK &&k, VV &&...v)
 
bool empty () const noexcept
 
const_iterator end () const noexcept
 
iterator end () noexcept
 
size_type erase (const cstring &k)
 
iterator erase (const_iterator pos)
 
iterator find (const key_type &a)
 
const_iterator find (const key_type &a) const
 
std::pair< iterator, bool > insert (const value_type &v)
 
void insert (InputIterator b, InputIterator e)
 
std::pair< iterator, bool > insert (iterator pos, const value_type &v)
 
void insert (iterator pos, InputIterator b, InputIterator e)
 
iterator lower_bound (const key_type &a)
 
const_iterator lower_bound (const key_type &a) const
 
size_type max_size () const noexcept
 
bool operator!= (const ordered_map &a) const
 
ordered_mapoperator= (const ordered_map &a)
 
ordered_mapoperator= (ordered_map &&a)=default
 
bool operator== (const ordered_map &a) const
 
IJson * & operator[] (const cstring &x)
 
IJson * & operator[] (cstring &&x)
 
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 sort (Compare comp)
 
iterator upper_bound (const key_type &a)
 
const_iterator upper_bound (const key_type &a) const
 
iterator upper_bound_pred (const key_type &a)
 
const_iterator upper_bound_pred (const key_type &a) const
 

Friends

class Test::TestJson
 

Additional Inherited Members

- Public Types inherited from ordered_map< cstring, IJson * >
typedef std::allocator< std::pair< const cstring, IJson * >> allocator_type
 
typedef list_type::const_iterator const_iterator
 
typedef const value_type & const_reference
 
typedef std::reverse_iterator< const_iterator > const_reverse_iterator
 
typedef list_type::iterator iterator
 
typedef std::less< cstringkey_compare
 
typedef cstring key_type
 
typedef IJson * mapped_type
 
typedef value_type & reference
 
typedef std::reverse_iterator< iterator > reverse_iterator
 
typedef map_type::size_type size_type
 
typedef std::pair< const cstring, IJson * > value_type
 
- Protected Member Functions inherited from RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0