ApplicationOptions.h
Go to the documentation of this file.
1 /*
2 * This file is part of ArmarX.
3 *
4 * Copyright (C) 2011-2016, High Performance Humanoid Technologies (H2T), Karlsruhe Institute of Technology (KIT), all rights reserved.
5 *
6 * ArmarX is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License version 2 as
8 * published by the Free Software Foundation.
9 *
10 * ArmarX is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program. If not, see <http://www.gnu.org/licenses/>.
17 *
18 * @package ArmarXCore::core
19 * @author Jan Issac (jan dot issac at gmail dot com)
20 * @date 2012
21 * @copyright http://www.gnu.org/licenses/gpl-2.0.txt
22 * GNU General Public License
23 */
24 
25 #pragma once
26 
27 #include <Ice/Properties.h> // for PropertiesPtr
28 #include <IceUtil/Handle.h> // for Handle
29 
30 #include <iostream> // for cout, ostream
31 #include <ostream>
32 #include <string> // for string
33 
34 #include "../ArmarXDummyManager.h" // for ArmarXDummyManagerPtr
35 #include "properties/PropertyUser.h" // for PropertyUserList
36 
38 {
39  class options_description;
40 }
41 
42 namespace armarx
43 {
44  // forward declarations
45  class Application;
46 
51 }
52 
57 {
63  {
70  };
71 
76  struct Options
77  {
78  bool showHelp;
80  bool error;
81  std::string outfile;
83  std::shared_ptr<boost::program_options::options_description> description;
84  };
85 
96  Ice::PropertiesPtr mergeProperties(Ice::PropertiesPtr properties, int argc, char* argv[]);
97 
107  Options parseHelpOptions(Ice::PropertiesPtr properties, int argc, char* argv[]);
108 
117  void showHelp(ApplicationPtr application, ArmarXDummyManagerPtr dummyManager, Options options, Ice::PropertiesPtr properties, std::ostream& out = std::cout);
118 
126 }
armarx::ApplicationOptions::getPropertyUsers
PropertyUserList getPropertyUsers(ArmarXDummyManagerPtr dummyManager)
Return the list of property users.
Definition: ApplicationOptions.cpp:265
armarx::ApplicationOptions::mergeProperties
Ice::PropertiesPtr mergeProperties(Ice::PropertiesPtr properties, int argc, char *argv[])
Merge command line options into properties.
Definition: ApplicationOptions.cpp:59
armarx::ApplicationOptions::eHelpBrief
@ eHelpBrief
Definition: ApplicationOptions.h:64
armarx::ApplicationOptions::parseHelpOptions
Options parseHelpOptions(Ice::PropertiesPtr properties, int argc, char *argv[])
Parse the help options.
Definition: ApplicationOptions.cpp:68
boost::program_options
Definition: ApplicationOptions.h:37
armarx::ApplicationOptions::OptionsFormat
OptionsFormat
Help format to display.
Definition: ApplicationOptions.h:62
armarx::ApplicationOptions::Options::showHelp
bool showHelp
Definition: ApplicationOptions.h:78
armarx::ApplicationOptions::eConfig
@ eConfig
Definition: ApplicationOptions.h:68
armarx::ApplicationOptions::Options::description
std::shared_ptr< boost::program_options::options_description > description
Definition: ApplicationOptions.h:83
IceInternal::Handle< ::Ice::Properties >
armarx::ApplicationOptions::eDoxygenComponentPages
@ eDoxygenComponentPages
Definition: ApplicationOptions.h:67
armarx::ApplicationOptions::eDoxygen
@ eDoxygen
Definition: ApplicationOptions.h:66
armarx::PropertyUserList
std::vector< PropertyUserPtr > PropertyUserList
UserProperty list type.
Definition: PropertyUser.h:257
PropertyUser.h
armarx::ApplicationOptions::Options::format
OptionsFormat format
Definition: ApplicationOptions.h:82
armarx::ApplicationOptions::Options::showVersion
bool showVersion
Definition: ApplicationOptions.h:79
armarx::ApplicationOptions::eXml
@ eXml
Definition: ApplicationOptions.h:69
armarx::ApplicationOptions::Options
Stucture containing the parsed options of the application.
Definition: ApplicationOptions.h:76
armarx::ApplicationPtr
IceUtil::Handle< Application > ApplicationPtr
Definition: Application.h:93
armarx::ApplicationOptions
This namespace contains all relevent methods to parse and print options and propertiesas used by the ...
Definition: ApplicationOptions.h:56
armarx::ApplicationOptions::Options::error
bool error
Definition: ApplicationOptions.h:80
IceUtil::Handle< Application >
armarx::ApplicationOptions::showHelp
void showHelp(ApplicationPtr application, ArmarXDummyManagerPtr dummyManager, Options options, Ice::PropertiesPtr properties, std::ostream &out=std::cout)
Prints help according to the format selection in options.
Definition: ApplicationOptions.cpp:169
armarx::ApplicationOptions::Options::outfile
std::string outfile
Definition: ApplicationOptions.h:81
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28
armarx::ApplicationOptions::eOptionsDetailed
@ eOptionsDetailed
Definition: ApplicationOptions.h:65