Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
boost::property_tree::basic_ptree< Key, Data, KeyCompare > Class Template Reference

#include <ptree.hpp>

Classes

class  assoc_iterator
 
class  const_assoc_iterator
 
class  const_iterator
 
class  const_reverse_iterator
 
class  iterator
 
class  reverse_iterator
 
struct  subs
 

Public Types

typedef Data data_type
 
typedef KeyCompare key_compare
 
typedef Key key_type
 
typedef path_of< Key >::type path_type
 
typedef std::size_t size_type
 
typedef std::pair< const Key, self_typevalue_type
 

Public Member Functions

template<class Type >
self_typeadd (const path_type &path, const Type &value)
 
template<class Type >
basic_ptree< K, D, C > & add (const path_type &path, const Type &value)
 
template<class Type , class Translator >
self_typeadd (const path_type &path, const Type &value, Translator tr)
 
template<class Type , typename Translator >
basic_ptree< K, D, C > & add (const path_type &path, const Type &value, Translator tr)
 
self_typeadd_child (const path_type &path, const self_type &value)
 
value_typeback ()
 
const value_typeback () const
 
 basic_ptree ()
 
 basic_ptree (const data_type &data)
 
 basic_ptree (const self_type &rhs)
 
iterator begin ()
 
const_iterator begin () const
 
void clear ()
 
size_type count (const key_type &key) const
 
data_typedata ()
 
const data_typedata () const
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
std::pair< assoc_iterator, assoc_iteratorequal_range (const key_type &key)
 
std::pair< const_assoc_iterator, const_assoc_iteratorequal_range (const key_type &key) const
 
size_type erase (const key_type &key)
 
iterator erase (iterator first, iterator last)
 
iterator erase (iterator where)
 
assoc_iterator find (const key_type &key)
 
const_assoc_iterator find (const key_type &key) const
 
value_typefront ()
 
const value_typefront () const
 
template<class Type >
Type get (const path_type &path) const
 
template<class Ch >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type get (const path_type &path, const Ch *default_value) const
 
template<class Ch , class Translator >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type get (const path_type &path, const Ch *default_value, Translator tr) const
 
template<class Type >
boost::disable_if< detail::is_translator< Type >, Type >::type get (const path_type &path, const Type &default_value) const
 
template<class Type , class Translator >
Type get (const path_type &path, const Type &default_value, Translator tr) const
 
template<class Type , class Translator >
boost::enable_if< detail::is_translator< Translator >, Type >::type get (const path_type &path, Translator tr) const
 
self_typeget_child (const path_type &path)
 
const self_typeget_child (const path_type &path) const
 
const self_typeget_child (const path_type &path, const self_type &default_value) const
 
self_typeget_child (const path_type &path, self_type &default_value)
 
optional< self_type & > get_child_optional (const path_type &path)
 
optional< const self_type & > get_child_optional (const path_type &path) const
 
template<class Type >
optional< Type > get_optional (const path_type &path) const
 
template<class Type , class Translator >
optional< Type > get_optional (const path_type &path, Translator tr) const
 
template<class Type >
Type get_value () const
 
template<class Ch >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type get_value (const Ch *default_value) const
 
template<class Ch , class Translator >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type get_value (const Ch *default_value, Translator tr) const
 
template<class Type >
boost::disable_if< detail::is_translator< Type >, Type >::type get_value (const Type &default_value) const
 
template<class Type , class Translator >
Type get_value (const Type &default_value, Translator tr) const
 
template<class Type , class Translator >
boost::enable_if< detail::is_translator< Translator >, Type >::type get_value (Translator tr) const
 
template<class Type >
optional< Type > get_value_optional () const
 
template<class Type , class Translator >
optional< Type > get_value_optional (Translator tr) const
 
iterator insert (iterator where, const value_type &value)
 
template<class It >
void insert (iterator where, It first, It last)
 
size_type max_size () const
 
assoc_iterator not_found ()
 
const_assoc_iterator not_found () const
 
bool operator!= (const self_type &rhs) const
 
self_typeoperator= (const self_type &rhs)
 
bool operator== (const self_type &rhs) const
 
assoc_iterator ordered_begin ()
 
const_assoc_iterator ordered_begin () const
 
void pop_back ()
 
void pop_front ()
 
iterator push_back (const value_type &value)
 
iterator push_front (const value_type &value)
 
template<class Type >
self_typeput (const path_type &path, const Type &value)
 
template<class Type >
basic_ptree< K, D, C > & put (const path_type &path, const Type &value)
 
