Web Analytics Made Easy - Statcounter
Skip to content

Class SBCClassCallableMemberDoc#

ClassList > SBCClassCallableMemberDoc

This class describes documentation for callable members of classes (constructors and member functions).

  • #include <SBCClassCallableMemberDoc.hpp>

Classes#

Type Name
struct DocItem
An internal structure used to populate docs via the Spec structure in a function's constructor.
struct ParameterDoc
A structure that contains docs for function parameter/argument.
struct Spec
A doc specification (spec) structure used to populate docs via a function's constructor.

Public Types#

Type Name
enum std::uint8_t DocKind
DSL / Spec types; used for populating docs.

Public Functions#

Type Name
SBCClassCallableMemberDoc () noexcept
Documentation for callable members of classes (constructors and member functions) can be provided in descriptors of classes, see Introspection .
SB_DECLARE_DATA (SBCClassCallableMemberDoc)
const char * getBrief () noexcept const
A docstring with the function's brief.
const char * getDeprecated () noexcept const
A docstring with an info about the function's deprecation [optional].
std::string getDocString (const std::string & linePrefix="", const std::string & lineSplitter="\n") const
Returns a documentation string based on the available documentation fields.
const char * getNote () noexcept const
A docstring with a function's note.
std::uint8_t getNumberOfParameters () noexcept const
Returns the number of documented operands/arguments (arity) that the function takes.
const ParameterDoc & getParameterDoc (std::uint8_t i) noexcept const
Returns a reference to the i -th parameter's documentation.
const char * getReturns () noexcept const
A docstring what function returns.
const char * getSeeAlso (std::uint8_t i) noexcept const
Returns an i -th "see also" docstring.
std::uint8_t getSeeAlsoCount () noexcept const
Returns the number of "see also" docstrings.
const char * getSince () noexcept const
A docstring with an info about when the function was introduced [optional].
~SBCClassCallableMemberDoc ()
Destroys the SBCClassCallableMemberDoc object and releases its resources.

Public Static Functions#

Type Name
DocItem brief (const char * text) noexcept
DocItem deprecated (const char * text) noexcept
DocItem note (const char * text) noexcept
DocItem param (const char * name, const char * doc) noexcept
DocItem returns (const char * doc) noexcept
DocItem seeAlso (const char * text) noexcept
DocItem since (const char * text) noexcept

Public Types Documentation#

enum DocKind#

DSL / Spec types; used for populating docs.

enum SBCClassCallableMemberDoc::DocKind {
    Brief,
    Parameter,
    Returns,
    Note,
    Deprecated,
    Since,
    SeeAlso
};


Public Functions Documentation#

function SBCClassCallableMemberDoc#

Documentation for callable members of classes (constructors and member functions) can be provided in descriptors of classes, see Introspection .

explicit SBCClassCallableMemberDoc::SBCClassCallableMemberDoc () noexcept

See:

  • constructors: SB_CONSTRUCTOR_0_BEGIN, SB_CONSTRUCTOR_N_BEGIN ;
  • functions: SB_FUNCTION_0_BEGIN, SB_FUNCTION_N_BEGIN ;
  • const functions: SB_CONST_FUNCTION_0_BEGIN, SB_CONST_FUNCTION_N_BEGIN ;
  • static functions: SB_STATIC_FUNCTION_0_BEGIN, SB_STATIC_FUNCTION_N_BEGIN .

Constructs an SBCClassCallableMemberDoc object.

Initializes the internal data structure used to store documentation fields.


function SB_DECLARE_DATA#

SBCClassCallableMemberDoc::SB_DECLARE_DATA (
    SBCClassCallableMemberDoc
) 

function getBrief#

A docstring with the function's brief.

const char * SBCClassCallableMemberDoc::getBrief () noexcept const

Returns the brief description of the callable member.

This is the short summary provided for the member.

Returns:

Pointer to the brief string, or nullptr if not set.


