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

BoostBook element class
PrevUpHomeNext

BoostBook element class

class — Declares a class or class template

Synopsis

Description

C++ classes and class templates are described via the element. Each class has a name (e.g., "any") given by the name attribute, a purpose given by the element, documentation, and a set of types, functions, base classes, and data members. Here is a minimal definition of the boost::any class:


  
    
      A class whose instances can hold instances of any type that satisfies
      ValueType requirements.
    
  

Additional class documentation can be contained in a description element following the element. This documentation will be typeset prior to documentation for specific elements in the class (e.g., constructors or methods).

Class inheritance is described via the element. The element requires an access attribute which must be one of public, protected, or private. The content of the element in C++ code that names the class inherited, and may contain markup to link to the class. The following description of the class boost::bad_any_cast describes public inheritance from the class std::bad_cast. It also defines the element, which contains a short description of the use of the class.


  std::bad_cast
  The exception thrown in the event of a failed
  any_cast of an
  any value.

Class templates are defined by elements with a