Header of a study.
More...
#include <header.h>
|
Yuni::String | caption |
| Caption of the study.
|
|
StudyVersion | version |
| Format version.
|
|
time_t | dateCreated |
| Date: Creation (timestamp)
|
|
time_t | dateLastSave |
| Date: Last save (timestamp)
|
|
Yuni::String | author |
| Author.
|
|
static StudyVersion | tryToFindTheVersion (const std::string &folder) |
| Try to determine the version of a study.
|
|
| StudyHeader () |
| Default constructor.
|
|
| ~StudyHeader ()=default |
| Destructor.
|
|
void | reset () |
| Reset the values.
|
|
bool | loadFromFile (const std::filesystem::path &filename, bool warnings=true) |
| Load a study header from a file.
|
|
bool | saveToFile (const AnyString &filename, bool upgradeVersion=true) |
| Save a study header into a file.
|
|
void | CopySettingsToIni (IniFile &ini, bool upgradeVersion) |
| Copy the internal settings into an INI structure.
|
|
bool | validateVersion () |
|
◆ loadFromFile()
bool Antares::Data::StudyHeader::loadFromFile |
( |
const std::filesystem::path & | filename, |
|
|
bool | warnings = true ) |
Load a study header from a file.
- Parameters
-
filename | The target filename |
warnings | Enable warnings/errors |
- Returns
- True if the operation succeeded, false otherwise
◆ readVersionFromFile()
bool Antares::Data::StudyHeader::readVersionFromFile |
( |
const std::filesystem::path & | filename, |
|
|
std::string & | version ) |
|
static |
Get the version of a header.
- Parameters
-
filename | The filename to read |
- Returns
- The version of the study, or 0 if unknown (invalid header)
◆ saveToFile()
bool Antares::Data::StudyHeader::saveToFile |
( |
const AnyString & | filename, |
|
|
bool | upgradeVersion = true ) |
Save a study header into a file.
The property version
will be upgraded to the last available and dateLastSave
as well.
- Parameters
-
filename | The target filename |
- Returns
- True if the operation succeeded, false otherwise
◆ tryToFindTheVersion()
StudyVersion Antares::Data::StudyHeader::tryToFindTheVersion |
( |
const std::string & | folder | ) |
|
|
static |
Try to determine the version of a study.
- Parameters
-
folder | The folder where data are located |
- Returns
- The version of the study.
unknown
if not found
The documentation for this class was generated from the following files:
- src/libs/antares/study/include/antares/study/header.h
- src/libs/antares/study/header.cpp