Example program to test CRC evaluation (see JCRC.hh).
More...
#include <iostream>
#include <string>
#include "JLang/JCRC.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
Go to the source code of this file.
|
void | fun (const std::string &value) |
| User function.
|
|
int | main (int argc, char **argv) |
|
Example program to test CRC evaluation (see JCRC.hh).
- Author
- mdejong
Definition in file JCRC.cc.
◆ fun()
void fun |
( |
const std::string & | value | ) |
|
|
inline |
User function.
- Parameters
-
Definition at line 13 of file JCRC.cc.
14{
17
19
21 cout << "aap";
22 break;
23
25 cout << "noot";
26 break;
27
29 cout << "mies";
30 break;
31
32 default:
33 cout << "default";
34 break;
35 }
36}
constexpr size_t crc(const char(&buffer)[N])
Get CRC value at compile time.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
◆ main()
int main |
( |
int | argc, |
|
|
char ** | argv ) |
Definition at line 45 of file JCRC.cc.
46{
49
51
52 try {
53
54 JParser<> zap(
"Example program to test CRC evaluation.");
55
57
58 zap(argc, argv);
59 }
60 catch(const exception &error) {
61 FATAL(error.what() << endl);
62 }
63
64 for (string str : { "aap", "noot", "mies", "hello" }) {
65
66 cout << "test \"" << str << "\" -> ";
67
69
70 cout << endl;
71 }
72}
void fun(const std::string &value)
User function.
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Utility class to parse command line options.