template<class Type , class Translator >
self_typeput (const path_type &path, const Type &value, Translator tr)
 
template<class Type , typename Translator >
basic_ptree< K, D, C > & put (const path_type &path, const Type &value, Translator tr)
 
self_typeput_child (const path_type &path, const self_type &value)
 
template<class Type >
void put_value (const Type &value)
 
template<class Type , class Translator >
void put_value (const Type &value, Translator tr)
 
reverse_iterator rbegin ()
 
const_reverse_iterator rbegin () const
 
reverse_iterator rend ()
 
const_reverse_iterator rend () const
 
void reverse ()
 
size_type size () const
 
void sort ()
 
template<class Compare >
void sort (Compare comp)
 
void swap (self_type &rhs)
 
iterator to_iterator (assoc_iterator it)
 
const_iterator to_iterator (const_assoc_iterator it) const
 
 ~basic_ptree ()
 

Private Types

typedef basic_ptree< Key, Data, KeyCompare > self_type
 

Private Member Functions

self_typeforce_path (path_type &p)
 
self_typewalk_path (path_type &p) const
 

Private Attributes

void * m_children
 
data_type m_data
 

Friends

class const_iterator
 
class const_reverse_iterator
 
class iterator
 
class reverse_iterator
 
struct subs
 

Detailed Description

template<class Key, class Data, class KeyCompare>
class boost::property_tree::basic_ptree< Key, Data, KeyCompare >

Property tree main structure. A property tree is a hierarchical data structure which has one element of type Data in each node, as well as an ordered sequence of sub-nodes, which are additionally identified by a non-unique key of type Key.

Key equivalency is defined by KeyCompare, a predicate defining a strict weak ordering.

Property tree defines a Container-like interface to the (key-node) pairs of its direct sub-nodes. The iterators are bidirectional. The sequence of nodes is held in insertion order, not key order.

Definition at line 48 of file ptree.hpp.

Member Typedef Documentation

◆ data_type

template<class Key , class Data , class KeyCompare >
typedef Data boost::property_tree::basic_ptree< Key, Data, KeyCompare >::data_type

Definition at line 63 of file ptree.hpp.

◆ key_compare

template<class Key , class Data , class KeyCompare >
typedef KeyCompare boost::property_tree::basic_ptree< Key, Data, KeyCompare >::key_compare

Definition at line 64 of file ptree.hpp.

◆ key_type

template<class Key , class Data , class KeyCompare >
typedef Key boost::property_tree::basic_ptree< Key, Data, KeyCompare >::key_type

Definition at line 62 of file ptree.hpp.

◆ path_type

template<class Key , class Data , class KeyCompare >
typedef path_of<Key>::type boost::property_tree::basic_ptree< Key, Data, KeyCompare >::path_type

Definition at line 79 of file ptree.hpp.

◆ self_type

template<class Key , class Data , class KeyCompare >
typedef basic_ptree<Key, Data, KeyCompare> boost::property_tree::basic_ptree< Key, Data, KeyCompare >::self_type
private

Simpler way to refer to this basic_ptree<C,K,P,A> type. Note that this is private, and made public only for doxygen.

Definition at line 58 of file ptree.hpp.

◆ size_type

template<class Key , class Data , class KeyCompare >
typedef std::size_t boost::property_tree::basic_ptree< Key, Data, KeyCompare >::size_type

Definition at line 68 of file ptree.hpp.

◆ value_type

template<class Key , class Data , class KeyCompare >
typedef std::pair<const Key, self_type> boost::property_tree::basic_ptree< Key, Data, KeyCompare >::value_type

Definition at line 67 of file ptree.hpp.

Constructor & Destructor Documentation

◆ basic_ptree() [1/3]

template<class K , class D , class C >
boost::property_tree::basic_ptree< K, D, C >::basic_ptree
inline

Creates a node with no children and default-constructed data.

Definition at line 179 of file ptree_implementation.hpp.

◆ basic_ptree() [2/3]

template<class K , class D , class C >
boost::property_tree::basic_ptree< K, D, C >::basic_ptree ( const data_type data)
inlineexplicit

Creates a node with no children and a copy of the given data.

Definition at line 185 of file ptree_implementation.hpp.

◆ basic_ptree() [3/3]

template<class Key , class Data , class KeyCompare >
boost::property_tree::basic_ptree< Key, Data, KeyCompare >::basic_ptree ( const self_type rhs)

◆ ~basic_ptree()

template<class K , class D , class C >
boost::property_tree::basic_ptree< K, D, C >::~basic_ptree

Definition at line 206 of file ptree_implementation.hpp.

Member Function Documentation

◆ add() [1/4]

template<class Key , class Data , class KeyCompare >
template<class Type >
self_type& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::add ( const path_type path,
const Type &  value 
)

If the node identified by the path does not exist, create it, including all its missing parents. If the node already exists, add a sibling with the same key. Set the newly created node's value to the given paremeter, translated with the supplied translator.

Parameters
pathPath to the child. The last fragment must not have an index.
valueThe value to add.
Returns
The node that was added.
Exceptions
ptree_bad_dataif the conversion fails.

◆ add() [2/4]

template<class Key , class Data , class KeyCompare >
template<class Type >
basic_ptree<K, D, C>& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::add ( const path_type path,
const Type &  value 
)
inline

Definition at line 875 of file ptree_implementation.hpp.

◆ add() [3/4]

template<class Key , class Data , class KeyCompare >
template<class Type , class Translator >
self_type& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::add ( const path_type path,
const Type &  value,
Translator  tr 
)

If the node identified by the path does not exist, create it, including all its missing parents. If the node already exists, add a sibling with the same key. Set the newly created node's value to the given paremeter, translated with the supplied translator.

Parameters
pathPath to the child. The last fragment must not have an index.
valueThe value to add.
trThe translator to use.
Returns
The node that was added.
Exceptions
ptree_bad_dataif the conversion fails.

◆ add() [4/4]

template<class Key , class Data , class KeyCompare >
template<class Type , typename Translator >
basic_ptree<K, D, C>& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::add ( const path_type path,
const Type &  value,
Translator  tr 
)
inline

Definition at line 865 of file ptree_implementation.hpp.

◆ add_child()

template<class K , class D , class C >
basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::add_child ( const path_type path,
const self_type value 
)

Add the node at the given path. Create any missing parents. If there already is a node at the path, add another one with the same key.

Parameters
pathPath to the child. The last fragment must not have an index.
Returns
A reference to the inserted subtree.
Note
Because of the way paths work, it is not generally guaranteed that a node newly created can be accessed using the same path.

Definition at line 652 of file ptree_implementation.hpp.

◆ back() [1/2]

template<class K , class D , class C >
const basic_ptree< K, D, C >::value_type & boost::property_tree::basic_ptree< K, D, C >::back
inline

Definition at line 313 of file ptree_implementation.hpp.

◆ back() [2/2]

template<class Key , class Data , class KeyCompare >
const value_type& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::back ( ) const

◆ begin() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_iterator boost::property_tree::basic_ptree< K, D, C >::begin
inline

Definition at line 243 of file ptree_implementation.hpp.

◆ begin() [2/2]

template<class Key , class Data , class KeyCompare >
const_iterator boost::property_tree::basic_ptree< Key, Data, KeyCompare >::begin ( ) const

◆ clear()

template<class K , class D , class C >
void boost::property_tree::basic_ptree< K, D, C >::clear
inline

Clear this tree completely, of both data and children.

Definition at line 563 of file ptree_implementation.hpp.

◆ count()

template<class K , class D , class C >
basic_ptree< K, D, C >::size_type boost::property_tree::basic_ptree< K, D, C >::count ( const key_type key) const
inline

Count the number of direct children with the given key.

Definition at line 518 of file ptree_implementation.hpp.

◆ data() [1/2]

template<class K , class D , class C >
const basic_ptree< K, D, C >::data_type & boost::property_tree::basic_ptree< K, D, C >::data
inline

Reference to the actual data in this node.

Definition at line 550 of file ptree_implementation.hpp.

◆ data() [2/2]

template<class Key , class Data , class KeyCompare >
const data_type& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::data ( ) const

Reference to the actual data in this node.

◆ empty()

template<class K , class D , class C >
bool boost::property_tree::basic_ptree< K, D, C >::empty
inline

Whether there are any direct children.

Definition at line 236 of file ptree_implementation.hpp.

◆ end() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_iterator boost::property_tree::basic_ptree< K, D, C >::end
inline

Definition at line 257 of file ptree_implementation.hpp.

◆ end() [2/2]

template<class Key , class Data , class KeyCompare >
const_iterator boost::property_tree::basic_ptree< Key, Data, KeyCompare >::end ( ) const

◆ equal_range() [1/2]

