本文整理汇总了C++中ArangoClient::printWelcomeInfo方法的典型用法代码示例。如果您正苦于以下问题:C++ ArangoClient::printWelcomeInfo方法的具体用法?C++ ArangoClient::printWelcomeInfo怎么用?C++ ArangoClient::printWelcomeInfo使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArangoClient
的用法示例。
在下文中一共展示了ArangoClient::printWelcomeInfo方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
int main (int argc, char* argv[]) {
TRIAGENS_C_INITIALISE(argc, argv);
TRIAGENS_REST_INITIALISE(argc, argv);
TRI_InitialiseLogging(false);
int ret = EXIT_SUCCESS;
BaseClient.setEndpointString(Endpoint::getDefaultEndpoint());
// .............................................................................
// parse the program options
// .............................................................................
ParseProgramOptions(argc, argv);
// .............................................................................
// set-up MRuby objects
// .............................................................................
// create a new ruby shell
mrb_state* mrb = MR_OpenShell();
TRI_InitMRUtils(mrb);
// .............................................................................
// set-up client connection
// .............................................................................
// check if we want to connect to a server
bool useServer = (BaseClient.endpointString() != "none");
if (useServer) {
BaseClient.createEndpoint();
if (BaseClient.endpointServer() == 0) {
LOGGER_FATAL_AND_EXIT("invalid value for --server.endpoint ('" << BaseClient.endpointString() << "')");
}
ClientConnection = createConnection(mrb);
InitMRClientConnection(mrb, ClientConnection);
}
// .............................................................................
// banner
// .............................................................................
// http://www.network-science.de/ascii/ Font: ogre
if (! BaseClient.quiet()) {
char const* g = TRI_SHELL_COLOR_GREEN;
char const* r = TRI_SHELL_COLOR_RED;
char const* z = TRI_SHELL_COLOR_RESET;
if (! BaseClient.colors()) {
g = "";
r = "";
z = "";
}
printf("%s %s _ _ %s\n", g, r, z);
printf("%s __ _ _ __ __ _ _ __ __ _ ___ %s(_)_ __| |__ %s\n", g, r, z);
printf("%s / _` | '__/ _` | '_ \\ / _` |/ _ \\%s| | '__| '_ \\ %s\n", g, r, z);
printf("%s| (_| | | | (_| | | | | (_| | (_) %s| | | | |_) |%s\n", g, r, z);
printf("%s \\__,_|_| \\__,_|_| |_|\\__, |\\___/%s|_|_| |_.__/ %s\n", g, r, z);
printf("%s |___/ %s %s\n", g, r, z);
cout << endl << "Welcome to arangosh " << TRI_VERSION_FULL << ". Copyright (c) 2012 triAGENS GmbH" << endl;
#ifdef TRI_MRUBY_VERSION
cout << "Using MRUBY " << TRI_MRUBY_VERSION << " engine. Copyright (c) 2012 mruby developers." << endl;
#endif
#ifdef TRI_READLINE_VERSION
cout << "Using READLINE " << TRI_READLINE_VERSION << endl;
#endif
cout << endl;
BaseClient.printWelcomeInfo();
if (useServer) {
if (ClientConnection->isConnected()) {
if (! BaseClient.quiet()) {
cout << "Connected to ArangoDB '" << BaseClient.endpointServer()->getSpecification()
<< "' Version " << ClientConnection->getVersion() << endl;
}
}
else {
cerr << "Could not connect to endpoint '" << BaseClient.endpointString() << "'" << endl;
cerr << "Error message '" << ClientConnection->getErrorMessage() << "'" << endl;
}
}
}
// .............................................................................
// read files
// .............................................................................
// load java script from js/bootstrap/*.h files
if (StartupPath.empty()) {
StartupLoader.defineScript("common/bootstrap/error.rb", MR_common_bootstrap_error);
//.........这里部分代码省略.........