CustusX  18.04-rc1
An IGT application
cisstTestParameters.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ex: set filetype=cpp softtabstop=4 shiftwidth=4 tabstop=4 cindent expandtab: */
3 
4 /*
5  $Id: cisstTestParameters.h,v 1.6 2007/04/26 20:12:05 anton Exp $
6 
7  Author(s): Anton Deguet, Ofri Sadowsky
8  Created on: 2003-11-10
9 
10  (C) Copyright 2003-2007 Johns Hopkins University (JHU), All Rights
11  Reserved.
12 
13 --- begin cisst license - do not edit ---
14 
15 This software is provided "as is" under an open source license, with
16 no warranty. The complete license can be found in license.txt and
17 http://www.cisst.org/cisst/license.txt.
18 
19 --- end cisst license ---
20 */
21 
22 
23 #ifndef _cisstTestParameters_h
24 #define _cisstTestParameters_h
25 
26 
27 #include <string>
28 #include <list>
29 #include <iostream>
30 
31 
33 {
34 public:
36  typedef std::list<std::string> TestNameContainerType;
37 private:
38  TestNameContainerType TestNames;
39  int NumTestInstances;
40  int NumTestIterations;
41  TestRunModeType TestRunMode;
42  std::string ProgramName;
43 
44 public:
46  TestNames(),
47  NumTestInstances(1),
48  NumTestIterations(1),
49  TestRunMode(PRINT_HELP)
50  {}
51 
52  void ParseCmdLine(int argc, char * argv[]);
53 
54  const TestNameContainerType & GetTestNames() const
55  {
56  return TestNames;
57  }
58 
59  TestRunModeType GetTestRunMode() const
60  {
61  return TestRunMode;
62  }
63 
64  int GetNumInstances() const
65  {
66  return NumTestInstances;
67  }
68 
69  int GetNumIterations() const
70  {
71  return NumTestIterations;
72  }
73 
74  std::string GetProgramName(void) const {
75  return ProgramName;
76  }
77 
78  static int PrintHelp(const char * programName);
79 };
80 
81 
82 #endif // _cisstTestParameters_h
83 
84 
85 // ****************************************************************************
86 // Change History
87 // ****************************************************************************
88 //
89 // $Log: cisstTestParameters.h,v $
90 // Revision 1.6 2007/04/26 20:12:05 anton
91 // All files in tests: Applied new license text, separate copyright and
92 // updated dates, added standard header where missing.
93 //
94 // Revision 1.5 2006/11/20 20:33:53 anton
95 // Licensing: Applied new license to tests.
96 //
97 // Revision 1.4 2005/12/08 17:12:50 anton
98 // Test main library: Added license.
99 //
100 // Revision 1.3 2005/09/26 15:41:48 anton
101 // cisst: Added modelines for emacs and vi.
102 //
103 // Revision 1.2 2005/06/03 01:22:03 anton
104 // Tests: Preliminary support for Dart2.
105 //
106 // Revision 1.1 2003/11/11 22:32:24 anton
107 // Created separate source and header files for the class cisstTestParameters
108 //
109 // ****************************************************************************
int GetNumIterations() const
TestRunModeType GetTestRunMode() const
const TestNameContainerType & GetTestNames() const
int GetNumInstances() const
std::string GetProgramName(void) const
std::list< std::string > TestNameContainerType
static int PrintHelp(const char *programName)
void ParseCmdLine(int argc, char *argv[])