OSFI-C++  3.11.0
OpenSF Integration Library
CLP.h
Go to the documentation of this file.
1 /*
2  * openSF Integration Libraries (OSFI)
3  * Deimos Space, S.L.U.
4  *
5  * This file is part of OSFI. OSFI is free software; you can redistribute it
6  * and/or modify it under the terms of the 'ESA Software Community Licence Permissive' as
7  * published by the European Space Agency; either version 2.4 of the License,
8  * or (at your option) any later version. You should have received a
9  * copy of the 'ESA Software Community Licence Permissive - v2.4' along with this program
10  * or one can be found at <http://eop-cfi.esa.int/index.php/docs-and-mission-data/licensing-documents>.
11  */
12 
17 #ifndef OSFI_CLP_H
18 #define OSFI_CLP_H
19 
20 #include <string>
21 #include <list>
22 
71 class CLP {
72  std::string confFile; // Unparsed value of argv[1]
73  std::list<std::string> confFiles; // Tokenized value of argv[1]
74  std::list<std::string> inputFiles; // Tokenized value of argv[2]
75  std::list<std::string> outputFiles; // Tokenized value of argv[3]
76 
80  static constexpr char FILE_DELIM = ',';
81 
87  static std::list<std::string> parseFiles(const char * argv);
88 
95  void parseFlaggedInputs(int argc, char * argv[]);
96 
103  void parsePositionalInputs(int argc, char * argv[]);
104 
105  friend struct CLPTest; // For unit testing purposes
106 
107 public:
114  CLP(int argc, char * argv[]);
115 
119  virtual ~CLP();
120 
126  [[deprecated("Modules with no global configuration file are deprecated")]]
127  std::string getConfFile();
128 
138  std::list<std::string> getConfFiles() const;
139 
141  std::list<std::string> getInputFiles() const;
142 
144  std::list<std::string> getOutputFiles() const;
145 };
146 
147 #endif /*OSFI_CLP_H*/
Definition: CLP.h:71
std::list< std::string > getConfFiles() const
std::list< std::string > getOutputFiles() const
std::string getConfFile()
virtual ~CLP()
std::list< std::string > getInputFiles() const
CLP(int argc, char *argv[])