isce3  0.1.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Product.h
1 // -*- C++ -*-
2 // -*- coding: utf-8 -*-
3 //
4 // Source Author: Bryan Riel
5 // Copyright 2017-2018
6 
7 #pragma once
8 
9 // std
10 #include <string>
11 #include <algorithm>
12 #include <locale>
13 #include <map>
14 
15 #include <isce3/core/Constants.h>
16 #include <isce3/core/LookSide.h>
17 #include <isce3/io/IH5.h>
18 #include <isce3/product/Metadata.h>
19 #include <isce3/product/Swath.h>
20 
21 // Declarations
22 namespace isce3 {
23  namespace product {
24  class Product;
25  }
26 }
27 
28 // Product class declaration
30 
31  public:
34 
36  inline Product(const Metadata &, const std::map<char, isce3::product::Swath> &);
37 
39  inline const Metadata & metadata() const { return _metadata; }
41  inline Metadata & metadata() { return _metadata; }
42 
44  inline const Swath & swath(char freq) const { return _swaths.at(freq); }
46  inline Swath & swath(char freq) { return _swaths[freq]; }
48  inline void swath(const Swath & s, char freq) { _swaths[freq] = s; }
49 
51  inline isce3::core::LookSide lookSide() const { return _lookSide; }
53  inline void lookSide(isce3::core::LookSide side) { _lookSide = side; }
55  inline void lookSide(const std::string &);
56 
58  inline std::string filename() const { return _filename; }
59 
60  private:
61  isce3::product::Metadata _metadata;
62  std::map<char, isce3::product::Swath> _swaths;
63  std::string _filename;
64  isce3::core::LookSide _lookSide;
65 };
66 
70 Product(const Metadata & meta, const std::map<char, isce3::product::Swath> & swaths) :
71  _metadata(meta), _swaths(swaths) {}
72 
74 void
76 lookSide(const std::string & inputLook) {
77  _lookSide = isce3::core::parseLookSide(inputLook);
78 }
Swath & swath(char freq)
Get a reference to a swath.
Definition: Product.h:46
Definition: Swath.h:25
void swath(const Swath &s, char freq)
Set a swath.
Definition: Product.h:48
Definition: Metadata.h:24
const Swath & swath(char freq) const
Get a read-only reference to a swath.
Definition: Product.h:44
LookSide
Side that radar looks at, Left or Right.
Definition: LookSide.h:13
std::string filename() const
Get the filename of the HDF5 file.
Definition: Product.h:58
Definition: IH5.h:463
Metadata & metadata()
Get a reference to the metadata.
Definition: Product.h:41
Product(isce3::io::IH5File &)
Constructor from IH5File object.
Definition: Product.cpp:6
const Metadata & metadata() const
Get a read-only reference to the metadata.
Definition: Product.h:39
void lookSide(isce3::core::LookSide side)
Set look direction using enum.
Definition: Product.h:53
LookSide parseLookSide(const std::string &str)
Parse string (e.g., &quot;left&quot; or &quot;right&quot;) to enum LookSide.
Definition: LookSide.cpp:13
Definition: Product.h:29
isce3::core::LookSide lookSide() const
Get the look direction.
Definition: Product.h:51

Generated for ISCE3.0 by doxygen 1.8.5.