P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::IR::NodeMap< KEY, VALUE, MAP, COMP, ALLOC > Class Template Reference
Inheritance diagram for P4::IR::NodeMap< KEY, VALUE, MAP, COMP, ALLOC >:
[legend]

Public Types

typedef map_t::const_iterator const_iterator
 
typedef map_t::const_reverse_iterator const_reverse_iterator
 
typedef map_t::iterator iterator
 
typedef map_t::reverse_iterator reverse_iterator
 
typedef map_t::value_type value_type
 

Public Member Functions

const VALUE *& at (const KEY *k)
 
const VALUE *const & at (const KEY *k) const
 
iterator begin ()
 
const_iterator begin () const
 
size_t count (cstring name) const
 
 DECLARE_TYPEINFO (NodeMap, Node)
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
bool equiv (const Node &a_) const override
 
size_t erase (const KEY *k)
 
iterator erase (const_iterator f, const_iterator l)
 
iterator erase (const_iterator p)
 
const_iterator find (const KEY *k) const
 
template<class U >
const U * get (const KEY *k) const
 
cstring node_type_name () const override
 
bool operator== (const Node &a) const override
 
bool operator== (const NodeMap &a) const
 
elem_ref operator[] (const KEY *k)
 
const VALUE * operator[] (const KEY *k) const
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
size_t size () const
 
void visit_children (Visitor &v) const override
 
void visit_children (Visitor &v) override
 
- Public Member Functions inherited from P4::IR::Node
 Node (const Node &other)
 
 Node (JSONLoader &json)
 
 Node (Util::SourceInfo si)
 
const Nodeapply (Visitor &&v, const Visitor_Context *ctxt=nullptr) const
 
const Nodeapply (Visitor &v, const Visitor_Context *ctxt=nullptr) const
 
virtual void apply_visitor_loop_revisit (Inspector &v) const
 
virtual void apply_visitor_loop_revisit (Modifier &v) const
 
virtual void apply_visitor_loop_revisit (Transform &v) const
 
virtual void apply_visitor_postorder (Inspector &v) const
 
virtual void apply_visitor_postorder (Modifier &v)
 
virtual const Nodeapply_visitor_postorder (Transform &v)
 
virtual bool apply_visitor_preorder (Inspector &v) const
 
virtual bool apply_visitor_preorder (Modifier &v)
 
virtual const Nodeapply_visitor_preorder (Transform &v)
 
virtual void apply_visitor_revisit (Inspector &v) const
 
virtual void apply_visitor_revisit (Modifier &v, const Node *n) const
 
virtual void apply_visitor_revisit (Transform &v, const Node *n) const
 
virtual Nodeclone () const =0
 
void dbprint (std::ostream &out) const override
 
 DECLARE_TYPEINFO_WITH_TYPEID (Node, NodeKind::Node, INode)
 
virtual void dump_fields (std::ostream &) const
 
const NodegetNode () const final
 
NodegetNode () final
 
Util::SourceInfo getSourceInfo () const override
 
virtual int num_children ()
 
bool operator!= (const Node &n) const
 
Nodeoperator= (const Node &)=default
 
Nodeoperator= (Node &&)=default
 
Util::JsonObjectsourceInfoJsonObj () const
 
void sourceInfoToJSON (JSONGenerator &json) const
 
void toJSON (JSONGenerator &json) const override
 
cstring toString () const override
 
void traceCreation () const
 
- Public Member Functions inherited from P4::IR::INode
template<typename T >
std::enable_if_t<!has_static_type_name_v< T >, const T * > checkedTo () const
 
template<typename T >
std::enable_if_t< has_static_type_name_v< T >, const T * > checkedTo () const
 
 DECLARE_TYPEINFO_WITH_TYPEID (INode, NodeKind::INode)
 
virtual const Annotation * getAnnotation (cstring) const
 
virtual void validate () const
 
- Public Member Functions inherited from P4::Util::IHasSourceInfo
- Public Member Functions inherited from P4::IHasDbPrint
void print () const
 
- 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
 

Static Public Member Functions

static cstring static_type_name ()
 
- Static Public Member Functions inherited from P4::IR::Node
static cstring static_type_name ()
 

Additional Inherited Members

- Public Attributes inherited from P4::IR::Node
int clone_id
 
int id
 
Util::SourceInfo srcInfo
 
- Protected Member Functions inherited from P4::IR::Node
cstring prepareSourceInfoForJSON (Util::SourceInfo &si, unsigned *lineNumber, unsigned *columnNumber) const
 
void traceVisit (const char *visitor) const
 
- Protected Member Functions inherited from P4::RTTI::Base
virtual const void * toImpl (TypeId typeId) const noexcept=0
 
- Static Protected Attributes inherited from P4::IR::Node
static int currentId = 0
 

Member Function Documentation

◆ equiv()

template<class KEY , class VALUE , template< class K, class V, class COMP, class ALLOC > class MAP = std::map, class COMP = std::less<cstring>, class ALLOC = std::allocator<std::pair<const KEY *const, const VALUE *>>>
bool P4::IR::NodeMap< KEY, VALUE, MAP, COMP, ALLOC >::equiv ( const Node & a_) const
inlineoverridevirtual

Reimplemented from P4::IR::Node.

◆ node_type_name()

template<class KEY , class VALUE , template< class K, class V, class COMP, class ALLOC > class MAP = std::map, class COMP = std::less<cstring>, class ALLOC = std::allocator<std::pair<const KEY *const, const VALUE *>>>
cstring P4::IR::NodeMap< KEY, VALUE, MAP, COMP, ALLOC >::node_type_name ( ) const
inlineoverridevirtual

Reimplemented from P4::IR::Node.

◆ operator==()

template<class KEY , class VALUE , template< class K, class V, class COMP, class ALLOC > class MAP = std::map, class COMP = std::less<cstring>, class ALLOC = std::allocator<std::pair<const KEY *const, const VALUE *>>>
bool P4::IR::NodeMap< KEY, VALUE, MAP, COMP, ALLOC >::operator== ( const Node & a) const
inlineoverridevirtual

Reimplemented from P4::IR::Node.

◆ visit_children() [1/2]

template<class KEY , class VALUE , template< class K, class V, class COMP, class ALLOC > class MAP, class COMP , class ALLOC >
void P4::IR::NodeMap< KEY, VALUE, MAP, COMP, ALLOC >::visit_children ( Visitor & v) const
overridevirtual

Reimplemented from P4::IR::Node.

◆ visit_children() [2/2]

template<class KEY , class VALUE , template< class K, class V, class COMP, class ALLOC > class MAP, class COMP , class ALLOC >
void P4::IR::NodeMap< KEY, VALUE, MAP, COMP, ALLOC >::visit_children ( Visitor & v)
overridevirtual

Reimplemented from P4::IR::Node.