12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- #ifndef UTILS_H
- #define UTILS_H
- #include <vector>
- #include <iostream>
- #include "RtMidi.h"
- #include <json/json.h>
- #include "error.h"
- typedef std::vector<unsigned char> MidiRawMessage;
- std::string str(int x, const char* format="%d");
- std::string str(const MidiRawMessage& x);
- bool start_with(const std::string& s1, const std::string& s2, bool ignoreCase=false);
- Json::Value json_parse_file(const std::string& filename);
- class Fs {
- public:
- static bool is_file(const std::string&);
- static bool is_dir(const std::string&);
- static bool is_file_exists(const std::string&, int);
- static bool exists(const std::string&);
- static bool remove(const std::string&);
- };
- class Args
- {
- public:
- Args(int ac, char** argv);
- virtual ~Args(){}
- std::string config_file;
- std::string pad_file;
- std::string override_app_dir;
- std::string override_pad_dir;
- bool continue_app;
- bool use_stdin;
- bool use_pipe;
- std::string use_pipe_filename;
- bool use_socket;
- int use_socket_port;
- bool keep_alive;
- };
- #endif // UTILS_H
|