.. ---------------------------------------------------------------------------------------------- Copyright (c) The Einsums Developers. All rights reserved. Licensed under the MIT License. See LICENSE.txt in the project root for license information. ---------------------------------------------------------------------------------------------- .. _cppapi_DocExtractor: ============ DocExtractor ============ .. note:: Generated from the C++ headers by ``apiary --emit-cpp-docs-json``. .. cpp:namespace:: apiary .. cpp:function:: std::string clean_raw_comment(llvm::StringRef text) Cleans a raw comment block (``/** ... */`` or ``/// ...``) into doxygen body text. Strips comment markers, leading ``*``, and banner lines. Shared by ``extract_doc`` (AST decls) and the macro scanner (raw ``#define`` text). :param text: The raw comment block to clean. :returns: The cleaned doxygen body text. .. cpp:function:: std::string extract_doc(const clang::Decl *decl, clang::ASTContext &ctx) Returns the cleaned doxygen comment associated with `decl`. Cleaning strips ``///``, ``/**``, ``*/``, and leading ``*`` markers but otherwise preserves the text verbatim — Phase 2 keeps escaping/markdown conversion out of scope (Phase 3 polish handles ``\param`` / ``\return`` reflow). :param decl: The declaration to extract the doc-comment from. :param ctx: The AST context owning ``decl.`` :returns: The cleaned doxygen comment, or an empty string if the declaration has no doc-comment.