CosmoBolognaLib
Free Software C++/Python libraries for cosmological calculations
cbl::Path Class Reference

The class Path. More...

#include <Path.h>

Public Member Functions

Constructors/destructors
 Path ()
 default constructor
 
 ~Path ()=default
 default destructor
 
std::string DirCosmo ()
 get the directory where the CosmoBolognaLbi are stored More...
 
std::string DirLoc ()
 get the local directory More...
 
void SetDirs (const std::string input_DirCosmo, const std::string input_DirLoc="./")
 set the default directories More...
 
std::string fullpath (std::string path, const bool isDir=true)
 substitute ~ with the full path More...
 

Private Attributes

std::string m_DirCosmo
 directory where the CosmoBolognaLib are stored
 
std::string m_DirLoc
 local directory of the main code
 

Detailed Description

The class Path.

This class defines the interface of the class Path, used to handle the Cosmobolognalib main paths

Examples
model_cosmology.cpp.

Definition at line 144 of file Path.h.

Member Function Documentation

◆ DirCosmo()

std::string cbl::Path::DirCosmo ( )
inline

get the directory where the CosmoBolognaLbi are stored

Returns
m_DirCosmo, that is the directory where the CosmoBolognaLbi are stored
Examples
model_cosmology.cpp.

Definition at line 178 of file Path.h.

◆ DirLoc()

std::string cbl::Path::DirLoc ( )
inline

get the local directory

Returns
m_DirLoc, that is the local directory

Definition at line 185 of file Path.h.

◆ fullpath()

std::string cbl::Path::fullpath ( std::string  path,
const bool  isDir = true 
)

substitute ~ with the full path

Parameters
paththe relative path
isDirtrue \(\rightarrow\) directory path, false \(\rightarrow\) otherwise
Returns
std::string containing the full path

Definition at line 45 of file Path.cpp.

◆ SetDirs()

void cbl::Path::SetDirs ( const std::string  input_DirCosmo,
const std::string  input_DirLoc = "./" 
)
inline

set the default directories

Parameters
input_DirCosmodirectory where the CosmoBolognaLib are stored
input_DirLoclocal directory of the main code

Definition at line 195 of file Path.h.


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