49 public: |
49 public: |
50 |
50 |
51 static const relpipe::common::type::StringX OPTION_CLIENT; |
51 static const relpipe::common::type::StringX OPTION_CLIENT; |
52 static const relpipe::common::type::StringX OPTION_PORT; |
52 static const relpipe::common::type::StringX OPTION_PORT; |
53 static const relpipe::common::type::StringX OPTION_CONNECT_TO; |
53 static const relpipe::common::type::StringX OPTION_CONNECT_TO; |
|
54 static const relpipe::common::type::StringX OPTION_CONNECT_PORTS; |
|
55 static const relpipe::common::type::StringX OPTION_DISCONNECT_PORTS; |
54 static const relpipe::common::type::StringX OPTION_REQUIRED_CONNECTIONS; |
56 static const relpipe::common::type::StringX OPTION_REQUIRED_CONNECTIONS; |
55 static const relpipe::common::type::StringX OPTION_LIST_PORTS; |
57 static const relpipe::common::type::StringX OPTION_LIST_PORTS; |
56 static const relpipe::common::type::StringX OPTION_LIST_CONNECTIONS; |
58 static const relpipe::common::type::StringX OPTION_LIST_CONNECTIONS; |
57 static const relpipe::common::type::StringX OPTION_LIST_MIDI_MESSAGES; |
59 static const relpipe::common::type::StringX OPTION_LIST_MIDI_MESSAGES; |
58 |
60 |
66 c.client = readNext(arguments, i); |
68 c.client = readNext(arguments, i); |
67 } else if (option == OPTION_PORT) { |
69 } else if (option == OPTION_PORT) { |
68 c.port = readNext(arguments, i); |
70 c.port = readNext(arguments, i); |
69 } else if (option == OPTION_CONNECT_TO) { |
71 } else if (option == OPTION_CONNECT_TO) { |
70 c.connectTo.push_back(readNext(arguments, i)); |
72 c.connectTo.push_back(readNext(arguments, i)); |
|
73 } else if (option == OPTION_CONNECT_PORTS || option == OPTION_DISCONNECT_PORTS) { |
|
74 c.connectionRecipes.push_back({option == OPTION_CONNECT_PORTS, readNext(arguments, i), readNext(arguments, i)}); |
71 } else if (option == OPTION_REQUIRED_CONNECTIONS) { |
75 } else if (option == OPTION_REQUIRED_CONNECTIONS) { |
72 c.requiredConnections = std::stoi(readNext(arguments, i)); |
76 c.requiredConnections = std::stoi(readNext(arguments, i)); |
73 } else if (option == OPTION_LIST_PORTS) { |
77 } else if (option == OPTION_LIST_PORTS) { |
74 c.listPorts = parseBoolean(readNext(arguments, i)); |
78 c.listPorts = parseBoolean(readNext(arguments, i)); |
75 } else if (option == OPTION_LIST_CONNECTIONS) { |
79 } else if (option == OPTION_LIST_CONNECTIONS) { |
87 }; |
91 }; |
88 |
92 |
89 const relpipe::common::type::StringX CLIParser::OPTION_CLIENT = L"--client"; |
93 const relpipe::common::type::StringX CLIParser::OPTION_CLIENT = L"--client"; |
90 const relpipe::common::type::StringX CLIParser::OPTION_PORT = L"--port"; |
94 const relpipe::common::type::StringX CLIParser::OPTION_PORT = L"--port"; |
91 const relpipe::common::type::StringX CLIParser::OPTION_CONNECT_TO = L"--connect-to"; |
95 const relpipe::common::type::StringX CLIParser::OPTION_CONNECT_TO = L"--connect-to"; |
|
96 const relpipe::common::type::StringX CLIParser::OPTION_CONNECT_PORTS = L"--connect-ports"; |
|
97 const relpipe::common::type::StringX CLIParser::OPTION_DISCONNECT_PORTS = L"--disconnect-ports"; |
92 const relpipe::common::type::StringX CLIParser::OPTION_REQUIRED_CONNECTIONS = L"--required-connections"; |
98 const relpipe::common::type::StringX CLIParser::OPTION_REQUIRED_CONNECTIONS = L"--required-connections"; |
93 const relpipe::common::type::StringX CLIParser::OPTION_LIST_PORTS = L"--list-ports"; |
99 const relpipe::common::type::StringX CLIParser::OPTION_LIST_PORTS = L"--list-ports"; |
94 const relpipe::common::type::StringX CLIParser::OPTION_LIST_CONNECTIONS = L"--list-connections"; |
100 const relpipe::common::type::StringX CLIParser::OPTION_LIST_CONNECTIONS = L"--list-connections"; |
95 const relpipe::common::type::StringX CLIParser::OPTION_LIST_MIDI_MESSAGES = L"--list-midi-messages"; |
101 const relpipe::common::type::StringX CLIParser::OPTION_LIST_MIDI_MESSAGES = L"--list-midi-messages"; |
96 |
102 |