48 #include <visp/vpColVector.h>
49 #include <visp/vpDebug.h>
50 #include <visp/vpParseArgv.h>
56 #define GETOPTARGS "h"
58 void usage(
const char *name,
const char *badparam);
59 bool getOptions(
int argc,
const char **argv);
66 void usage(
const char *name,
const char *badparam)
69 Test some vpColVector functionalities.\n\
80 fprintf(stdout,
"\nERROR: Bad parameter [%s]\n", badparam);
89 bool getOptions(
int argc,
const char **argv)
96 case 'h': usage(argv[0], NULL);
return false;
break;
99 usage(argv[0], optarg_);
104 if ((c == 1) || (c == -1)) {
106 usage(argv[0], NULL);
107 std::cerr <<
"ERROR: " << std::endl;
108 std::cerr <<
" Bad argument " << optarg_ << std::endl << std::endl;
117 main(
int argc,
const char ** argv)
121 if (getOptions(argc, argv) ==
false) {
128 vpTRACE(
"------------------------");
129 vpTRACE(
"call std::cout << V;");
130 std::cout << V << std::endl;
132 vpTRACE(
"------------------------");
133 vpTRACE(
"call V.normalize();");
136 vpTRACE(
"------------------------");
137 vpTRACE(
"call std::cout << V;");
138 std::cout << V << std::endl;
142 std::cout <<
"Catch an exception: " << e << std::endl;
error that can be emited by ViSP classes.
static bool parse(int *argcPtr, const char **argv, vpArgvInfo *argTable, int flags)
Class that provides a data structure for the column vectors as well as a set of operations on these v...