Class Filenames

Nested Relationships

Nested Types

Class Documentation

class Filenames

Public Types

enum Tag

Values:

enumerator TAG_FIRST
enumerator MAIN_DIR
enumerator MZML_INPUT_PATH
enumerator FEATURES_INPUT_PATH
enumerator FEATURES_OUTPUT_PATH
enumerator INPUT_MZML_FILENAME
enumerator INPUT_INJECTION_NAME
enumerator OUTPUT_INJECTION_NAME
enumerator INPUT_SEQUENCE_SEGMENT_NAME
enumerator OUTPUT_SEQUENCE_SEGMENT_NAME
enumerator INPUT_GROUP_NAME
enumerator OUTPUT_GROUP_NAME
enumerator TAG_LAST

Public Functions

void addFileName(const std::string &id, const std::string &name_pattern, const std::string &description = "", bool embeddable = false, bool default_embedded = false, bool overwrite = false)

Adds file to the Filename.

std::filesystem::path getFullPath(const std::string &id) const

Returns the full path, with root path and variant applied (or the overridden full path).

std::filesystem::path getNamePattern(const std::string &id) const

Returns name pattern of the file.

bool isEmbeddable(const std::string &id) const

Returns true if the file can be embedded into the session db.

void setFullPath(const std::string &id, const std::filesystem::path &full_path)

Sets the ful path name, overriding computation using variant and root path.

void merge(const Filenames &other)

Merges two Filenames. Will not overwrite file that already exists.

std::vector<std::string> getFileIds() const

returns registered file ids.

void setTagValue(Tag tag, const std::string &value)

set tags and update paths.

std::string getTagValue(Tag tag) const

get tag value.

std::map<std::string, Filenames::Tag> getTagNames() const
Returns

list of tag names and there corresponding enum

std::string getDescription(const std::string &file_id) const

get description of the file.

void setEmbedded(const std::string &id, bool embedded)

set file as embedded in a database.

bool isEmbedded(const std::string &id) const

get embedded flag.

inline SessionDB &getSessionDB()

get the session database instance.

void log() const

log content of this instance

Protected Functions

void updateFullPaths()
void updateFullPath(FileName &filename)

Protected Attributes

std::map<std::string, FileName> file_names_
std::map<Tag, std::string> tags_
SessionDB session_db_

Protected Static Attributes

static std::map<std::string, Tag> string_to_tag_

Friends

friend class Filenames
struct FileName

Public Members

std::string name_pattern_
std::string description_
bool embeddable_ = false
bool embedded_ = false
std::filesystem::path full_path_
bool full_path_override_ = false