Awali
Another Weighted Automata library
Public Member Functions | Protected Member Functions | Protected Attributes
awali::json::heighter_t Class Reference

#include <smart_printer.hh>

Inheritance diagram for awali::json::heighter_t:
awali::json::visitor_t

Public Member Functions

 heighter_t ()
 
 heighter_t (json_ast_t ast)
 
 heighter_t (node_t const *node)
 
unsigned operator[] (node_t const *node)
 
- Public Member Functions inherited from awali::json::visitor_t
virtual ~visitor_t ()=default
 
unsigned depth ()
 
bool is_stopped ()
 
json::path_t const & path ()
 
virtual void run (json_ast_t tree)
 
virtual void run (node_t const *node)
 
void step_stop ()
 
void stop (visit_t b=visit_t::IGNORE_UNVISITED)
 
visit_t stop_status ()
 

Protected Member Functions

void after_child (node_t const *node, uint_or_string_t const &uos, node_t const *child) override
 Function called just after the specialized version with the same name. More...
 
void enter (node_t const *node) override
 Very first function called when visiting a node. More...
 
- Protected Member Functions inherited from awali::json::visitor_t
 visitor_t ()
 
virtual void after_child (array_t const *, unsigned, node_t const *)
 
virtual void after_child (object_t const *, std::string const &, node_t const *)
 
virtual void before_child (array_t const *, unsigned, node_t const *)
 
virtual void before_child (node_t const *, uint_or_string_t const &, node_t const *)
 Function called just before the specialized version with the same name. More...
 
virtual void before_child (object_t const *, std::string const &, node_t const *)
 Function called just before and just after visiting a child node. More...
 
virtual void between_children (array_t const *)
 Function called between visiting two children, after the function with the same name and argument type node_t. More...
 
virtual void between_children (node_t const *)
 Function called between visiting two children, before the function with the same name and specialized argument type. More...
 
virtual void between_children (object_t const *)
 Function called between visiting two children, after the function with the same name and argument type node_t. More...
 
virtual void enter (array_t const *)
 Function called when starting visiting an array_t, just after the kind-independent (node_t const*). More...
 
virtual void enter (bool_t const *)
 Function called when starting visiting a bool_t, just after the kind-independent (node_t const*), and just before leaf(bool). More...
 
virtual void enter (float_t const *)
 Function called when starting visiting a float_t, just after the kind-independent (node_t const*), and just before leaf(double). More...
 
virtual void enter (int_t const *)
 Function called when starting visiting a bool_t, just after the kind-independent (node_t const*), and just before leaf(int). More...
 
virtual void enter (null_t const *)
 Function called when starting visiting a null_t, just after the kind-independent (node_t const*), and just before leaf(std::nullptr_t). More...
 
virtual void enter (object_t const *)
 Function called when starting visiting an object_t, just after the kind-independent (node_t const*). More...
 
virtual void enter (string_t const *)
 Function called when starting visiting a string_t, just after the kind-independent (node_t const*), and just before leaf(std::string const&). More...
 
virtual void leaf (bool)
 Function called when visiting a bool_t, after (bool_t const*) but before leave(bool_t const*). More...
 
virtual void leaf (double)
 Function called when visiting a float_t, after (float_t const*) but before leave(float_t const*). More...
 
virtual void leaf (int)
 Function called when visiting a int_t, after (int_t const*) but before leave(int_t const*). More...
 
virtual void leaf (std::nullptr_t)
 Function called when visiting a null_t, after (null_t const*) but before leave(null_t const*). More...
 
virtual void leaf (std::string const &)
 Function called when visiting a string_t, after (string_t const*) but before leave(string_t const*). More...
 
virtual void leave (array_t const *)
 
virtual void leave (bool_t const *)
 
virtual void leave (float_t const *)
 
virtual void leave (int_t const *)
 
virtual void leave (node_t const *)
 This function is called for every node type. More...
 
virtual void leave (null_t const *)
 
virtual void leave (object_t const *)
 
virtual void leave (string_t const *)
 
virtual void visit (array_t const *node)
 
virtual void visit (bool_t const *node)
 
virtual void visit (float_t const *node)
 
virtual void visit (int_t const *node)
 
virtual void visit (node_t const *node)
 
virtual void visit (null_t const *node)
 
virtual void visit (object_t const *node)
 
virtual void visit (string_t const *node)
 

Protected Attributes

std::unordered_map< node_t const *, unsigned > map
 

Constructor & Destructor Documentation

◆ heighter_t() [1/3]

awali::json::heighter_t::heighter_t ( json_ast_t  ast)

◆ heighter_t() [2/3]

awali::json::heighter_t::heighter_t ( node_t const *  node)

◆ heighter_t() [3/3]

awali::json::heighter_t::heighter_t ( )

Member Function Documentation

◆ after_child()

void awali::json::heighter_t::after_child ( node_t const *  ,
uint_or_string_t const &  ,
node_t const *   
)
overrideprotectedvirtual

Function called just after the specialized version with the same name.

Reimplemented from awali::json::visitor_t.

◆ enter()

void awali::json::heighter_t::enter ( node_t const *  )
overrideprotectedvirtual

Very first function called when visiting a node.

Called for every node kind.

Reimplemented from awali::json::visitor_t.

◆ operator[]()

unsigned awali::json::heighter_t::operator[] ( node_t const *  node)

Field Documentation

◆ map

std::unordered_map<node_t const*,unsigned> awali::json::heighter_t::map
protected

The documentation for this class was generated from the following file: