4.4.1
Freundlich's C++ toolkit
Loading...
Searching...
No Matches
Public Types | Public Member Functions
fcppt::log::location Class Reference

Detailed Description

A location of a logger in a context.

A logger's location is represented by a vector of strings. Each entry in the vector describes an edge in the tree. The nodes of the tree are notated by double colons, so for example a location of "::root::child" denotes a logger that is below the child level, which in turn is below the root level.

Public Types

using const_iterator = fcppt::log::detail::location_vector::const_iterator
 The iterator type.
 

Public Member Functions

FCPPT_LOG_DETAIL_SYMBOL location ()
 Constructs an empty location.
 
FCPPT_LOG_DETAIL_SYMBOL location (fcppt::log::name root)
 Constructs a location with one element.
 
FCPPT_LOG_DETAIL_SYMBOL fcppt::log::locationoperator/= (fcppt::log::name name)
 Adds a new element to this location.
 
FCPPT_LOG_DETAIL_SYMBOL const_iterator begin () const
 Returns an iterator to the beginning.
 
FCPPT_LOG_DETAIL_SYMBOL const_iterator end () const
 Returns an iterator to one past the end.
 
FCPPT_LOG_DETAIL_SYMBOL fcppt::string string () const
 Creates a string represenation of the location using :: as delimiter.
 

Member Typedef Documentation

◆ const_iterator

using fcppt::log::location::const_iterator = fcppt::log::detail::location_vector::const_iterator

The iterator type.

A typedef to an iterator type over fcppt::string

Constructor & Destructor Documentation

◆ location() [1/2]

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::location::location ( )

Constructs an empty location.

◆ location() [2/2]

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::location::location ( fcppt::log::name  root)
explicit

Constructs a location with one element.

Constructs a location with one element given by root

Parameters
rootThe root element

Member Function Documentation

◆ begin()

FCPPT_LOG_DETAIL_SYMBOL const_iterator fcppt::log::location::begin ( ) const

Returns an iterator to the beginning.

◆ end()

FCPPT_LOG_DETAIL_SYMBOL const_iterator fcppt::log::location::end ( ) const

Returns an iterator to one past the end.

◆ operator/=()

FCPPT_LOG_DETAIL_SYMBOL fcppt::log::location & fcppt::log::location::operator/= ( fcppt::log::name  name)

Adds a new element to this location.

Adds name to this location

◆ string()

FCPPT_LOG_DETAIL_SYMBOL fcppt::string fcppt::log::location::string ( ) const

Creates a string represenation of the location using :: as delimiter.