Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for an old version of boost. Click here for the latest Boost documentation.
PrevUpHomeNext

Macro BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE

BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE — The macro declares an attribute keyword type.

Synopsis

// In header: <boost/log/expressions/keyword.hpp>

BOOST_LOG_ATTRIBUTE_KEYWORD_TYPE(keyword_, name_, value_type_)

Description

The macro should be used at a namespace scope. It expands into an attribute keyword type definition, including the tag namespace and the keyword tag type within which has the following layout:

namespace tag
{
  struct keyword_ :
    public boost::log::expressions::keyword_descriptor
  {
    typedef value_type_ value_type;
    static boost::log::attribute_name get_name();
  };
}

typedef boost::log::expressions::attribute_keyword< tag::keyword_ > keyword_type;

The get_name method returns the attribute name.

[Note] Note

This macro only defines the type of the keyword. To also define the keyword object, use the BOOST_LOG_ATTRIBUTE_KEYWORD macro instead.

Parameters:

keyword_

Keyword name

name_

Attribute name string

value_type_

Attribute value type


PrevUpHomeNext