Scyllarus: C++ Hyperspectral Processing Library
Hyperspectral Image Processing Pipeline
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
scylver.h
Go to the documentation of this file.
1 /****************************************************************************************
2  * SCYLLARUS : C++ HYPERSPECTRAL PROCESSING LIBRARY
3  * version.h - Scyllarus Version Utility.
4  *
5  * This computer code is subject to copyright:
6  * (c) National ICT Australia Limited (NICTA) 2013-2014 All Rights Reserved.
7  *
8  * Jeremy Oorloff, National ICT Australia (NICTA)
9  *
10  ***************************************************************************************/
11 
12 #ifndef SCYLVER_H_
13 #define SCYLVER_H_
14 
15 #include <armadillo>
16 #include <sstream>
17 #include "logger.h"
18 
19 namespace scyl
20 {
21  const int VERSION_MAJOR = 1;
22  const int VERSION_MINOR = 0;
23  const int VERSION_SUB = 3;
24  const float VERSION_FLOAT = 1.03f;
25  //const std::string version_string = "[1.0.3]";
26 
27 
32  template <class T> void version(T & in)
33  {
34  in = VERSION_FLOAT;
35  }
36 
37 
42  template <class T> void version(arma::Mat<T> & in)
43  {
44  in.fill(VERSION_FLOAT);
45  }
46 
47 
52  inline std::string version_string()
53  {
54  std::stringstream out;
55  out << "[" << VERSION_MAJOR << "." << VERSION_MINOR << "." << VERSION_SUB << "]";
56  return out.str();
57  }
58 
59 
63  inline void print_version()
64  {
65  *scyl::logger::access() << "#> SCYLLARUS : C++ HYPERSPECTRAL PROCESSING LIBRARY <#" << scyl::logger::endl()
66  << " Version " << version_string() << scyl::logger::endl()
67  << "#> <#" << scyl::logger::endl()
68  << "#> (c) National ICT Australia Limited (NICTA) <#" << scyl::logger::endl()
69  << "#> 2013-2015 All Rights Reserved. <#" << scyl::logger::endl()
70  << "#> http://feedback.scyllar.us <#" << scyl::logger::endl()
71  << scyl::logger::endl();
72  }
73 
74 }
75 #endif /* SCYLVER_H_ */
const int VERSION_MAJOR
Definition: scylver.h:21
std::string version_string()
Get the version number formatted as a string [Major.Minor.Sub(release)].
Definition: scylver.h:52
static std::string endl()
Definition: logger.h:56
const int VERSION_MINOR
Definition: scylver.h:22
void version(T &in)
Get the version number of Scyllarus (Casted from Float (Major.MinorSub)
Definition: scylver.h:32
static logger * access()
Logger access function is used to access the logger object.
Definition: logger.cpp:55
const float VERSION_FLOAT
Definition: scylver.h:24
const int VERSION_SUB
Definition: scylver.h:23
void print_version()
Print Scyllarus information/copyright banner with version information.
Definition: scylver.h:63