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)=default
 
 JsonObject (const ordered_map< std::string, JsonData * > &v)
 
 DECLARE_TYPEINFO (JsonObject, JsonData)
 
int get_column () const
 
std::string get_filename () const
 
int get_id () const
 
int get_line () const
 
std::string get_sourceFragment () const
 
JsonObject get_sourceJson () const
 
std::string get_type () const
 
bool hasSrcInfo ()
 
JsonObjectoperator= (JsonObject &&) &=default
 
void setSrcInfo (bool value)
 
- Public Member Functions inherited from P4::JsonData
 JsonData (const JsonData &)=default
 
 JsonData (JsonData &&)=default
 
 DECLARE_TYPEINFO (JsonData)
 
JsonDataoperator= (const JsonData &) &=default
 
JsonDataoperator= (JsonData &&) &=default
 
- 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::ordered_map< std::string, JsonData * >
 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)
 
JsonData *& at (const std::string &x)
 
const JsonData *& at (const std::string &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 std::string &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
 
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
 
JsonData *& operator[] (const std::string &x)
 
JsonData *& operator[] (std::string &&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
 

Additional Inherited Members

- Public Types inherited from P4::ordered_map< std::string, JsonData * >
typedef std::allocator< std::pair< const std::string, JsonData * > > 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< std::string > key_compare
 
typedef std::string key_type
 
typedef JsonDatamapped_type
 
typedef value_type & reference
 
typedef std::reverse_iterator< iterator > reverse_iterator
 
typedef map_type::size_type size_type
 
typedef std::pair< const std::string, JsonData * > value_type
 
- Protected Member Functions inherited from P4::RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0