diff --git a/catalogue/CmdLineTool.cpp b/catalogue/CmdLineTool.cpp index e70d90ae2b0e7f146c445b6b4ad5196ca4d5333f..129db2af9c9b7774008d7bcf2b4eda3e2f59d83b 100644 --- a/catalogue/CmdLineTool.cpp +++ b/catalogue/CmdLineTool.cpp @@ -67,7 +67,7 @@ std::string CmdLineTool::getHostname() { //------------------------------------------------------------------------------ // main //------------------------------------------------------------------------------ -int CmdLineTool::main(const int argc, char *const *const argv) { +int CmdLineTool::mainImpl(const int argc, char *const *const argv) { bool cmdLineNotParsed = false; std::string errorMessage; diff --git a/catalogue/CmdLineTool.hpp b/catalogue/CmdLineTool.hpp index ff252ed4dbdcc1172ff4650c51dd13a621bd8bea..f4fe18b700593d80b6098e74f9a05d465524dfac 100644 --- a/catalogue/CmdLineTool.hpp +++ b/catalogue/CmdLineTool.hpp @@ -50,7 +50,7 @@ public: * @param argv The command-line arguments. * @return The exit value of the program. */ - int main(const int argc, char *const *const argv); + int mainImpl(const int argc, char *const *const argv); protected: diff --git a/catalogue/CreateAdminUserCmdMain.cpp b/catalogue/CreateAdminUserCmdMain.cpp index f3be76134a88ddbf1758a646d8877399a8538c45..7bc70c375ba26edca1500cae1d034b554544d518 100644 --- a/catalogue/CreateAdminUserCmdMain.cpp +++ b/catalogue/CreateAdminUserCmdMain.cpp @@ -24,5 +24,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::catalogue::CreateAdminUserCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/catalogue/CreateSchemaCmdMain.cpp b/catalogue/CreateSchemaCmdMain.cpp index e66d1b796987807e77d58cb11d7186a6964979a9..583ecc71156fef5e91d4f334615723500fa963fa 100644 --- a/catalogue/CreateSchemaCmdMain.cpp +++ b/catalogue/CreateSchemaCmdMain.cpp @@ -24,5 +24,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::catalogue::CreateSchemaCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/catalogue/DropSchemaCmdMain.cpp b/catalogue/DropSchemaCmdMain.cpp index 8660e2452d3a2938092a1aa0ba36d6fb86805955..36c18f73c3298292d82ba690c370e8592fba6cf9 100644 --- a/catalogue/DropSchemaCmdMain.cpp +++ b/catalogue/DropSchemaCmdMain.cpp @@ -24,5 +24,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::catalogue::DropSchemaCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/catalogue/PollDatabaseCmdMain.cpp b/catalogue/PollDatabaseCmdMain.cpp index dc6c5131f7b943c48b423f88be872f462f9e4bf3..e467bb5bc25bc8d4cfe46cbe2888244852ee6ced 100644 --- a/catalogue/PollDatabaseCmdMain.cpp +++ b/catalogue/PollDatabaseCmdMain.cpp @@ -24,5 +24,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::catalogue::PollDatabaseCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/catalogue/SetProductionCmdMain.cpp b/catalogue/SetProductionCmdMain.cpp index f6f1688b96b315ef880303340dc5813219a281e4..aed4907a8f3549f99e805b7602e3dd07c26519b2 100644 --- a/catalogue/SetProductionCmdMain.cpp +++ b/catalogue/SetProductionCmdMain.cpp @@ -24,5 +24,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::catalogue::SetProductionCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/catalogue/VerifySchemaCmdMain.cpp b/catalogue/VerifySchemaCmdMain.cpp index 3b1a174689c2f52a526677655f507cfee08e8b64..8a2b6ac2e9d51c388d66a91726b3e3fa7b0adc01 100644 --- a/catalogue/VerifySchemaCmdMain.cpp +++ b/catalogue/VerifySchemaCmdMain.cpp @@ -24,5 +24,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::catalogue::VerifySchemaCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClassMain.cpp b/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClassMain.cpp index c0aedff3d1841ec1d5618eb5896c6e37ca923c72..5f154f697f591634cb86c5d0caf4e514194a6a59 100644 --- a/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClassMain.cpp +++ b/cmdline/standalone_cli_tools/change_storage_class/ChangeStorageClassMain.cpp @@ -36,7 +36,7 @@ int main(const int argc, char *const *const argv) { cta::log::StdoutLogger log(hostName, "cta-change-storage-class"); cta::cliTool::ChangeStorageClass cmd(std::cin, std::cout, std::cerr, log); - int ret = cmd.main(argc, argv); + int ret = cmd.mainImpl(argc, argv); // Delete all global objects allocated by libprotobuf google::protobuf::ShutdownProtobufLibrary(); return ret; diff --git a/cmdline/standalone_cli_tools/common/CmdLineTool.cpp b/cmdline/standalone_cli_tools/common/CmdLineTool.cpp index 06ffa3cf42d8a2e5e44c066fe155c609d1fea80c..0f6b3bc5d6f021bd40a39f496a49bf0ace49c837 100644 --- a/cmdline/standalone_cli_tools/common/CmdLineTool.cpp +++ b/cmdline/standalone_cli_tools/common/CmdLineTool.cpp @@ -72,7 +72,7 @@ std::string CmdLineTool::getHostname() { //------------------------------------------------------------------------------ // main //------------------------------------------------------------------------------ -int CmdLineTool::main(const int argc, char *const *const argv) { +int CmdLineTool::mainImpl(const int argc, char *const *const argv) { std::string errorMessage; try { diff --git a/cmdline/standalone_cli_tools/common/CmdLineTool.hpp b/cmdline/standalone_cli_tools/common/CmdLineTool.hpp index 11572320c3737b54243be60f8982a4fcc8ebda2d..8291b3758d46b422bd2db8faf9a1003981ecc1f7 100644 --- a/cmdline/standalone_cli_tools/common/CmdLineTool.hpp +++ b/cmdline/standalone_cli_tools/common/CmdLineTool.hpp @@ -50,7 +50,7 @@ public: * @param argv The command-line arguments. * @return The exit value of the program. */ - int main(const int argc, char *const *const argv); + int mainImpl(const int argc, char *const *const argv); protected: diff --git a/cmdline/standalone_cli_tools/eos_namespace_injection/EosNamespaceInjectionMain.cpp b/cmdline/standalone_cli_tools/eos_namespace_injection/EosNamespaceInjectionMain.cpp index 5515fbd29457b2b761411ddd6fc13122ecd103da..3595fa605501e67817681ed36057de90a06c07dd 100644 --- a/cmdline/standalone_cli_tools/eos_namespace_injection/EosNamespaceInjectionMain.cpp +++ b/cmdline/standalone_cli_tools/eos_namespace_injection/EosNamespaceInjectionMain.cpp @@ -38,7 +38,7 @@ int main(const int argc, char *const *const argv) { cta::log::StdoutLogger log(hostName.value(), "cta-eos-namespace-injection"); cta::cliTool::EosNamespaceInjection cmd(std::cin, std::cout, std::cerr, log); - int ret = cmd.main(argc, argv); + int ret = cmd.mainImpl(argc, argv); // Delete all global objects allocated by libprotobuf google::protobuf::ShutdownProtobufLibrary(); return ret; diff --git a/cmdline/standalone_cli_tools/restore_files/RestoreFilesCmdMain.cpp b/cmdline/standalone_cli_tools/restore_files/RestoreFilesCmdMain.cpp index f22ca7ac5e120bd3f77a00c9eb916d0975d5e630..deccf72a9c0f3a20b4d6761e728e26b0c738aa88 100644 --- a/cmdline/standalone_cli_tools/restore_files/RestoreFilesCmdMain.cpp +++ b/cmdline/standalone_cli_tools/restore_files/RestoreFilesCmdMain.cpp @@ -41,7 +41,7 @@ int main(const int argc, char *const *const argv) { cta::log::StdoutLogger log(hostName, "cta-restore-deleted-files"); cta::cliTool::RestoreFilesCmd cmd(std::cin, std::cout, std::cerr, log); - int ret = cmd.main(argc, argv); + int ret = cmd.mainImpl(argc, argv); // Delete all global objects allocated by libprotobuf google::protobuf::ShutdownProtobufLibrary(); return ret; diff --git a/common/CmdLineTool.cpp b/common/CmdLineTool.cpp index 72bf67e32c2469652b8db21e5fd294ec5bfa0390..2bc7c4c7cbd6e3f7cb7c47232ed1365e75304f4a 100644 --- a/common/CmdLineTool.cpp +++ b/common/CmdLineTool.cpp @@ -67,7 +67,7 @@ std::string CmdLineTool::getHostname() { //------------------------------------------------------------------------------ // main //------------------------------------------------------------------------------ -int CmdLineTool::main(const int argc, char *const *const argv) { +int CmdLineTool::mainImpl(const int argc, char *const *const argv) { bool cmdLineNotParsed = false; std::string errorMessage; diff --git a/common/CmdLineTool.hpp b/common/CmdLineTool.hpp index fdb141f2a9a2cfc31a3a05efd2d9d4de0a8f7411..7a2675a5b9a7b2e3a48c083888cb352f2634fc9b 100644 --- a/common/CmdLineTool.hpp +++ b/common/CmdLineTool.hpp @@ -50,7 +50,7 @@ public: * @param argv The command-line arguments. * @return The exit value of the program. */ - int main(const int argc, char *const *const argv); + int mainImpl(const int argc, char *const *const argv); protected: diff --git a/frontend/grpc/FrontendCmd.cpp b/frontend/grpc/FrontendCmd.cpp index 5d1cb930d068844395d5612bcbed8afaca943398..9b108e6d2a5c5a131d4240bd837ea1b22a2f99dd 100644 --- a/frontend/grpc/FrontendCmd.cpp +++ b/frontend/grpc/FrontendCmd.cpp @@ -54,7 +54,7 @@ cta::frontend::grpc::server::FrontendCmd::FrontendCmd(std::istream &inStream, m_err(errStream) { } -int cta::frontend::grpc::server::FrontendCmd::main(const int argc, char** argv) { +int cta::frontend::grpc::server::FrontendCmd::mainImpl(const int argc, char** argv) { m_strExecName = argv[0]; @@ -228,11 +228,11 @@ int cta::frontend::grpc::server::FrontendCmd::main(const int argc, char** argv) upCatalogue->Schema()->ping(); log::ScopedParamContainer params(lc); params.add("SchemaVersion", upCatalogue->Schema()->getSchemaVersion().getSchemaVersion()); - lc.log(cta::log::INFO, "In cta::frontend::grpc::server::FrontendCmd::main(): Connected to catalog."); + lc.log(cta::log::INFO, "In cta::frontend::grpc::server::FrontendCmd::mainImpl(): Connected to catalog."); } catch (cta::exception::Exception &ex) { log::ScopedParamContainer params(lc); params.add("exceptionMessage", ex.getMessageValue()); - lc.log(cta::log::CRIT, "In cta::frontend::grpc::server::FrontendCmd::main(): Got an exception."); + lc.log(cta::log::CRIT, "In cta::frontend::grpc::server::FrontendCmd::mainImpl(): Got an exception."); return EXIT_FAILURE; } // Token storage @@ -250,7 +250,7 @@ int cta::frontend::grpc::server::FrontendCmd::main(const int argc, char** argv) } catch(const cta::exception::Exception &ex) { log::ScopedParamContainer params(lc); params.add("handler", "NegotiationRequestHandler"); - lc.log(cta::log::ERR, "In cta::frontend::grpc::server::FrontendCmd::main(): Error while registering handler."); + lc.log(cta::log::ERR, "In cta::frontend::grpc::server::FrontendCmd::mainImpl(): Error while registering handler."); throw; } // SERVICE: CtaRpcStream @@ -269,12 +269,12 @@ int cta::frontend::grpc::server::FrontendCmd::main(const int argc, char** argv) } catch(const cta::exception::Exception& e) { log::ScopedParamContainer params(lc); params.add("exceptionMessage", e.getMessageValue()); - lc.log(cta::log::CRIT, "In cta::frontend::grpc::server::FrontendCmd::main(): Got an exception."); + lc.log(cta::log::CRIT, "In cta::frontend::grpc::server::FrontendCmd::mainImpl(): Got an exception."); return EXIT_FAILURE; } catch(const std::exception& e) { log::ScopedParamContainer params(lc); params.add("exceptionMessage", e.what()); - lc.log(cta::log::CRIT, "In cta::frontend::grpc::server::FrontendCmd::main(): Got an exception."); + lc.log(cta::log::CRIT, "In cta::frontend::grpc::server::FrontendCmd::mainImpl(): Got an exception."); return EXIT_FAILURE; } @@ -300,6 +300,6 @@ int main(const int argc, char **argv) { cta::frontend::grpc::server::FrontendCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/frontend/grpc/FrontendCmd.hpp b/frontend/grpc/FrontendCmd.hpp index 453dbf8fb7f0162315314aefc1c852b4fa5fb537..9f62d304eadaf4ba9791d01c691391b9eb8fd519 100644 --- a/frontend/grpc/FrontendCmd.hpp +++ b/frontend/grpc/FrontendCmd.hpp @@ -46,7 +46,7 @@ public: * @param argv The command-line arguments. * @return The exit value of the program. */ - int main(const int argc, char** argv); + int mainImpl(const int argc, char** argv); private: std::istream &m_in; // Standard input stream diff --git a/statistics/StatisticsSaveCmdMain.cpp b/statistics/StatisticsSaveCmdMain.cpp index f5c314bdf6b102c75a5f5ed32926ff38dc3e65a9..dbede859b8639814387b56b3dbd825781679da39 100644 --- a/statistics/StatisticsSaveCmdMain.cpp +++ b/statistics/StatisticsSaveCmdMain.cpp @@ -22,5 +22,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::statistics::StatisticsSaveCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/statistics/StatisticsUpdateCmdMain.cpp b/statistics/StatisticsUpdateCmdMain.cpp index 429bb3bd9737420b3efb6f3fbf2848bd3eaab06d..92bb82d689950d0d3cfc1e9a512bfb70092afc6b 100644 --- a/statistics/StatisticsUpdateCmdMain.cpp +++ b/statistics/StatisticsUpdateCmdMain.cpp @@ -22,5 +22,5 @@ //------------------------------------------------------------------------------ int main(const int argc, char *const *const argv) { cta::statistics::StatisticsUpdateCmd cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/tapeserver/cta-taped.cpp b/tapeserver/cta-taped.cpp index c4e9df3b8972dc05a4cbb34900370f3b31d341f2..362108049131999c3c06cc571826550cb53873d2 100644 --- a/tapeserver/cta-taped.cpp +++ b/tapeserver/cta-taped.cpp @@ -115,7 +115,7 @@ static int exceptionThrowingMain(const cta::daemon::CommandLineParams& commandLi globalConfig); // Run the tapeserverd daemon - return daemon.main(); + return daemon.mainImpl(); } //------------------------------------------------------------------------------ diff --git a/tapeserver/daemon/TapeDaemon.cpp b/tapeserver/daemon/TapeDaemon.cpp index fc2ed6ec194bc8caa32a759987138cd43df7407e..74a654e8e50e77c0e2248306a8d9a05a49c48ee6 100644 --- a/tapeserver/daemon/TapeDaemon.cpp +++ b/tapeserver/daemon/TapeDaemon.cpp @@ -51,7 +51,7 @@ TapeDaemon::~TapeDaemon() { //------------------------------------------------------------------------------ // main //------------------------------------------------------------------------------ -int TapeDaemon::main() { +int TapeDaemon::mainImpl() { try { exceptionThrowingMain(); } catch (cta::exception::NoSuchObject &ex) { diff --git a/tapeserver/daemon/TapeDaemon.hpp b/tapeserver/daemon/TapeDaemon.hpp index 55b8c76d1eb63e498347f1da246b7ea1befd1dc0..eae29e9b33291caf8e2e6053180e2edb0d59e181 100644 --- a/tapeserver/daemon/TapeDaemon.hpp +++ b/tapeserver/daemon/TapeDaemon.hpp @@ -45,7 +45,7 @@ public: /** The main entry function of the daemon. * @return The return code of the process. */ - int main(); + int mainImpl(); private: bool isMaintenanceProcessDisabled() const; diff --git a/tapeserver/readtp/ReadtpCmdMain.cpp b/tapeserver/readtp/ReadtpCmdMain.cpp index 37f08171667e348bcf5f29b280accac9868e562f..76be4d2fe693b9c53c1654b5ffeefe2d01769db7 100644 --- a/tapeserver/readtp/ReadtpCmdMain.cpp +++ b/tapeserver/readtp/ReadtpCmdMain.cpp @@ -36,5 +36,5 @@ int main(const int argc, char *const *const argv) { cta::log::DummyLogger dummyLog("dummy", "dummy"); cta::tapeserver::readtp::ReadtpCmd cmd(std::cin, std::cout, std::cerr, log, dummyLog); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/tapeserver/tapelabel/TapeLabelCmdMain.cpp b/tapeserver/tapelabel/TapeLabelCmdMain.cpp index 23420876ddb1a6fb290455add301f3afd87a2265..53d01cfce903399b3c6bc4e02ef1288ee667b5c8 100644 --- a/tapeserver/tapelabel/TapeLabelCmdMain.cpp +++ b/tapeserver/tapelabel/TapeLabelCmdMain.cpp @@ -34,6 +34,6 @@ int main(const int argc, char *const *const argv) { cta::log::StdoutLogger log(hostName, "cta-tape-label"); cta::tapeserver::tapelabel::TapeLabelCmd cmd{std::cin, std::cout, std::cerr, log}; - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); } diff --git a/tests/ImmutableFileTest.cpp b/tests/ImmutableFileTest.cpp index 2676233b09ebff51af8dd7cfdf8977cf729bac46..7cb589de0077884b8ec803a25299b13364a84c32 100644 --- a/tests/ImmutableFileTest.cpp +++ b/tests/ImmutableFileTest.cpp @@ -45,7 +45,7 @@ ImmutableFileTest::ImmutableFileTest( //------------------------------------------------------------------------------ // main //------------------------------------------------------------------------------ -int ImmutableFileTest::main(const int argc, char *const *const argv) { +int ImmutableFileTest::mainImpl(const int argc, char *const *const argv) { bool cmdLineNotParsed = false; std::string errorMessage; diff --git a/tests/ImmutableFileTest.hpp b/tests/ImmutableFileTest.hpp index a198dcfe4db7715f937c53470329a2ab09cd7c45..1ae2e236728a553ee4d13f05c956968764cf43dc 100644 --- a/tests/ImmutableFileTest.hpp +++ b/tests/ImmutableFileTest.hpp @@ -45,7 +45,7 @@ public: * @param argv The command-line arguments. * @return The exit value of the program. */ - int main(const int argc, char *const *const argv); + int mainImpl(const int argc, char *const *const argv); private: diff --git a/tests/ImmutableFileTestMain.cpp b/tests/ImmutableFileTestMain.cpp index 833c09a1385f5a794dc2c2f4927040f53f929db9..13746736970f3891eb99727e9c9d31c0fb743ecf 100644 --- a/tests/ImmutableFileTestMain.cpp +++ b/tests/ImmutableFileTestMain.cpp @@ -25,5 +25,5 @@ int main(const int argc, char *const *const argv) { cta::ImmutableFileTest cmd(std::cin, std::cout, std::cerr); - return cmd.main(argc, argv); + return cmd.mainImpl(argc, argv); }