Observation
|
#include <Label_Patcher.hh>
Classes | |
struct | Database_Configuration |
Public Member Functions | |
Label_Patcher (int count, char **arguments) | |
idaeim::PVL::Parameter * | label_parameter (const std::string &pathname) |
void | configure_database () |
void | connect_to_database () |
std::string | database_field_value (const std::string &field, const std::string &key, const std::string &table="") |
std::string | database_configuration_report () |
std::string | database_connection_report () |
void | disconnect_from_database () |
int | apply_patch () |
Public Attributes | |
bool | Backup |
bool | Force |
bool | Verbose |
std::string | Input_Pathname |
std::ifstream * | Input_File |
idaeim::PVL::Aggregate * | PDS_Label |
idaeim::PVL::Lister | PDS_Label_Lister |
PDS formatting of PVL. More... | |
idaeim::PVL::Parameter * | Label_Size_Parameter |
std::string | Observation_ID |
The Observation ID value used to select a database record. More... | |
struct UA::HiRISE::Label_Patcher::Database_Configuration | Database_Configuration_Values |
Static Public Attributes | |
static const char *const | ID |
Class identification name with source code version and date. More... | |
static const char *const | PDS_VERSION_ID_PARAMETER = "PDS_VERSION_ID" |
Names of parameters to be accessed. More... | |
static const char *const *const | OBSERVATION_ID_PARAMETER = "OBSERVATION_ID" |
static const char *const | LABEL_RECORDS_PARAMETER = "LABEL_RECORDS" |
Names of parameters that will have values changed if label size changes. More... | |
static const char *const | DATA_LOCATION_PREFIX = '^' |
static const char *const | LOOKUP_CONVERSION_TABLE = "MRO:LOOKUP_CONVERSION_TABLE" |
Names of parameters requiring ad hoc formatting adjustment. More... | |
static const char *const | DATABASE_TYPE = "MySQL" |
Database access configuration parameters. More... | |
static const char *const *const | TYPE_PARAMETER = "Type" |
static const char *const *const *const | SERVER_PARAMETER = "Server" |
static const char *const *const *const *const | HOST_PARAMETER = "Host" |
static const char *const *const *const *const *const | USER_PARAMETER = "User" |
static const char *const *const *const *const *const *const | PASSWORD_PARAMETER = "Password" |
static const char *const *const *const *const *const *const *const | CATALOG_PARAMETER = "Catalog" |
static const char *const *const *const *const *const *const *const *const | TABLE_PARAMETER = "Table" |
static const char *const | OBSERVATION_ID_FIELD = "COMMANDED_ID" |
Database field names. More... | |
static const int | SUCCESS = 0 |
Exit status values. More... | |
static const int | BAD_SYNTAX = 1 |
static const int | CONFIGURATION_FAILURE = 2 |
static const int | DATABASE_ERROR = 3 |
static const int | INVALID_ARGUMENT = 11 |
static const int | LENGTH_ERROR = 12 |
static const int | UNDERFLOW_ERROR = 13 |
static const int | OUT_OF_RANGE = 14 |
static const int | LOGIC_ERROR = 19 |
static const int | NO_INPUT_FILE = 20 |
static const int | NO_OUTPUT_FILE = 21 |
static const int | NO_PVL_FILE = 23 |
static const int | IO_FAILURE = 29 |
static const int | PVL_ERROR = 30 |
static const int | UNKNOWN_ERROR = -1 |
Label_Patcher | ( | int | count, |
char ** | arguments | ||
) |
References Label_Patcher::Backup, Lister::begin_aggregates(), Label_Patcher::Database_Configuration::Catalog, Label_Patcher::Database_Configuration::Configuration_Pathname, Label_Patcher::Database_Configuration_Values, DEFAULT_CONFIGURATION_FILENAME, file_pathname(), Label_Patcher::Force, Label_Patcher::ID, Label_Patcher::Input_File, Label_Patcher::Input_Pathname, Label_Patcher::LABEL_RECORDS_PARAMETER, Label_Patcher::Label_Size_Parameter, Label_Patcher::NO_INPUT_FILE, Label_Patcher::OBSERVATION_ID_PARAMETER, Label_Patcher::PDS_Label, Label_Patcher::PDS_Label_Lister, Label_Patcher::PDS_VERSION_ID_PARAMETER, Label_Patcher::PVL_ERROR, UA::HiRISE::PVL_parameter(), Aggregate::read(), Label_Patcher::Database_Configuration::Server, Lister::strict(), Label_Patcher::SUCCESS, Label_Patcher::Database_Configuration::Table, usage(), Parameter::value(), and Label_Patcher::Verbose.
idaeim::PVL::Parameter * label_parameter | ( | const std::string & | pathname | ) |
References UA::HiRISE::pathname(), Label_Patcher::PDS_Label, and UA::HiRISE::PVL_parameter().
Referenced by main().
void configure_database | ( | ) |
References UA::HiRISE::AGGREGATE_PARAMETER, Label_Patcher::Database_Configuration::Catalog, Label_Patcher::CATALOG_PARAMETER, Label_Patcher::Database_Configuration::Configuration_Pathname, Label_Patcher::Database_Configuration_Values, Label_Patcher::DATABASE_TYPE, DEFAULT_DATABASE_CATALOG, DEFAULT_DATABASE_HOST, DEFAULT_DATABASE_TABLE, UA::HiRISE::file_exists(), file_pathname(), home_directory_pathname(), Label_Patcher::Database_Configuration::Host, Label_Patcher::HOST_PARAMETER, Parameter::name(), Label_Patcher::Database_Configuration::Password, Label_Patcher::PASSWORD_PARAMETER, UA::HiRISE::PVL_parameter(), UA::HiRISE::PVL_values(), Aggregate::read(), Label_Patcher::Database_Configuration::Server, Label_Patcher::SERVER_PARAMETER, Label_Patcher::Database_Configuration::Table, Label_Patcher::TABLE_PARAMETER, Label_Patcher::TYPE_PARAMETER, Label_Patcher::Database_Configuration::User, Label_Patcher::USER_PARAMETER, and username().
Referenced by Label_Patcher::connect_to_database().
void connect_to_database | ( | ) |
References Label_Patcher::Database_Configuration::Catalog, Label_Patcher::configure_database(), Label_Patcher::Database_Configuration_Values, Label_Patcher::Database_Configuration::Host, Label_Patcher::Database_Configuration::Password, and Label_Patcher::Database_Configuration::User.
Referenced by Label_Patcher::database_field_value(), and main().
std::string database_field_value | ( | const std::string & | field, |
const std::string & | key, | ||
const std::string & | table = "" |
||
) |
string database_configuration_report | ( | ) |
References Label_Patcher::Database_Configuration_Values.
Referenced by main().
string database_connection_report | ( | ) |
Referenced by main().
void disconnect_from_database | ( | ) |
Referenced by main().
int apply_patch | ( | ) |
References Label_Patcher::Backup, BACKUP_FILENAME_SUFFIX, Aggregate::begin_depth(), Label_Patcher::DATA_LOCATION_PREFIX, Aggregate::end_depth(), UA::HiRISE::file_exists(), Parameter::indenting(), Label_Patcher::Input_File, Label_Patcher::Input_Pathname, Label_Patcher::IO_FAILURE, Label_Patcher::Label_Size_Parameter, Label_Patcher::LOOKUP_CONVERSION_TABLE, Parameter::name(), Label_Patcher::NO_OUTPUT_FILE, Label_Patcher::PDS_Label, Label_Patcher::PDS_Label_Lister, UA::HiRISE::PVL_parameter(), Lister::reset_total(), Label_Patcher::SUCCESS, Lister::total(), Parameter::value(), and Label_Patcher::Verbose.
Referenced by main().
|
static |
Class identification name with source code version and date.
Referenced by Label_Patcher::Label_Patcher().
|
static |
Names of parameters to be accessed.
Referenced by Label_Patcher::Label_Patcher().
|
static |
Referenced by Label_Patcher::Label_Patcher().
|
static |
Names of parameters that will have values changed if label size changes.
Referenced by Label_Patcher::Label_Patcher(), and usage().
|
static |
Referenced by Label_Patcher::apply_patch(), and usage().
|
static |
Names of parameters requiring ad hoc formatting adjustment.
Referenced by Label_Patcher::apply_patch().
|
static |
Database access configuration parameters.
Referenced by Label_Patcher::configure_database().
|
static |
Referenced by Label_Patcher::configure_database().
|
static |
Referenced by Label_Patcher::configure_database().
|
static |
Referenced by Label_Patcher::configure_database().
|
static |
Referenced by Label_Patcher::configure_database().
|
static |
Referenced by Label_Patcher::configure_database().
|
static |
Referenced by Label_Patcher::configure_database().
|
static |
Referenced by Label_Patcher::configure_database().
|
static |
Database field names.
|
static |
Exit status values.
Referenced by Label_Patcher::apply_patch(), and Label_Patcher::Label_Patcher().
|
static |
Referenced by usage().
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Referenced by Label_Patcher::Label_Patcher().
|
static |
Referenced by Label_Patcher::apply_patch().
|
static |
|
static |
Referenced by Label_Patcher::apply_patch().
|
static |
Referenced by Label_Patcher::Label_Patcher().
|
static |
bool Backup |
Referenced by Label_Patcher::apply_patch(), and Label_Patcher::Label_Patcher().
bool Force |
Referenced by Label_Patcher::Label_Patcher(), and main().
bool Verbose |
Referenced by Label_Patcher::apply_patch(), Label_Patcher::Label_Patcher(), and main().
std::string Input_Pathname |
Referenced by Label_Patcher::apply_patch(), and Label_Patcher::Label_Patcher().
std::ifstream* Input_File |
Referenced by Label_Patcher::apply_patch(), and Label_Patcher::Label_Patcher().
idaeim::PVL::Aggregate* PDS_Label |
Referenced by Label_Patcher::apply_patch(), Label_Patcher::label_parameter(), and Label_Patcher::Label_Patcher().
idaeim::PVL::Lister PDS_Label_Lister |
PDS formatting of PVL.
Referenced by Label_Patcher::apply_patch(), and Label_Patcher::Label_Patcher().
idaeim::PVL::Parameter* Label_Size_Parameter |
Referenced by Label_Patcher::apply_patch(), and Label_Patcher::Label_Patcher().
std::string Observation_ID |
The Observation ID value used to select a database record.
Referenced by main().
struct UA::HiRISE::Label_Patcher::Database_Configuration Database_Configuration_Values |