fson  1.0.2
A comment-preserving C++ library for FSON — a human-friendly superset of JSON / JSON5
fedem::fson::IncludeResolver Class Referencefinal

#include <IncludeResolver.hh>

+ Collaboration diagram for fedem::fson::IncludeResolver:

Public Member Functions

 IncludeResolver ()
 
void resolve (Document &document, std::string const &basePath)
 
std::vector< parser::ParseError > const & errors () const noexcept
 
std::vector< std::string > const & dependencies () const noexcept
 
std::set< std::string > const & dependencySet () const noexcept
 

Private Member Functions

void resolveObject (Object &object, std::string const &ownerDirectory)
 
std::unique_ptr< DocumentloadTarget (std::string const &target, std::string const &ownerDirectory, std::string &canonical)
 
void recordDependency (std::string const &canonical)
 

Private Attributes

std::vector< parser::ParseError > collectedErrors
 
std::vector< std::string > dependencyPaths
 
std::set< std::string > allFiles
 
std::vector< std::string > activeStack
 

Constructor & Destructor Documentation

◆ IncludeResolver()

fedem::fson::IncludeResolver::IncludeResolver ( )
default

Member Function Documentation

◆ resolve()

void fedem::fson::IncludeResolver::resolve ( Document document,
std::string const &  basePath 
)

References fedem::fson::Document::getRootObject().

Referenced by fedem::fson::Fson::dependenciesOf(), and fedem::fson::Fson::load().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ errors()

vector< parser::ParseError > const & fedem::fson::IncludeResolver::errors ( ) const
noexcept

Referenced by fedem::fson::Fson::load().

+ Here is the caller graph for this function:

◆ dependencies()

vector< string > const & fedem::fson::IncludeResolver::dependencies ( ) const
noexcept

Referenced by fedem::fson::Fson::load().

+ Here is the caller graph for this function:

◆ dependencySet()

set< string > const & fedem::fson::IncludeResolver::dependencySet ( ) const
noexcept

Referenced by fedem::fson::Fson::dependenciesOf(), and fedem::fson::Fson::load().

+ Here is the caller graph for this function:

◆ resolveObject()

void fedem::fson::IncludeResolver::resolveObject ( Object object,
std::string const &  ownerDirectory 
)
private

◆ loadTarget()

unique_ptr< Document > fedem::fson::IncludeResolver::loadTarget ( std::string const &  target,
std::string const &  ownerDirectory,
std::string &  canonical 
)
private

References fedem::fson::FsonParser::parseFile().

+ Here is the call graph for this function:

◆ recordDependency()

void fedem::fson::IncludeResolver::recordDependency ( std::string const &  canonical)
private

Member Data Documentation

◆ collectedErrors

std::vector< parser::ParseError > fedem::fson::IncludeResolver::collectedErrors
private

◆ dependencyPaths

std::vector< std::string > fedem::fson::IncludeResolver::dependencyPaths
private

◆ allFiles

std::set< std::string > fedem::fson::IncludeResolver::allFiles
private

◆ activeStack

std::vector< std::string > fedem::fson::IncludeResolver::activeStack
private

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