GCC Middle and Back End API Reference
diagnostics::digraphs::object Class Reference

#include <digraphs.h>

Inheritance diagram for diagnostics::digraphs::object:

Public Member Functions

const char * get_property (const json::string_property &property) const
void set_property (const json::string_property &property, const char *utf8_value)
bool maybe_get_property (const json::integer_property &property, long &out) const
void set_property (const json::integer_property &property, long value)
tristate get_property_as_tristate (const json::bool_property &property) const
void set_property (const json::bool_property &property, bool value)
json::arrayget_property (const json::array_of_string_property &property) const
template<typename EnumType>
EnumType get_property (const json::enum_property< EnumType > &property) const
template<typename EnumType>
void set_property (const json::enum_property< EnumType > &property, EnumType value)
const json::valueget_property (const json::json_property &property) const
void set_property (const json::json_property &property, std::unique_ptr< json::value > value)
json::objectget_property_bag () const
json::objectensure_property_bag ()
void set_property_bag (std::unique_ptr< json::object > property_bag)

Private Attributes

std::unique_ptr< json::objectm_property_bag

Detailed Description

A base class for digraph, node, and edge to allow them to have an optional JSON property bag.

Member Function Documentation

◆ ensure_property_bag()

json::object & digraph_object::ensure_property_bag ( )

◆ get_property() [1/4]

json::array * digraph_object::get_property ( const json::array_of_string_property & property) const
Array-of-string properties.

References json::array::dyn_cast_array(), and m_property_bag.

◆ get_property() [2/4]

template<typename EnumType>
EnumType diagnostics::digraphs::object::get_property ( const json::enum_property< EnumType > & property) const
inline

◆ get_property() [3/4]

const json::value * digraph_object::get_property ( const json::json_property & property) const
json::value properties.

References m_property_bag.

◆ get_property() [4/4]

◆ get_property_as_tristate()

tristate digraph_object::get_property_as_tristate ( const json::bool_property & property) const

◆ get_property_bag()

json::object * diagnostics::digraphs::object::get_property_bag ( ) const
inline

◆ maybe_get_property()

bool digraph_object::maybe_get_property ( const json::integer_property & property,
long & out_value ) const

◆ set_property() [1/5]

void digraph_object::set_property ( const json::bool_property & property,
bool value )
Bool properties.

References ensure_property_bag().

◆ set_property() [2/5]

template<typename EnumType>
void diagnostics::digraphs::object::set_property ( const json::enum_property< EnumType > & property,
EnumType value )
inline

References ensure_property_bag().

◆ set_property() [3/5]

void digraph_object::set_property ( const json::integer_property & property,
long value )

References ensure_property_bag().

◆ set_property() [4/5]

void digraph_object::set_property ( const json::json_property & property,
std::unique_ptr< json::value > value )

References ensure_property_bag().

◆ set_property() [5/5]

void digraph_object::set_property ( const json::string_property & property,
const char * utf8_value )

◆ set_property_bag()

void diagnostics::digraphs::object::set_property_bag ( std::unique_ptr< json::object > property_bag)
inline

References m_property_bag.

Field Documentation

◆ m_property_bag


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