PLaSK library
Loading...
Searching...
No Matches
plask::Manager::ExternalSourcesFromFile Struct Reference

Allow to support reading some sections from other files. More...

#include <plask/manager.hpp>

Collaboration diagram for plask::Manager::ExternalSourcesFromFile:
[legend]

Public Member Functions

bool hasCircularRef (boost::filesystem::path &fileName, const std::string &section)
 
 ExternalSourcesFromFile ()
 Create ExternalSourcesFromFile which doesn't support relative file names (original file name is not known).
 
 ExternalSourcesFromFile (const boost::filesystem::path &originalFileName, const std::string &currentSection=std::string(), ExternalSourcesFromFile *prev=nullptr)
 Create ExternalSourcesFromFile which support relative file names.
 
void operator() (Manager &manager, const std::string &url, const std::string &section)
 

Public Attributes

boost::filesystem::path originalFileName
 Current file name.
 
std::string currentSection
 Name of section which is just read.
 
ExternalSourcesFromFileprev
 Names of files from which current section is read (detect circular reference).
 

Detailed Description

Allow to support reading some sections from other files.

Definition at line 73 of file manager.hpp.

Constructor & Destructor Documentation

◆ ExternalSourcesFromFile() [1/2]

plask::Manager::ExternalSourcesFromFile::ExternalSourcesFromFile ( )
inline

Create ExternalSourcesFromFile which doesn't support relative file names (original file name is not known).

Definition at line 94 of file manager.hpp.

◆ ExternalSourcesFromFile() [2/2]

plask::Manager::ExternalSourcesFromFile::ExternalSourcesFromFile ( const boost::filesystem::path &  originalFileName,
const std::string &  currentSection = std::string(),
ExternalSourcesFromFile prev = nullptr 
)
inline

Create ExternalSourcesFromFile which support relative file names.

Parameters
originalFileNamename of file from which XML is read now
currentSectionname of current section
prevprevious source (needed to cycle detection)

Definition at line 102 of file manager.hpp.

Member Function Documentation

◆ hasCircularRef()

bool plask::Manager::ExternalSourcesFromFile::hasCircularRef ( boost::filesystem::path &  fileName,
const std::string &  section 
)
inline

Definition at line 84 of file manager.hpp.

◆ operator()()

void plask::Manager::ExternalSourcesFromFile::operator() ( Manager manager,
const std::string &  url,
const std::string &  section 
)

Definition at line 31 of file manager.cpp.

Member Data Documentation

◆ currentSection

std::string plask::Manager::ExternalSourcesFromFile::currentSection

Name of section which is just read.

Definition at line 79 of file manager.hpp.

◆ originalFileName

boost::filesystem::path plask::Manager::ExternalSourcesFromFile::originalFileName

Current file name.

Definition at line 76 of file manager.hpp.

◆ prev

ExternalSourcesFromFile* plask::Manager::ExternalSourcesFromFile::prev

Names of files from which current section is read (detect circular reference).

Definition at line 82 of file manager.hpp.


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