-
Notifications
You must be signed in to change notification settings - Fork 0
/
LoopVersion.h
65 lines (57 loc) · 2.16 KB
/
LoopVersion.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef __LOOPVERSION_H
#define __LOOPVERSION_H
#define LoopVersionMajor 0
#define LoopVersionMinor 0
#define LoopVersionSub 22
#include <netcdf>
#include <string>
#include "LoopProjectFileUtils.h"
namespace LoopProjectFile
{
/*! \brief A structure containing the version information of the project file */
struct LoopVersion
{
/*! @{ The segmented elements of the project file version */
int majorVersion;
int minorVersion;
int subVersion;
/*!@}*/
bool errored; /*!<A flag indicating an error occured during collection of the version **0 = No Error**, **1 = Error** */
/*! Constructor. Zeros all variables */
LoopVersion()
{
majorVersion = 0;
minorVersion = 0;
subVersion = 0;
errored = true;
}
/*!
* \brief Sets the version attributes of the Loop Project File to the version of this library
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param verbose - a flag to toggle verbose message printing
*
* \return A flag indicating whether the version is set on the project file
*/
static LoopProjectFileResponse SetVersion(netCDF::NcGroup *rootNode, bool verbose = false);
/*!
* \brief Checks the version attributes of the Loop Project File are valid
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param verbose - a flag to toggle verbose message printing
*
* \return A flag indicating whether the version is valid on the project file
*/
static bool CheckVersionValid(netCDF::NcGroup *rootNode, bool verbose = false);
/*!
* \brief Gets the version attributes of the Loop Project File
*
* \param rootNode - the rootNode of the netCDF Loop project file
* \param verbose - a flag to toggle verbose message printing
*
* \return The version of the project file
*/
static LoopVersion GetVersion(netCDF::NcGroup *rootNode, bool verbose = false);
};
} // namespace LoopProjectFile
#endif