OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
ossimBatchTest.h
Go to the documentation of this file.
1 //----------------------------------------------------------------------------
2 //
3 // License: See top level LICENSE.txt file.
4 //
5 // Author: David Burken, Oscar Kramer
6 //
7 // Description: Test code application utility class.
8 //
9 //----------------------------------------------------------------------------
10 // $Id$
11 
12 #ifndef ossimBatchTest_HEADER
13 #define ossimBatchTest_HEADER 1
14 
17 #include <ossim/base/ossimRefPtr.h>
19 #include <vector>
20 #include <map>
21 #include <fstream>
22 
23 // Forward class declarations:
25 class ossimDpt;
26 class ossimString;
27 class ossimGpt;
29 class ossimImageGeometry;
30 class ossimIrect;
31 class ossimKeywordlist;
32 class ossimTilingRect;
33 
35 {
36 public:
38  {
39  TEST_TBD = 0x00, // initial state: no test yet attempted
40  TEST_PASSED = 0x01,
41  TEST_FAILED = 0x02,
42  TEST_ERROR = 0x04,
43  TEST_DISABLED = 0x08
44  };
45 
48 
50  bool initialize(ossimArgumentParser& ap);
51 
55  ossim_uint8 execute();
56 
57 private:
60  void writeTemplate(const ossimFilename& templateFile, bool long_form);
61 
63  void getDateString(ossimString& date);
64 
66  void getLogFilename(ossimFilename& logFile);
67 
71  ossim_uint8 processConfigList(const ossimKeywordlist& kwl);
72 
76  ossim_uint8 processTest(const ossimString& prefix, const ossimKeywordlist& kwl);
77 
80  ossim_uint8 processCommands(const ossimString& prefix,
81  const ossimKeywordlist& kwl,
82  const ossimString& testName,
83  bool logTime,
84  const ossimFilename& tempFile=ossimFilename(""));
85 
87  void preprocessKwl(const std::vector<std::string>& testList,
88  const std::string& testCommand,
89  ossimKeywordlist& kwl);
90 
93  bool makeDefaultResultsDir();
94 
97  bool doDefaultClean();
98 
113  bool getTempFileName( const ossimString& prefix,
114  const ossimKeywordlist& kwl,
115  ossimFilename& tempFile ) const;
116 
123  bool getDefaultTempFileDir( ossimFilename& tempDir ) const;
124 
126  void usage(ossimArgumentParser& ap);
127 
133  std::string convertToNative( const char* lookup ) const;
134 
135  std::vector<std::string> m_acceptTestList;
136  std::vector<std::string> m_cleanTestList;
137  std::vector<std::string> m_preprocessTestList;
138  std::vector<std::string> m_runTestList;
139  std::map<ossim_uint32, std::string> m_statusLabels;
140 
146 };
147 
148 #endif /* #ifndef ossimBatchTest_HEADER */
ossimFilename m_expDir
void usage()
Represents serializable keyword/value map.
ossimReferenced allows for shared object ref counting if the reference count ever gets to 0 or less i...
std::vector< std::string > m_cleanTestList
Pure virtual base class for image file writers.
std::vector< std::string > m_runTestList
std::ofstream m_logStr
std::vector< std::string > m_acceptTestList
ossimFilename m_configFileName
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
std::map< ossim_uint32, std::string > m_statusLabels
#define OSSIM_DLL
std::vector< std::string > m_preprocessTestList
ossimFilename m_outDir
std::basic_ofstream< char > ofstream
Class for char output file streams.
Definition: ossimIosFwd.h:47
unsigned char ossim_uint8