IInfo.hpp
1 #ifndef OPALS_IINFO_HPP_INCLUDED
2 #define OPALS_IINFO_HPP_INCLUDED
3 
4 #include <opals/IModuleBase.hpp>
5 
6 #if !defined(OPALS_EXPORTS) && !defined(OPALS_MODULE_EXPORTS)
7  #if defined _DEBUG && !defined OPALS_NO_DEBUG
8  #pragma comment(lib, "opalsInfo_d.lib")
9  #else
10  #pragma comment(lib, "opalsInfo.lib")
11  #endif
12 #endif
13 
14 #include <opals/Path.hpp>
15 #include <opals/Vector.hpp>
16 #include <opals/HeaderFeature.hpp>
17 #include <opals/DataSetStats.hpp>
18 
19 namespace opals {
20 
21  namespace opts
22  {
23  namespace Info
24  {
25  /// Options of \ref ModuleInfo
26  typedef IGroup< Names::_, false, Cons<
27  ILeaf< Names::inFile, false, opals::Path >, Cons<
28  ILeaf< Names::statistic, true, opals::DataSetStats >, Cons<
29  ILeaf< Names::exportHeader, false, opals::Vector<opals::HeaderFeature::Type> >
30  > > > > Options;
31  }
32  }
33 
34  /// Extracts and reports header information of a vector or raster file (ODM, GDAL).
35  /** opalsInfo extracts statistic information (number of points/lines/polygons, the bounding box, attribute information, spatial index details, etc..) from a data set input file. Currently, only ODMs are supported. However, the support of vector files, grid and tin file formats is planned for the future. In general, all information provided in the header of the file format is made available through a generic file statistics object. */
36  /// \see \ref ModuleInfo
37  class OPALS_API IInfo : virtual public IModuleBase
38  {
39 
40  public:
41  static IInfo* New();
42  static IInfo* New( IControlObject &controlObject );
43  static IInfo* New( const IModuleBase &parent );
44  static IInfo* New( const IModuleBase &parent, IControlObject &controlObject );
45 
46  virtual ~IInfo() {}
47 
48  /// \name Access to module-specific options.
49  ///@{
51  virtual Options& opts() = 0;
52  virtual const Options& opts() const = 0;
53  ///}@
54 
55  };
56 
57 };
58 
59 #endif