sjef
|
Classes | |
class | Locker |
A thread-safe class for an inter-thread/inter-process lock. The lock mechanism is based on a locked file in the file system. The locked file is a file that may or may not already exist; if it doesn't, it is created. The file contents are not altered, and the file is not deleted. If the specified file is a directory, the lock is instead made on a file in that directory. All threads in the same process using the locker must do so through the same Locker object. More... | |
class | Logger |
class | Project |
class | runtime_error |
Typedefs | |
using | mapstringstring_t = std::map< std::string, std::string > |
Enumerations | |
enum | status : int { unknown = 0, running = 1, waiting = 2, completed = 3, unevaluated = 4, killed = 5 } |
Functions | |
template<typename Arg > | |
std::ostream & | operator<< (const Logger &l, Arg arg) |
bool | check_backends (const std::string &suffix) |
Check whether a backend specification file is valid. Only the top-level structure of the file is checked, to the point where it could be opened and used in a Project. More... | |
std::filesystem::path | expand_path (const std::filesystem::path &path, const std::string &suffix="") |
Edit a file path name. More... | |
std::string | xmlRepair (const std::string &source, const mapstringstring_t &injections={}) |
Repair an xml dataset by completing any open tags. More... | |
std::string | version () noexcept |
Report the software version. More... | |
using sjef::mapstringstring_t = typedef std::map<std::string, std::string> |
enum sjef::status : int |
bool sjef::check_backends | ( | const std::string & | suffix | ) |
Check whether a backend specification file is valid. Only the top-level structure of the file is checked, to the point where it could be opened and used in a Project.
suffix | /usr/local/etc/sjef/suffix/backends.xml and ~/.sjef/suffix/backends.xml will be checked |
std::filesystem::path sjef::expand_path | ( | const std::filesystem::path & | path, |
const std::string & | suffix = "" |
||
) |
Edit a file path name.
path | |
suffix | If given and not empty, if path does not end with this file suffix, append it |
std::ostream& sjef::operator<< | ( | const Logger & | l, |
Arg | arg | ||
) |
|
noexcept |
Report the software version.
std::string sjef::xmlRepair | ( | const std::string & | source, |
const mapstringstring_t & | injections = {} |
||
) |
Repair an xml dataset by completing any open tags.
source | The initial xml |
injections | xml nodes for which additional place-holder xml should be injected if the node has to be completed. The key is the node name, and the value the xml to be injected |