OnixS C++ ICE Binary Order Entry Handler 1.1.1
API Documentation
Loading...
Searching...
No Matches
SbeLogDecoder.cpp File Reference

Go to the source code of this file.

Functions

int main (int argc, char *argv[])

Function Documentation

◆ main()

int main ( int argc,
char * argv[] )

Definition at line 150 of file SbeLogDecoder.cpp.

151{
152 // `--help` to show options.
153 const Samples::AppConfiguration<Samples::InputLogFileConfiguration> cfg{"SbeLogDecoder", argc, argv};
154
155 const auto location = cfg.location();
156
157 if(!Filesystem::exist(location))
158 {
159 std::cerr << "'" + location + "'" + " does not exist.";
160 return 1;
161 }
162
163 std::vector<std::string> inputFiles;
164 gatherFiles(inputFiles, location);
165
166 const FileDecoder decoder =
167 std::for_each(inputFiles.begin(), inputFiles.end(), FileDecoder());
168
169 std::clog << decoder.messagesCount() << " messages in " << decoder.filesCount() << " file(s) are decoded." << std::endl << std::endl;
170
171 return 0;
172}
bool exist(const std::string &entry)
void gatherFiles(std::vector< std::string > *gatheredFiles, const std::string &root, const std::string &extension)
Gathers files which are stored in a given folder.