neic-glass3  1.4.6
fileOutput.h
Go to the documentation of this file.
1 /*****************************************
2  * This file is documented for Doxygen.
3  * If you modify this file please update
4  * the comments so that Doxygen will still
5  * be able to work.
6  ****************************************/
7 #ifndef FILEOUTPUT_H
8 #define FILEOUTPUT_H
9 
10 #include <json.h>
11 #include <threadbaseclass.h>
12 #include <output.h>
13 
14 #include <thread>
15 #include <mutex>
16 #include <memory>
17 #include <string>
18 #include <sstream>
19 #include <iostream>
20 #include <fstream>
21 #include <vector>
22 
23 namespace glass3 {
33  public:
40  fileOutput();
41 
52  explicit fileOutput(const std::shared_ptr<const json::Object> &config);
53 
60  ~fileOutput();
61 
72  bool setup(std::shared_ptr<const json::Object> config) override;
73 
80  void clear() override;
81 
88  const std::string getOutputDir();
89 
96  const std::string getOutputFormat();
97 
104  bool getTimestampFileName();
105 
106  protected:
116  void sendOutput(const std::string &type, const std::string &id,
117  const std::string &message) override;
118 
119  private:
124  std::string m_sOutputDir;
125 
130  std::string m_sOutputFormat;
131 
136  std::atomic<bool> m_bTimestampFileName;
137 
142  std::mutex & getMutex();
143 
147  std::mutex m_Mutex;
148 };
149 } // namespace glass3
150 #endif // FILEOUTPUT_H
const std::string getOutputFormat()
Function to retrieve the output format.
Definition: fileOutput.cpp:276
glass fileOutput class
Definition: fileOutput.h:32
void clear() override
fileOutput clear function
Definition: fileOutput.cpp:135
bool setup(std::shared_ptr< const json::Object > config) override
fileOutput configuration function
Definition: fileOutput.cpp:48
void sendOutput(const std::string &type, const std::string &id, const std::string &message) override
fileOutput file writing function
Definition: fileOutput.cpp:148
The neic-glass3 project namespace containing all the classes and functions that make up neic-glass3...
~fileOutput()
fileOutput destructor
Definition: fileOutput.cpp:44
const std::string getOutputDir()
Function to retrieve the output directory.
Definition: fileOutput.cpp:270
glass output class
Definition: output.h:74
fileOutput()
fileOutput constructor
Definition: fileOutput.cpp:18
bool getTimestampFileName()
Get whether to timestamp output file names.
Definition: fileOutput.cpp:282