template<class K , class D , class C >
std::pair< typename basic_ptree< K, D, C >::assoc_iterator, typename basic_ptree< K, D, C >::assoc_iterator > boost::property_tree::basic_ptree< K, D, C >::equal_range ( const key_type key)
inline

Find the range of children that have the given key.

Definition at line 494 of file ptree_implementation.hpp.

◆ equal_range() [2/2]

template<class K , class D , class C >
std::pair< typename basic_ptree< K, D, C >::const_assoc_iterator, typename basic_ptree< K, D, C >::const_assoc_iterator > boost::property_tree::basic_ptree< K, D, C >::equal_range ( const key_type key) const
inline

Find the range of children that have the given key.

Definition at line 507 of file ptree_implementation.hpp.

◆ erase() [1/3]

template<class K , class D , class C >
basic_ptree< K, D, C >::size_type boost::property_tree::basic_ptree< K, D, C >::erase ( const key_type key)
inline

Erase all direct children with the given key and return the count.

Definition at line 525 of file ptree_implementation.hpp.

◆ erase() [2/3]

template<class K , class D , class C >
basic_ptree< K, D, C >::iterator boost::property_tree::basic_ptree< K, D, C >::erase ( iterator  first,
iterator  last 
)
inline

Range erase. Equivalent to:

while(first != last;) first = erase(first);

Definition at line 348 of file ptree_implementation.hpp.

◆ erase() [3/3]

template<class K , class D , class C >
basic_ptree< K, D, C >::iterator boost::property_tree::basic_ptree< K, D, C >::erase ( iterator  where)
inline

Erase the child pointed at by the iterator. This operation invalidates the given iterator, as well as its equivalent assoc_iterator.

Returns
A valid iterator pointing to the element after the erased.

Definition at line 341 of file ptree_implementation.hpp.

◆ find() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::assoc_iterator boost::property_tree::basic_ptree< K, D, C >::find ( const key_type key)
inline

Find a child with the given key, or not_found() if there is none. There is no guarantee about which child is returned if multiple have the same key.

Definition at line 478 of file ptree_implementation.hpp.

