Feel++ 0.111.0-preview.14
Finite Element Embedded Library in C++
Feel::Repository Class Reference

@ structure to handle repository of results More...

+ Collaboration diagram for Feel::Repository:

Classes

struct  Config
 
struct  Dist
 
struct  Owner
 

Public Member Functions

Repository & cd ()
 change directory to current configuration More...
 
Config & config ()
 get the configuration of the repository More...
 
Config const & config () const
 get the configuration of the repository More...
 
Repository & configure ()
 configure the repository directories based on Config
 
Repository & configure (fs::path const &d)
 configure for a given directory More...
 
Repository & configure (fs::path const &d, Location const &l)
 configure for a given directory More...
 
Repository & configure (nl::json const &j)
 configure for a json configuration More...
 
fs::path directory () const
 the result repository absolute directory More...
 
fs::path directoryWithoutAppenders () const
 the result repository absolute directory without appenders More...
 
fs::path const & exprs () const
 get the expressions directory The expressions directory contains c++ and plugins associated with the expressions More...
 
fs::path const & geo () const
 get the geo directory The geo directory contains geo files of Gmsh More...
 
fs::path const & globalRoot () const
 
bool isAbsolute () const
 
bool isConfigured () const noexcept
 check if the repository is configured More...
 
bool isCustom () const
 
bool isGit () const
 
bool isGlobal () const
 
bool isLocal () const
 
bool isRelative () const
 
fs::path const & logs () const
 get the logs directory The logs directory contains feelpp apps log files More...
 
fs::path relativeDirectory () const
 the result repository directory relative to root More...
 
 Repository (Config c)
 
fs::path const & root () const
 
std::string userEmail () const
 the user email More...
 
std::string userName () const
 the user name More...
 
bool verifyDirectoriesExist (std::string const &caller_info="") const
 Verify that all repository directories exist. More...
 

Detailed Description

@ structure to handle repository of results

Member Function Documentation

◆ cd()

Repository & Feel::Repository::cd ( )

change directory to current configuration

Returns
Repository& return the current directory

◆ config() [1/2]

Config & Feel::Repository::config ( )

get the configuration of the repository

Returns
Config &

◆ config() [2/2]

Config const & Feel::Repository::config ( ) const

get the configuration of the repository

Returns
Config const&

◆ configure() [1/3]

Repository & Feel::Repository::configure ( fs::path const &  d)

configure for a given directory

Parameters
ddirectory path

◆ configure() [2/3]

Repository & Feel::Repository::configure ( fs::path const &  d,
Location const &  l 
)

configure for a given directory

Parameters
ddirectory path
ltype of location

◆ configure() [3/3]

Repository & Feel::Repository::configure ( nl::json const &  j)

configure for a json configuration

Parameters
jjson file to configure the repo

◆ directory()

fs::path Feel::Repository::directory ( ) const

the result repository absolute directory

Returns
fs::path

References relativeDirectory(), and root().

◆ directoryWithoutAppenders()

fs::path Feel::Repository::directoryWithoutAppenders ( ) const

the result repository absolute directory without appenders

Returns
fs::path

References isAbsolute(), and root().

◆ exprs()

fs::path const & Feel::Repository::exprs ( ) const

get the expressions directory The expressions directory contains c++ and plugins associated with the expressions

Returns
get the exprs directory of the repository

◆ geo()

fs::path const & Feel::Repository::geo ( ) const

get the geo directory The geo directory contains geo files of Gmsh

Returns
get the geo directory of the repository

◆ globalRoot()

fs::path const & Feel::Repository::globalRoot ( ) const
Returns
get the global root repository associated to the global location

◆ isAbsolute()

bool Feel::Repository::isAbsolute ( ) const
Returns
true if repository is absolute, false otherwise

Referenced by directoryWithoutAppenders().

◆ isConfigured()

bool Feel::Repository::isConfigured ( ) const
noexcept

check if the repository is configured

Returns
true if repository is configured, false otherwise

◆ isCustom()

bool Feel::Repository::isCustom ( ) const
Returns
true if repository uses a custom location callback, false otherwise

◆ isGit()

bool Feel::Repository::isGit ( ) const
Returns
true if repository is relative to a git repository, false otherwise

◆ isGlobal()

bool Feel::Repository::isGlobal ( ) const
Returns
true if repository is global, false otherwise

◆ isLocal()

bool Feel::Repository::isLocal ( ) const
Returns
true if repository is local, false otherwise

◆ isRelative()

bool Feel::Repository::isRelative ( ) const
Returns
true if repository is local, false otherwise

◆ logs()

fs::path const & Feel::Repository::logs ( ) const

get the logs directory The logs directory contains feelpp apps log files

Returns
get the logs directory of the repository

◆ relativeDirectory()

fs::path Feel::Repository::relativeDirectory ( ) const

the result repository directory relative to root

Returns
fs::path

Referenced by directory().

◆ root()

fs::path const & Feel::Repository::root ( ) const
Returns
get the root of the repository where the results will be stored

Referenced by directory(), and directoryWithoutAppenders().

◆ userEmail()

std::string Feel::Repository::userEmail ( ) const

the user email

Returns
std::string

Referenced by BOOST_AUTO_TEST_CASE().

◆ userName()

std::string Feel::Repository::userName ( ) const

the user name

Returns
std::string

Referenced by BOOST_AUTO_TEST_CASE().

◆ verifyDirectoriesExist()

bool Feel::Repository::verifyDirectoriesExist ( std::string const &  caller_info = "") const

Verify that all repository directories exist.

This function checks that root, geo, logs, results, and exprs directories have been created. It's useful for debugging to find where directory access happens before creation.

Parameters
caller_infoOptional string describing where this check is called from
Returns
true if all directories exist, false otherwise