function getDeprecated#

A docstring with an info about the function's deprecation [optional].

const char * SBCClassCallableMemberDoc::getDeprecated () noexcept const

Returns the deprecation notice for the callable member, if any.

Returns:

Pointer to the deprecation string, or nullptr if not deprecated.


function getDocString#

Returns a documentation string based on the available documentation fields.

std::string SBCClassCallableMemberDoc::getDocString (
    const std::string & linePrefix="",
    const std::string & lineSplitter="\n"
) const

Generates a documentation string for the callable member.

Concatenates the various documented fields into a single string, using the specified line prefix and line splitter.

Parameters:

  • linePrefix The line prefix to prepend to each line (e.g., "// ").
  • lineSplitter The string used to separate lines (e.g., newline).

Returns:

The assembled documentation string.


function getNote#

A docstring with a function's note.

const char * SBCClassCallableMemberDoc::getNote () noexcept const

Returns the note associated with the callable member.

Returns:

Pointer to the note string, or nullptr if not set.


function getNumberOfParameters#

Returns the number of documented operands/arguments (arity) that the function takes.

std::uint8_t SBCClassCallableMemberDoc::getNumberOfParameters () noexcept const

Returns the number of documented parameters of the callable member.

Returns:

The number of parameters.


function getParameterDoc#

Returns a reference to the i -th parameter's documentation.

const ParameterDoc & SBCClassCallableMemberDoc::getParameterDoc (
    std::uint8_t i
) noexcept const

Retrieves the documentation for a specific parameter.

Provides the name and description of the parameter at the given index.

Parameters:

  • i Zero-based index of the parameter.

Returns:

Reference to the ParameterDoc structure for the specified parameter, or an empty doc if the index is out of range.


function getReturns#

A docstring what function returns.

const char * SBCClassCallableMemberDoc::getReturns () noexcept const

Returns the description of the return value of the callable member.

Returns:

Pointer to the returns string, or nullptr if not set.


function getSeeAlso#

Returns an i -th "see also" docstring.

const char * SBCClassCallableMemberDoc::getSeeAlso (
    std::uint8_t i
) noexcept const

Retrieves a "see also" reference string by index.

Parameters:

  • i Zero-based index of the see also entry.

Returns:

Pointer to the reference string, or nullptr if the index is out of range.


function getSeeAlsoCount#

Returns the number of "see also" docstrings.

std::uint8_t SBCClassCallableMemberDoc::getSeeAlsoCount () noexcept const

Returns the number of "see also" references for the callable member.

Returns:

The count of see-also entries.


function getSince#

A docstring with an info about when the function was introduced [optional].

const char * SBCClassCallableMemberDoc::getSince () noexcept const

Returns the version information indicating when the callable member was introduced.

Returns:

Pointer to the since string, or nullptr if not set.


function ~SBCClassCallableMemberDoc#

Destroys the SBCClassCallableMemberDoc object and releases its resources.

SBCClassCallableMemberDoc::~SBCClassCallableMemberDoc () 

Deletes the internal data pointer.


Public Static Functions Documentation#

function brief#

static inline DocItem SBCClassCallableMemberDoc::brief (
    const char * text
) noexcept

function deprecated#

static inline DocItem SBCClassCallableMemberDoc::deprecated (
    const char * text
) noexcept

function note#

static inline DocItem SBCClassCallableMemberDoc::note (
    const char * text
) noexcept

function param#

static inline DocItem SBCClassCallableMemberDoc::param (
    const char * name,
    const char * doc
) noexcept

function returns#

static inline DocItem SBCClassCallableMemberDoc::returns (
    const char * doc
) noexcept

function seeAlso#

static inline DocItem SBCClassCallableMemberDoc::seeAlso (
    const char * text
) noexcept

function since#

static inline DocItem SBCClassCallableMemberDoc::since (
    const char * text
) noexcept