◆ find() [2/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_assoc_iterator boost::property_tree::basic_ptree< K, D, C >::find ( const key_type key) const
inline

Find a child with the given key, or not_found() if there is none. There is no guarantee about which child is returned if multiple have the same key.

Definition at line 485 of file ptree_implementation.hpp.

◆ force_path()

template<class K , class D , class C >
basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::force_path ( path_type p)
private

Definition at line 903 of file ptree_implementation.hpp.

◆ front() [1/2]

template<class K , class D , class C >
const basic_ptree< K, D, C >::value_type & boost::property_tree::basic_ptree< K, D, C >::front
inline

Definition at line 299 of file ptree_implementation.hpp.

◆ front() [2/2]

template<class Key , class Data , class KeyCompare >
const value_type& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::front ( ) const

◆ get() [1/6]

template<class K , class D , class C >
template<class Type >
Type boost::property_tree::basic_ptree< K, D, C >::get ( const path_type path) const
inline

Shorthand for get_child(path).get_value<Type>().

Definition at line 749 of file ptree_implementation.hpp.

◆ get() [2/6]

template<class K , class D , class C >
template<class Ch >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type boost::property_tree::basic_ptree< K, D, C >::get ( const path_type path,
const Ch default_value 
) const

Make get do the right thing for string literals.

Definition at line 790 of file ptree_implementation.hpp.

◆ get() [3/6]

template<class K , class D , class C >
template<class Ch , class Translator >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type boost::property_tree::basic_ptree< K, D, C >::get ( const path_type path,
const Ch default_value,
Translator  tr 
) const

Make get do the right thing for string literals.

Definition at line 769 of file ptree_implementation.hpp.

◆ get() [4/6]

template<class K , class D , class C >
template<class Type >
boost::disable_if< detail::is_translator< Type >, Type >::type boost::property_tree::basic_ptree< K, D, C >::get ( const path_type path,
const Type &  default_value 
) const
inline

Shorthand for get_child(path, empty_ptree()) .get_value(default_value). That is, return the translated value if possible, and the default value if the node doesn't exist or conversion fails.

Definition at line 778 of file ptree_implementation.hpp.

◆ get() [5/6]

template<class K , class D , class C >
template<class Type , class Translator >
Type boost::property_tree::basic_ptree< K, D, C >::get ( const path_type path,
const Type &  default_value,
Translator  tr 
) const
inline

Shorthand for get_child(path, empty_ptree()) .get_value(default_value, tr). That is, return the translated value if possible, and the default value if the node doesn't exist or conversion fails.

Definition at line 756 of file ptree_implementation.hpp.

◆ get() [6/6]

template<class K , class D , class C >
template<class Type , class Translator >
boost::enable_if< detail::is_translator< Translator >, Type >::type boost::property_tree::basic_ptree< K, D, C >::get ( const path_type path,
Translator  tr 
) const
inline

Shorthand for get_child(path).get_value(tr).

Definition at line 741 of file ptree_implementation.hpp.

◆ get_child() [1/4]

template<class K , class D , class C >
basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::get_child ( const path_type path)

Get the child at the given path, or throw ptree_bad_path.

Note
Depending on the path, the result at each level may not be completely deterministic, i.e. if the same key appears multiple times, which child is chosen is not specified. This can lead to the path not being resolved even though there is a descendant with this path. Example:
a -> b -> c
-> b
The path "a.b.c" will succeed if the resolution of "b" chooses the first such node, but fail if it chooses the second.

Definition at line 571 of file ptree_implementation.hpp.

◆ get_child() [2/4]

template<class K , class D , class C >
const basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::get_child ( const path_type path) const
inline

Get the child at the given path, or throw ptree_bad_path.

Definition at line 583 of file ptree_implementation.hpp.

◆ get_child() [3/4]

template<class K , class D , class C >
const basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::get_child ( const path_type path,
const self_type default_value 
) const
inline

Get the child at the given path, or return default_value.

Definition at line 600 of file ptree_implementation.hpp.

◆ get_child() [4/4]

template<class K , class D , class C >
basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::get_child ( const path_type path,
self_type default_value 
)
inline

Get the child at the given path, or return default_value.

Definition at line 590 of file ptree_implementation.hpp.

◆ get_child_optional() [1/2]

template<class K , class D , class C >
optional< basic_ptree< K, D, C > & > boost::property_tree::basic_ptree< K, D, C >::get_child_optional ( const path_type path)

Get the child at the given path, or return boost::null.

Definition at line 610 of file ptree_implementation.hpp.

◆ get_child_optional() [2/2]

template<class K , class D , class C >
optional< const basic_ptree< K, D, C > & > boost::property_tree::basic_ptree< K, D, C >::get_child_optional ( const path_type path) const

Get the child at the given path, or return boost::null.

Definition at line 622 of file ptree_implementation.hpp.

◆ get_optional() [1/2]

template<class K , class D , class C >
template<class Type >
optional< Type > boost::property_tree::basic_ptree< K, D, C >::get_optional ( const path_type path) const

Shorthand for:

if(optional\<const self_type&\> node = get_child_optional(path))
return node->get_value_optional();
return boost::null;

That is, return the value if it exists and can be converted, or nil.

Definition at line 810 of file ptree_implementation.hpp.

◆ get_optional() [2/2]

template<class K , class D , class C >
template<class Type , class Translator >
optional< Type > boost::property_tree::basic_ptree< K, D, C >::get_optional ( const path_type path,
Translator  tr 
) const

Shorthand for:

if(optional\<self_type&\> node = get_child_optional(path))
return node->get_value_optional(tr);
return boost::null;

That is, return the value if it exists and can be converted, or nil.

Definition at line 798 of file ptree_implementation.hpp.

◆ get_value() [1/6]

template<class K , class D , class C >
template<class Type >
Type boost::property_tree::basic_ptree< K, D, C >::get_value
inline

Take the value of this node and attempt to translate it to a Type object using the default translator.

Exceptions
ptree_bad_dataif the conversion fails.

Definition at line 677 of file ptree_implementation.hpp.

◆ get_value() [2/6]

template<class K , class D , class C >
template<class Ch >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type boost::property_tree::basic_ptree< K, D, C >::get_value ( const Ch default_value) const

Make get_value do the right thing for string literals.

Definition at line 717 of file ptree_implementation.hpp.

◆ get_value() [3/6]

template<class K , class D , class C >
template<class Ch , class Translator >
boost::enable_if< detail::is_character< Ch >, std::basic_string< Ch > >::type boost::property_tree::basic_ptree< K, D, C >::get_value ( const Ch default_value,
Translator  tr 
) const

Make get_value do the right thing for string literals.

Definition at line 697 of file ptree_implementation.hpp.

◆ get_value() [4/6]

template<class K , class D , class C >
template<class Type >
boost::disable_if< detail::is_translator< Type >, Type >::type boost::property_tree::basic_ptree< K, D, C >::get_value ( const Type &  default_value) const
inline

Take the value of this node and attempt to translate it to a Type object using the default translator. Return default_value if this fails.

Definition at line 705 of file ptree_implementation.hpp.

◆ get_value() [5/6]

template<class K , class D , class C >
template<class Type , class Translator >
Type boost::property_tree::basic_ptree< K, D, C >::get_value ( const Type &  default_value,
Translator  tr 
) const
inline

Take the value of this node and attempt to translate it to a Type object using the supplied translator. Return default_value if this fails.

Definition at line 685 of file ptree_implementation.hpp.

◆ get_value() [6/6]

template<class K , class D , class C >
template<class Type , class Translator >
boost::enable_if< detail::is_translator< Translator >, Type >::type boost::property_tree::basic_ptree< K, D, C >::get_value ( Translator  tr) const

Take the value of this node and attempt to translate it to a Type object using the supplied translator.

Exceptions
ptree_bad_dataif the conversion fails.

Definition at line 665 of file ptree_implementation.hpp.

◆ get_value_optional() [1/2]

template<class K , class D , class C >
template<class Type >
optional< Type > boost::property_tree::basic_ptree< K, D, C >::get_value_optional
inline

Take the value of this node and attempt to translate it to a Type object using the default translator. Return boost::null if this fails.

Definition at line 732 of file ptree_implementation.hpp.

◆ get_value_optional() [2/2]

template<class K , class D , class C >
template<class Type , class Translator >
optional< Type > boost::property_tree::basic_ptree< K, D, C >::get_value_optional ( Translator  tr) const
inline

Take the value of this node and attempt to translate it to a Type object using the supplied translator. Return boost::null if this fails.

Definition at line 724 of file ptree_implementation.hpp.

◆ insert() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::iterator boost::property_tree::basic_ptree< K, D, C >::insert ( iterator  where,
const value_type value 
)
inline

Insert a copy of the given tree with its key just before the given position in this node. This operation invalidates no iterators.

Returns
An iterator to the newly created child.

Definition at line 327 of file ptree_implementation.hpp.

◆ insert() [2/2]

template<class K , class D , class C >
template<class It >
void boost::property_tree::basic_ptree< K, D, C >::insert ( iterator  where,
It  first,
It  last 
)
inline

Range insert. Equivalent to:

for(; first != last; ++first) insert(where, *first);

Definition at line 334 of file ptree_implementation.hpp.

◆ max_size()

template<class K , class D , class C >
basic_ptree< K, D, C >::size_type boost::property_tree::basic_ptree< K, D, C >::max_size
inline

Definition at line 230 of file ptree_implementation.hpp.

◆ not_found() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_assoc_iterator boost::property_tree::basic_ptree< K, D, C >::not_found
inline

Returns the not-found iterator. Equivalent to end() in a real associative container.

Definition at line 464 of file ptree_implementation.hpp.

◆ not_found() [2/2]

template<class Key , class Data , class KeyCompare >
const_assoc_iterator boost::property_tree::basic_ptree< Key, Data, KeyCompare >::not_found ( ) const

Returns the not-found iterator. Equivalent to end() in a real associative container.

◆ operator!=()

template<class Key , class Data , class KeyCompare >
bool boost::property_tree::basic_ptree< K, D, C >::operator!= ( const self_type rhs) const
inline

Definition at line 440 of file ptree_implementation.hpp.

◆ operator=()

template<class Key , class Data , class KeyCompare >
basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::operator= ( const self_type rhs)

Basic guarantee only.

Definition at line 199 of file ptree_implementation.hpp.

◆ operator==()

template<class Key , class Data , class KeyCompare >
bool boost::property_tree::basic_ptree< K, D, C >::operator== ( const self_type rhs) const
inline

Two property trees are the same if they have the same data, the keys and order of their children are the same, and the children compare equal, recursively.

Definition at line 431 of file ptree_implementation.hpp.

◆ ordered_begin() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_assoc_iterator boost::property_tree::basic_ptree< K, D, C >::ordered_begin
inline

Returns an iterator to the first child, in key order.

Definition at line 450 of file ptree_implementation.hpp.

◆ ordered_begin() [2/2]

template<class Key , class Data , class KeyCompare >
const_assoc_iterator boost::property_tree::basic_ptree< Key, Data, KeyCompare >::ordered_begin ( ) const

Returns an iterator to the first child, in key order.

◆ pop_back()

template<class K , class D , class C >
void boost::property_tree::basic_ptree< K, D, C >::pop_back
inline

Equivalent to erase(boost::prior(end())).

Definition at line 374 of file ptree_implementation.hpp.

◆ pop_front()

template<class K , class D , class C >
void boost::property_tree::basic_ptree< K, D, C >::pop_front
inline

Equivalent to erase(begin()).

Definition at line 368 of file ptree_implementation.hpp.

◆ push_back()

template<class K , class D , class C >
basic_ptree< K, D, C >::iterator boost::property_tree::basic_ptree< K, D, C >::push_back ( const value_type value)
inline

Equivalent to insert(end(), value).

Definition at line 362 of file ptree_implementation.hpp.

◆ push_front()

template<class K , class D , class C >
basic_ptree< K, D, C >::iterator boost::property_tree::basic_ptree< K, D, C >::push_front ( const value_type value)
inline

Equivalent to insert(begin(), value).

Definition at line 355 of file ptree_implementation.hpp.

◆ put() [1/4]

template<class Key , class Data , class KeyCompare >
template<class Type >
self_type& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::put ( const path_type path,
const Type &  value 
)

Set the value of the node at the given path to the supplied value, translated to the tree's data type. If the node doesn't exist, it is created, including all its missing parents.

Returns
The node that had its value changed.
Exceptions
ptree_bad_dataif the conversion fails.

◆ put() [2/4]

template<class Key , class Data , class KeyCompare >
template<class Type >
basic_ptree<K, D, C>& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::put ( const path_type path,
const Type &  value 
)
inline

Definition at line 856 of file ptree_implementation.hpp.

◆ put() [3/4]

template<class Key , class Data , class KeyCompare >
template<class Type , class Translator >
self_type& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::put ( const path_type path,
const Type &  value,
Translator  tr 
)

Set the value of the node at the given path to the supplied value, translated to the tree's data type. If the node doesn't exist, it is created, including all its missing parents.

Returns
The node that had its value changed.
Exceptions
ptree_bad_dataif the conversion fails.

◆ put() [4/4]

template<class Key , class Data , class KeyCompare >
template<class Type , typename Translator >
basic_ptree<K, D, C>& boost::property_tree::basic_ptree< Key, Data, KeyCompare >::put ( const path_type path,
const Type &  value,
Translator  tr 
)

Definition at line 841 of file ptree_implementation.hpp.

◆ put_child()

template<class K , class D , class C >
basic_ptree< K, D, C > & boost::property_tree::basic_ptree< K, D, C >::put_child ( const path_type path,
const self_type value 
)

Set the node at the given path to the given value. Create any missing parents. If the node at the path already exists, replace it.

Returns
A reference to the inserted subtree.
Note
Because of the way paths work, it is not generally guaranteed that a node newly created can be accessed using the same path.
If the path could refer to multiple nodes, it is unspecified which one gets replaced.

Definition at line 634 of file ptree_implementation.hpp.

◆ put_value() [1/2]

template<class K , class D , class C >
template<class Type >
void boost::property_tree::basic_ptree< K, D, C >::put_value ( const Type &  value)
inline

Replace the value at this node with the given value, translated to the tree's data type using the default translator.

Exceptions
ptree_bad_dataif the conversion fails.

Definition at line 834 of file ptree_implementation.hpp.

◆ put_value() [2/2]

template<class K , class D , class C >
template<class Type , class Translator >
void boost::property_tree::basic_ptree< K, D, C >::put_value ( const Type &  value,
Translator  tr 
)

Replace the value at this node with the given value, translated to the tree's data type using the supplied translator.

Exceptions
ptree_bad_dataif the conversion fails.

Definition at line 821 of file ptree_implementation.hpp.

◆ rbegin() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_reverse_iterator boost::property_tree::basic_ptree< K, D, C >::rbegin
inline

Definition at line 271 of file ptree_implementation.hpp.

◆ rbegin() [2/2]

template<class Key , class Data , class KeyCompare >
const_reverse_iterator boost::property_tree::basic_ptree< Key, Data, KeyCompare >::rbegin ( ) const

◆ rend() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_reverse_iterator boost::property_tree::basic_ptree< K, D, C >::rend
inline

Definition at line 285 of file ptree_implementation.hpp.

◆ rend() [2/2]

template<class Key , class Data , class KeyCompare >
const_reverse_iterator boost::property_tree::basic_ptree< Key, Data, KeyCompare >::rend ( ) const

◆ reverse()

template<class K , class D , class C >
void boost::property_tree::basic_ptree< K, D, C >::reverse
inline

Reverses the order of direct children in the property tree.

Definition at line 380 of file ptree_implementation.hpp.

◆ size()

template<class K , class D , class C >
basic_ptree< K, D, C >::size_type boost::property_tree::basic_ptree< K, D, C >::size
inline

The number of direct children of this node.

Definition at line 223 of file ptree_implementation.hpp.

◆ sort() [1/2]

template<class K , class D , class C >
void boost::property_tree::basic_ptree< K, D, C >::sort
inline

Sorts the direct children of this node according to key order.

Definition at line 416 of file ptree_implementation.hpp.

◆ sort() [2/2]

template<class K , class D , class C >
template<class Compare >
void boost::property_tree::basic_ptree< K, D, C >::sort ( Compare  comp)
inline

Sorts the direct children of this node according to the predicate. The predicate is passed the whole pair of key and child.

Definition at line 423 of file ptree_implementation.hpp.

◆ swap()

template<class Key , class Data , class KeyCompare >
void boost::property_tree::basic_ptree< K, D, C >::swap ( self_type rhs)
inline

Swap with other tree. Only constant-time and nothrow if the data type's swap is.

Definition at line 212 of file ptree_implementation.hpp.

◆ to_iterator() [1/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::iterator boost::property_tree::basic_ptree< K, D, C >::to_iterator ( assoc_iterator  it)
inline

Get the iterator that points to the same element as the argument.

Note
A valid assoc_iterator range (a, b) does not imply that (to_iterator(a), to_iterator(b)) is a valid range.

Definition at line 532 of file ptree_implementation.hpp.

◆ to_iterator() [2/2]

template<class K , class D , class C >
basic_ptree< K, D, C >::const_iterator boost::property_tree::basic_ptree< K, D, C >::to_iterator ( const_assoc_iterator  it) const
inline

Get the iterator that points to the same element as the argument.

Note
A valid const_assoc_iterator range (a, b) does not imply that (to_iterator(a), to_iterator(b)) is a valid range.

Definition at line 540 of file ptree_implementation.hpp.

◆ walk_path()

template<class K , class D , class C >
basic_ptree< K, D, C > * boost::property_tree::basic_ptree< K, D, C >::walk_path ( path_type p) const
private

Definition at line 885 of file ptree_implementation.hpp.

Friends And Related Function Documentation

◆ const_iterator

template<class Key , class Data , class KeyCompare >
friend class const_iterator
friend

Definition at line 509 of file ptree.hpp.

◆ const_reverse_iterator

template<class Key , class Data , class KeyCompare >
friend class const_reverse_iterator
friend

Definition at line 511 of file ptree.hpp.

◆ iterator

template<class Key , class Data , class KeyCompare >
friend class iterator
friend

Definition at line 508 of file ptree.hpp.

◆ reverse_iterator

template<class Key , class Data , class KeyCompare >
friend class reverse_iterator
friend

Definition at line 510 of file ptree.hpp.

◆ subs

template<class Key , class Data , class KeyCompare >
friend struct subs
friend

Definition at line 506 of file ptree.hpp.

Member Data Documentation

◆ m_children

template<class Key , class Data , class KeyCompare >
void* boost::property_tree::basic_ptree< Key, Data, KeyCompare >::m_children
private

Definition at line 494 of file ptree.hpp.

◆ m_data

template<class Key , class Data , class KeyCompare >
data_type boost::property_tree::basic_ptree< Key, Data, KeyCompare >::m_data
private

Definition at line 491 of file ptree.hpp.


The documentation for this class was generated from the following files:
boost::property_tree::path
string_path< std::string, id_translator< std::string > > path
Definition: ptree_fwd.hpp:84
boost::property_tree::basic_ptree::erase
iterator erase(iterator where)
Definition: ptree_implementation.hpp:341
boost::property_tree::basic_ptree::get_child_optional
optional< self_type & > get_child_optional(const path_type &path)
Definition: ptree_implementation.hpp:610
boost::property_tree::basic_ptree::insert
iterator insert(iterator where, const value_type &value)
Definition: ptree_implementation.hpp:327
boost::property_tree::basic_ptree::self_type
basic_ptree< Key, Data, KeyCompare > self_type
Definition: ptree.hpp:58


sick_visionary_ros
Author(s): SICK AG TechSupport 3D Snapshot
autogenerated on Thu Feb 8 2024 04:38:17