|
Urbi SDK Remote for C++
2.7.5
|
00001 /* 00002 * Copyright (C) 2008-2010, Gostai S.A.S. 00003 * 00004 * This software is provided "as is" without warranty of any kind, 00005 * either expressed or implied, including but not limited to the 00006 * implied warranties of fitness for a particular purpose. 00007 * 00008 * See the LICENSE file for more information. 00009 */ 00010 00012 00013 #include <libport/cli.hh> 00014 #include <libport/containers.hh> 00015 #include <urbi/umain.hh> 00016 #include <urbi/urbi-root.hh> 00017 00018 extern "C" 00019 { 00020 int urbi_main(int argc, const char* argv[], 00021 UrbiRoot& urbi_root, bool block, bool errors) 00022 { 00023 libport::program_initialize(argc, argv); 00024 00025 return urbi::main(argc, argv, urbi_root, block, errors); 00026 } 00027 00028 int urbi_main_args(const libport::cli_args_type& args, 00029 UrbiRoot& urbi_root, bool block, bool errors) 00030 { 00031 libport::program_initialize(args); 00032 00033 return urbi::main(args, urbi_root, block, errors); 00034 } 00035 } 00036 00037 namespace urbi 00038 { 00039 00040 int 00041 main(int argc, const char* argv[], UrbiRoot& urbi_root, bool block, bool errors) 00042 { 00043 libport::program_initialize(argc, argv); 00044 00045 libport::cli_args_type args; 00046 // For some reason, I failed to use std::copy here. 00047 for (int i = 0; i < argc; ++i) 00048 args << std::string(argv[i]); 00049 return main(args, urbi_root, block, errors); 00050 } 00051 00052 }