Sen API
Sen Libraries
Loading...
Searching...
No Matches
sen::lang::fom::FomDocuments Class Reference

Reads every document, indexes what each one declares, then builds the types. A type is built on first reference, from every declaration of it rather than only the first, which is what lets a file beside the FOM add members to it. More...

#include <fom_documents.h>

Public Member Functions

 FomDocuments (const std::vector< std::filesystem::path > &paths, const std::vector< std::filesystem::path > &extensions, const std::vector< std::filesystem::path > &mappings, TypeSettings settings)
 ~FomDocuments ()=default
std::vector< DocumentTypeSet > takeTypeSets ()
 One set per document, in the order the documents were read, which follows the directories given on the command line. An extension gets none: it owns no type.
const TypeSet & rootTypeSet () const &noexcept
std::unique_ptr< TypeSet > takeRootTypeSet () &&
 Hands over the root set, which leaves this reader without one. Rvalue-qualified so a second call is a compile error rather than a null dereference.

Detailed Description

Reads every document, indexes what each one declares, then builds the types. A type is built on first reference, from every declaration of it rather than only the first, which is what lets a file beside the FOM add members to it.

Constructor & Destructor Documentation

◆ FomDocuments()

sen::lang::fom::FomDocuments::FomDocuments ( const std::vector< std::filesystem::path > & paths,
const std::vector< std::filesystem::path > & extensions,
const std::vector< std::filesystem::path > & mappings,
TypeSettings settings )

◆ ~FomDocuments()

sen::lang::fom::FomDocuments::~FomDocuments ( )
default

Member Function Documentation

◆ takeTypeSets()

std::vector< DocumentTypeSet > sen::lang::fom::FomDocuments::takeTypeSets ( )
nodiscard

One set per document, in the order the documents were read, which follows the directories given on the command line. An extension gets none: it owns no type.

◆ rootTypeSet()

const TypeSet & sen::lang::fom::FomDocuments::rootTypeSet ( ) const &
nodiscardnoexcept

◆ takeRootTypeSet()

std::unique_ptr< TypeSet > sen::lang::fom::FomDocuments::takeRootTypeSet ( ) &&
nodiscard

Hands over the root set, which leaves this reader without one. Rvalue-qualified so a second call is a compile error rather than a null dereference.


The documentation for this class was generated from the following file: