70 arg_desc->SetUsageContext(
GetArguments().GetProgramBasename(),
73 arg_desc->AddPositional(
"cache_path",
77 arg_desc->AddPositional(
"cache_name",
81 arg_desc->AddOptionalKey(
"errfile",
83 "File to dump error messages",
86 arg_desc->AddFlag(
"fr",
"Force environment remove");
100 const string& cache_path = args[
"cache_path"].AsString();
101 const string& cache_name = args[
"cache_name"].AsString();
103 const char* err_file = 0;
104 if (args[
"errfile"]) {
105 err_file = args[
"errfile"].AsString().c_str();
108 bool fr = args[
"fr"];
111 cache.
Verify(cache_path.c_str(), cache_name.c_str(), err_file, fr);
116 NcbiCerr <<
"Error: DBD errno exception:" << ex.what();
121 NcbiCerr <<
"Error: DBD library exception:" << ex.what();
129 int main(
int argc,
const char* argv[])
ICache interface implementation on top of Berkeley DB.
int main(int argc, const char *argv[])
Exception specifications for BDB library.
BDB cache verify application.
void Init(void)
Initialize the application.
int Run(void)
Run the application.
BDB cache implementation.
BDB errno exception class.
The NCBI C++ standard methods for dealing with std::string.
virtual const CArgs & GetArgs(void) const
Get parsed command line arguments.
int AppMain(int argc, const char *const *argv, const char *const *envp=0, EAppDiagStream diag=eDS_Default, const char *conf=NcbiEmptyCStr, const string &name=NcbiEmptyString)
Main function (entry point) for the NCBI application.
virtual void SetupArgDescriptions(CArgDescriptions *arg_desc)
Setup the command line argument descriptions.
const CNcbiArguments & GetArguments(void) const
Get the application's cached unprocessed command-line arguments.
@ eString
An arbitrary string.
void Verify(const string &cache_path, const string &cache_name, const string &err_file=0, bool force_remove=false)
Run verification of the cache database.
Defines the CNcbiApplication and CAppException classes for creating NCBI applications.
Defines command line argument related classes.
Defines unified interface to application:
Process information in the NCBI Registry, including working with configuration files.