diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:46 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2024-03-06 10:24:46 +0100 |
commit | 372a0e99c2f61543d9e14d9933b59d9d1f4cb26e (patch) | |
tree | bbadf39aed0610c8f8f7b41fefff47773b8ac205 /xsd/examples/cxx/tree/performance/driver.cxx | |
parent | 23d41842168ac1a1580111b9c5c73500ceee3d57 (diff) | |
parent | 4538829ab86b5a1cd4e845e7eab165029c9d6d46 (diff) |
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'xsd/examples/cxx/tree/performance/driver.cxx')
-rw-r--r-- | xsd/examples/cxx/tree/performance/driver.cxx | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/xsd/examples/cxx/tree/performance/driver.cxx b/xsd/examples/cxx/tree/performance/driver.cxx deleted file mode 100644 index b626e4d..0000000 --- a/xsd/examples/cxx/tree/performance/driver.cxx +++ /dev/null @@ -1,90 +0,0 @@ -// file : examples/cxx/tree/performance/driver.cxx -// copyright : not copyrighted - public domain - -#include <string> -#include <sstream> -#include <iostream> - -#include <xercesc/util/PlatformUtils.hpp> - -using namespace std; - -// See parsing.cxx -// -bool -parsing (const char* file, unsigned long iter, bool validate); - -// See serialization.cxx -// -bool -serialization (const char* file, unsigned long iter); - -int -main (int argc, char* argv[]) -{ - if (argc < 2) - { - cerr << "usage: " << argv[0] << " [-v] [-i <count>] test.xml" << endl - << "\t -v turn on validation (default is off)" << endl - << "\t -i number of iterations to perform (default is 1000)" << endl; - return 1; - } - - bool validate (false); - unsigned long iter (1000); - const char* file (0); - - // Parse command line arguments. - // - for (int i (1); i < argc; ++i) - { - std::string arg (argv[i]); - - if (arg == "-v") - { - validate = true; - } - else if (arg == "-i") - { - if (++i == argc) - { - cerr << "argument expected for the -i option" << endl; - return 1; - } - - iter = 0; - istringstream is (argv[i]); - is >> iter; - - if (iter == 0) - { - cerr << "invalid argument for the -i option" << endl; - return 1; - } - } - else - { - file = argv[i]; - break; - } - } - - if (file == 0) - { - cerr << "no input file specified" << endl; - return 1; - } - - int r (0); - - xercesc::XMLPlatformUtils::Initialize (); - - // Call parsing and serialization tests. - // - if (!parsing (file, iter, validate) || !serialization (file, iter)) - r = 1; - - xercesc::XMLPlatformUtils::Terminate (); - - return r; -} |