Awali
Another Weighted Automata library
Public Types | Public Member Functions | Data Fields
awali::json::object_t Class Referencefinal

#include <node.hh>

Inheritance diagram for awali::json::object_t:
awali::json::node_t

Public Types

typedef linked_map_t< std::string, node_t * >::const_iterator const_iterator
 
typedef linked_map_t< std::string, node_t * >::iterator iterator
 

Public Member Functions

 object_t ()
 
 object_t (std::string key, node_t *child)
 
 ~object_t ()
 
virtual unsigned arity () const override
 
virtual node_t const * at (std::string const &key) const override
 
virtual node_tat (std::string const &key) override
 
iterator begin ()
 
const_iterator begin () const
 
virtual object_tcopy () const override
 
iterator end ()
 
const_iterator end () const
 
void erase (std::string const &key)
 
virtual bool has_child (std::string const &key) const override
 
virtual unsigned height () const override
 
object_tinsert_after (std::string const &ref_key, std::string key, node_t *node)
 
object_tinsert_before (std::string const &ref_key, std::string key, node_t *node)
 
virtual object_t const * object () const override
 Casts this node to object_t. More...
 
virtual object_tobject () override
 Casts this node to object_t. More...
 
object_tpush_back (std::string key, node_t *node)
 
object_tpush_front (std::string key, node_t *node)
 
- Public Member Functions inherited from awali::json::node_t
virtual ~node_t ()
 
virtual array_tarray ()
 Casts this node to array_t. More...
 
virtual array_t const * array () const
 Casts this node to array_t. More...
 
virtual node_tat (unsigned i)
 
virtual node_t const * at (unsigned i) const
 
node_tat_path (path_t const &path, unsigned i=0)
 
node_t const * at_path (path_t const &path, unsigned i=0) const
 
virtual bool_tboolean ()
 Casts this node to bool_t. More...
 
virtual bool_t const * boolean () const
 Casts this node to bool_t. More...
 
virtual float_tfloating ()
 Casts this not to float_t. More...
 
virtual float_t const * floating () const
 Casts this not to float_t. More...
 
virtual bool has_child (unsigned) const
 
bool has_path (json::path_t const &path) const
 
virtual int_tinteger ()
 Casts this node to int_t. More...
 
virtual int_t const * integer () const
 Casts this node to int_t. More...
 
bool is (node_kind_t k) const
 
bool is (std::vector< node_kind_t >const &v) const
 
bool is_leaf () const
 
virtual null_tnull ()
 Casts this node to null_t. More...
 
virtual null_t const * null () const
 Casts this node to null_t. More...
 
path_t path_to_root () const
 
virtual string_tstring ()
 Casts this node to string_t. More...
 
virtual string_t const * string () const
 Casts this node to string_t. More...
 
virtual bool to_bool () const
 Coerces this node_t to bool. More...
 
virtual double to_double () const
 Coerces this node_t to a double More...
 
virtual int to_int () const
 Coerces this node_t to int. More...
 
virtual std::string to_string () const
 Coerces this node_t to an std::string. More...
 

Data Fields

linked_map_t< std::string, node_t * > const & fields
 
- Data Fields inherited from awali::json::node_t
node_kind_t const kind
 
node_t const * parent
 

Additional Inherited Members

- Protected Member Functions inherited from awali::json::node_t
 node_t (node_kind_t k)
 

Member Typedef Documentation

◆ const_iterator

◆ iterator

Constructor & Destructor Documentation

◆ object_t() [1/2]

awali::json::object_t::object_t ( )

◆ object_t() [2/2]

awali::json::object_t::object_t ( std::string  key,
node_t child 
)

◆ ~object_t()

awali::json::object_t::~object_t ( )

Member Function Documentation

◆ arity()

virtual unsigned awali::json::object_t::arity ( ) const
overridevirtual

Reimplemented from awali::json::node_t.

◆ at() [1/2]

virtual node_t const* awali::json::object_t::at ( std::string const &  key) const
overridevirtual

Reimplemented from awali::json::node_t.

◆ at() [2/2]

virtual node_t* awali::json::object_t::at ( std::string const &  key)
overridevirtual

Reimplemented from awali::json::node_t.

◆ begin() [1/2]

iterator awali::json::object_t::begin ( )

◆ begin() [2/2]

const_iterator awali::json::object_t::begin ( ) const

◆ copy()

virtual object_t* awali::json::object_t::copy ( ) const
overridevirtual

Implements awali::json::node_t.

◆ end() [1/2]

iterator awali::json::object_t::end ( )

◆ end() [2/2]

const_iterator awali::json::object_t::end ( ) const

◆ erase()

void awali::json::object_t::erase ( std::string const &  key)

◆ has_child()

virtual bool awali::json::object_t::has_child ( std::string const &  key) const
overridevirtual

Reimplemented from awali::json::node_t.

◆ height()

virtual unsigned awali::json::object_t::height ( ) const
overridevirtual

Reimplemented from awali::json::node_t.

◆ insert_after()

object_t* awali::json::object_t::insert_after ( std::string const &  ref_key,
std::string  key,
node_t node 
)

◆ insert_before()

object_t* awali::json::object_t::insert_before ( std::string const &  ref_key,
std::string  key,
node_t node 
)

◆ object() [1/2]

virtual object_t const* awali::json::object_t::object ( ) const
overridevirtual

Casts this node to object_t.

Reimplemented from awali::json::node_t.

◆ object() [2/2]

virtual object_t* awali::json::object_t::object ( )
overridevirtual

Casts this node to object_t.

Reimplemented from awali::json::node_t.

◆ push_back()

object_t* awali::json::object_t::push_back ( std::string  key,
node_t node 
)

◆ push_front()

object_t* awali::json::object_t::push_front ( std::string  key,
node_t node 
)

Field Documentation

◆ fields

linked_map_t<std::string,node_t*> const& awali::json::object_t::fields

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