Changeset 10669
- Timestamp:
- 05/11/11 18:53:45 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/FACT++/src/test3.cc
r10372 r10669 2 2 #include <boost/filesystem.hpp> 3 3 4 #include "FACT.h" 5 #include "Dim.h" 4 6 #include "Shell.h" 5 7 #include "Configuration.h" … … 58 60 "\n" 59 61 "Usage: test3 [-c type] [OPTIONS]\n" 60 " or: test3 [OPTIONS]\n" 61 "\n" 62 "Options:\n" 63 "The following describes the available commandline options. " 64 "For further details on how command line option are parsed " 65 "and in which order which configuration sources are accessed " 66 "please refer to the class reference of the Configuration class."; 62 " or: test3 [OPTIONS]\n"; 67 63 cout << endl; 68 64 … … 71 67 void PrintHelp() 72 68 { 73 cout << 74 "The default is that the program is started without user intercation. " 75 "All actions are supposed to arrive as DimCommands. Using the -c " 76 "option, a local shell can be initialized. With h or help a short " 77 "help message about the usuage can be brought to the screen." 78 << endl; 79 80 /* 81 cout << "bla bla bla" << endl << endl; 82 cout << endl; 83 cout << "Environment:" << endl; 84 cout << "environment" << endl; 85 cout << endl; 86 cout << "Examples:" << endl; 87 cout << "test exam" << endl; 88 cout << endl; 89 cout << "Files:" << endl; 90 cout << "files" << endl; 91 cout << endl; 92 */ 93 } 94 95 /* 96 The first line of the --version information is assumed to be in one 97 of the following formats: 98 99 <version> 100 <program> <version> 101 {GNU,Free} <program> <version> 102 <program> ({GNU,Free} <package>) <version> 103 <program> - {GNU,Free} <package> <version> 104 105 and separated from any copyright/author details by a blank line. 106 107 Handle multi-line bug reporting sections of the form: 108 109 Report <program> bugs to <addr> 110 GNU <package> home page: <url> 111 ... 112 */ 113 void PrintVersion(const char *name) 114 { 115 string n = boost::filesystem::basename(name); 116 if (n.substr(0, 3)=="lt-") 117 n = n.substr(3); 118 119 cout << 120 n << " - FACT++ 1.0\n" 121 "\n" 122 "Written by Thomas Bretz <thomas.bretz@epfl.ch> et al.\n" 123 "\n" 124 "Report bugs to Thomas Bretz <thomas.bretz@epfl.ch>\n" 125 "FACT++ home page: http://www.xxx.com\n" 126 "\n" 127 "Copyright (C) 2011 by the FACT Collaboration.\n" 128 "This is free software; see the source for copying conditions.\n" 129 << endl; 69 /* Additional help text which is printed after the configuration 70 options goes here */ 130 71 } 131 72 … … 160 101 if (conf.HasVersion()) 161 102 { 162 PrintVersion(argv[0]);103 FACT::PrintVersion(argv[0]); 163 104 return -1; 164 105 } … … 170 111 } 171 112 172 // To allow overwriting of DIM_DNS_NODE set 0 to 1 173 setenv("DIM_DNS_NODE", conf.Get<string>("dns").c_str(), 1); 113 Dim::Setup(conf.Get<string>("dns")); 174 114 175 115 if (conf.Get<int>("console")==0)
Note:
See TracChangeset
for help on using the changeset viewer.