~holger-seelig/titania/3.0

« back to all changes in this revision

Viewing changes to Titania/Titania/main.cpp

  • Committer: Holger Seelig
  • Date: 2017-01-31 05:07:29 UTC
  • Revision ID: holger.seelig@yahoo.de-20170131050729-mcb9l290ezhn7x7o
Incorporate x3dtidy and titania-info into Titania.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5
5
 *
6
 
 * Copyright create3000, Scheffelstraße 31a, Leipzig, Germany 2011.
 
6
 * Copyright create3000, Scheffelstra�e 31a, Leipzig, Germany 2011.
7
7
 *
8
8
 * All rights reserved. Holger Seelig <holger.seelig@yahoo.de>.
9
9
 *
49
49
 ******************************************************************************/
50
50
 
51
51
#include "Browser/BrowserApplication.h"
 
52
#include "ApplicationOptions.h"
 
53
#include "Tidy.h"
 
54
#include "Info.h"
52
55
 
53
56
int
54
57
main (int argc, char** argv)
55
58
{
56
 
        return titania::puck::BrowserApplication::main (argc, argv);
 
59
        using namespace titania::puck;
 
60
 
 
61
        try
 
62
        {
 
63
                ApplicationOptions options (argc, argv);
 
64
 
 
65
                if (not options .exportFilename .empty ())
 
66
                        return Tidy::main (options);
 
67
 
 
68
                if (not options .list .empty ())
 
69
                        return Info::main (options);
 
70
 
 
71
                if (options .help)
 
72
                {
 
73
                        std::cout << options .get_help () << std::endl;
 
74
                        return 0;
 
75
                }
 
76
 
 
77
                return BrowserApplication::main (argc, argv);
 
78
        }
 
79
        catch (const Glib::Exception & error)
 
80
        {
 
81
                std::cerr << error .what () << std::endl;
 
82
                return 1;
 
83
        }
 
84
        catch (const std::exception & error)
 
85
        {
 
86
                std::cerr << error .what () << std::endl;
 
87
                return 1;
 
88
        }
57
89
}