|
ORE Studio 0.0.4
|
Manages commands related to countries. More...
#include <countries_commands.hpp>

Static Public Member Functions | |
| static void | register_commands (cli::Menu &root_menu, comms::net::client_session &session) |
| Register country-related commands. | |
| static void | process_get_countries (std::ostream &out, comms::net::client_session &session) |
| Process a get countries request. | |
| static void | process_add_country (std::ostream &out, comms::net::client_session &session, std::string alpha2_code, std::string alpha3_code, std::string numeric_code, std::string name, std::string official_name, std::string change_reason_code, std::string change_commentary) |
| Process an add country request. | |
| static void | process_delete_country (std::ostream &out, comms::net::client_session &session, std::string alpha2_code) |
| Process a delete country request. | |
| static void | process_get_country_history (std::ostream &out, comms::net::client_session &session, std::string alpha2_code) |
| Process a get country history request. | |
Manages commands related to countries.
|
static |
Register country-related commands.
Creates the countries submenu and adds country operations.
|
static |
Process a get countries request.
Retrieves all countries from the server and displays them.
| out | Output stream for results |
| session | Client session for connectivity. |

|
static |
Process an add country request.
Creates a new country with the provided details. The recorded_by field is automatically set from the logged-in user's session.
| out | Output stream for results |
| session | Client session for connectivity. |
| alpha2_code | ISO 3166-1 alpha-2 code (e.g., "US") |
| alpha3_code | ISO 3166-1 alpha-3 code (e.g., "USA") |
| numeric_code | ISO 3166-1 numeric code (e.g., "840") |
| name | Short name of the country |
| official_name | Official name of the country |
| change_reason_code | Code identifying the reason for the change |
| change_commentary | Free-text commentary explaining the change |

|
static |
Process a delete country request.
Deletes a country by its alpha-2 code. Requires authentication.
| out | Output stream for results |
| session | Client session for connectivity. |
| alpha2_code | ISO 3166-1 alpha-2 code of the country to delete |

|
static |
Process a get country history request.
Retrieves the version history for a country by its alpha-2 code.
| out | Output stream for results |
| session | Client session for connectivity. |
| alpha2_code | ISO 3166-1 alpha-2 code of the country |
