UNIVERS  15.3
UNIVERS base processing software API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
seismic.hpp
1 /* abstract_seis.hpp */
2 /* $Id$ */
3 #ifndef __hds_db_seismic_hpp
4 #define __hds_db_seismic_hpp
5 
6 #include <vector>
7 #include <hds_db/base/object.hpp>
8 #include <hds_db/base/tr_header.hpp>
9 #include <hds_db/base/volume_header.hpp>
10 #include <hds_db/base/tr_selector.hpp>
11 
13 namespace hds
14 {
16  namespace db
17  {
19  class Seismic : public Object
20  {
21  public:
22 
24  Seismic(const std::string &project_str);
25 
27  virtual ~Seismic();
28 
29 
31  const std::string& getProject() const;
32 
33 
34  //--- Reading facilities -------------------------------------------------------------------
35 
38  virtual ErrCode getVolumeHeader(VolumeHeader &vol_header) const = 0;
39 
42  virtual size_t tracesNum(ErrCode *prc = NULL) const = 0;
43 
44 
47  virtual DbIndex rawDbIndex(size_t id, ErrCode *prc = NULL) const = 0;
48 
49 
52  virtual const TrHeader& rawTrHeader(const DbIndex &id, ErrCode *prc = NULL) const = 0;
53 
56  virtual const TrHeader& trHeader(size_t id, ErrCode *prc = NULL) const;
57 
58 
61  virtual const TrBody& rawTrBody(const DbIndex &id, ErrCode *prc = NULL) const = 0;
62 
65  virtual const TrBody& trBody(size_t id, ErrCode *prc = NULL) const;
66 
67 
68  //--- Writing/editing facilities -----------------------------------------------------------
69 
72  virtual ErrCode setVolumeHeader(const VolumeHeader &vol_header) = 0;
73 
76  virtual ErrCode rawSetTrHeader(const DbIndex &id, const TrHeader &hdr) = 0;
77 
80  virtual ErrCode setTrHeader(size_t id, const TrHeader &hdr);
81 
84  virtual ErrCode rawSetTrBody(const DbIndex &id, const TrBody &body) = 0;
85 
88  virtual ErrCode setTrBody(size_t id, const TrBody &body);
89 
92  virtual ErrCode appendTr(const TrHeader &header, const TrBody &body) = 0;
93 
96  virtual ErrCode eraseTr(size_t id) = 0;
97 
98  //--- Selection facilities -----------------------------------------------------------------
99 
103  virtual ErrCode select(const TrSelector &selector = TrSelector()) = 0;
104 
106  virtual const TrSelector& getSelector() const = 0;
107 
108 
110  const TrHeader& getDefaultTrHeader() const;
111 
112  protected:
113 
115  std::string m_project_str;
116  };
117  }; // db
118 }; // hds
119 
120 #endif /* hds_db_seismic_hpp */
virtual ErrCode setTrHeader(size_t id, const TrHeader &hdr)
virtual ErrCode setTrBody(size_t id, const TrBody &body)
const TrHeader & getDefaultTrHeader() const
Definition: seismic.hpp:19
uint64_t DbIndex
Definition: defines.hpp:26
Definition: volume_header.hpp:17
virtual const TrHeader & trHeader(size_t id, ErrCode *prc=NULL) const
virtual const TrSelector & getSelector() const =0
std::string m_project_str
Definition: seismic.hpp:115
ErrCode
Definition: defines.hpp:46
Definition: tr_selector.hpp:183
Seismic(const std::string &project_str)
virtual ErrCode appendTr(const TrHeader &header, const TrBody &body)=0
std::vector< AmplT > TrBody
Definition: defines.hpp:23
const std::string & getProject() const
virtual DbIndex rawDbIndex(size_t id, ErrCode *prc=NULL) const =0
virtual const TrHeader & rawTrHeader(const DbIndex &id, ErrCode *prc=NULL) const =0
virtual size_t tracesNum(ErrCode *prc=NULL) const =0
virtual const TrBody & trBody(size_t id, ErrCode *prc=NULL) const
virtual ErrCode select(const TrSelector &selector=TrSelector())=0
virtual ErrCode setVolumeHeader(const VolumeHeader &vol_header)=0
virtual ErrCode getVolumeHeader(VolumeHeader &vol_header) const =0
virtual const TrBody & rawTrBody(const DbIndex &id, ErrCode *prc=NULL) const =0
virtual ~Seismic()
Definition: object.hpp:18
Definition: tr_header.hpp:17
virtual ErrCode rawSetTrHeader(const DbIndex &id, const TrHeader &hdr)=0
virtual ErrCode eraseTr(size_t id)=0
virtual ErrCode rawSetTrBody(const DbIndex &id, const TrBody &body)=0