h5geo 0.4.0
C++17 and python API to work with geo-data (seismic, wells, maps, other in process) based on HDF5. Aimed at geoscientists and developers.
Loading...
Searching...
No Matches
h5basecontainerimpl.h
1#ifndef H5BASECONTAINERIMPL_H
2#define H5BASECONTAINERIMPL_H
3
4#include "../h5basecontainer.h"
5#include "h5baseimpl.h"
6
7#include <h5gt/H5File.hpp>
8
9template <typename TBase = H5BaseContainer>
10class H5BaseContainerImpl : public H5BaseImpl<TBase>
11{
12protected:
13 explicit H5BaseContainerImpl(const h5gt::File &h5File);
14 virtual ~H5BaseContainerImpl() = default;
15
16public:
17 virtual H5Base* clone() override;
18
19 virtual H5BaseObject* openObject(
20 const std::string& name) override;
21 virtual H5BaseObject* openObject(
22 h5gt::Group group) override;
23
24 virtual H5BasePoints* openPoints(
25 const std::string& name) override;
26 virtual H5BasePoints* openPoints(
27 h5gt::Group group) override;
28
29 virtual H5Horizon* openHorizon(
30 const std::string& name) override;
31 virtual H5Horizon* openHorizon(
32 h5gt::Group group) override;
33
34 virtual H5Points1* createPoints1(
35 std::string& name,
37 h5geo::CreationType createFlag) override;
38 virtual H5Points1* createPoints1(
39 h5gt::Group group,
41 h5geo::CreationType createFlag) override;
42 virtual H5Points2* createPoints2(
43 std::string& name,
45 h5geo::CreationType createFlag) override;
46 virtual H5Points2* createPoints2(
47 h5gt::Group group,
49 h5geo::CreationType createFlag) override;
50 virtual H5Points3* createPoints3(
51 std::string& name,
53 h5geo::CreationType createFlag) override;
54 virtual H5Points3* createPoints3(
55 h5gt::Group group,
57 h5geo::CreationType createFlag) override;
58 virtual H5Points4* createPoints4(
59 std::string& name,
61 h5geo::CreationType createFlag) override;
62 virtual H5Points4* createPoints4(
63 h5gt::Group group,
65 h5geo::CreationType createFlag) override;
66
67 virtual H5Horizon* createHorizon(
68 std::string& name,
70 h5geo::CreationType createFlag) override;
71 virtual H5Horizon* createHorizon(
72 h5gt::Group group,
74 h5geo::CreationType createFlag) override;
75
76 virtual h5gt::File getH5File() const override;
77
78 virtual std::vector<h5gt::Group> getObjGroupList(const h5geo::ObjectType& objType, bool recursive) override;
79 virtual std::vector<std::string> getObjNameList(const h5geo::ObjectType& objType, bool recursive) override;
80 virtual size_t getObjCount(const h5geo::ObjectType& objType, bool recursive) override;
81 virtual h5geo::ContainerType getContainerType() override;
82
84 virtual bool isEqual(H5BaseContainer* other) const override;
85
86 virtual bool operator == (const H5BaseContainer& other) const override;
87 virtual bool operator != (const H5BaseContainer& other) const override;
88
89 //----------- FRIEND CLASSES -----------
91 h5gt::File h5File);
93 const std::string& fileName);
94 friend H5BaseContainer* h5geo::openContainer(h5gt::File h5File);
95
96protected:
97 h5gt::File h5File;
98};
99
100#endif // H5BASECONTAINERIMPL_H
Base class for geo-containers.
Definition h5basecontainer.h:9
Definition h5basecontainerimpl.h:11
virtual bool operator!=(const H5BaseContainer &other) const override
Check if containers are not the same (compares HDF5 files)
Definition h5basecontainerimpl.cpp:304
virtual std::vector< std::string > getObjNameList(const h5geo::ObjectType &objType, bool recursive) override
Find all geo-objects of specified type within current container and return them as vector of names.
Definition h5basecontainerimpl.cpp:270
virtual bool operator==(const H5BaseContainer &other) const override
Check if containers are the same (compares HDF5 files)
Definition h5basecontainerimpl.cpp:299
virtual size_t getObjCount(const h5geo::ObjectType &objType, bool recursive) override
Get number of geo-objects of specified type within current container.
Definition h5basecontainerimpl.cpp:277
virtual H5Base * clone() override
virtual H5BasePoints * openPoints(const std::string &name) override
Open H5BasePoints derived points.
Definition h5basecontainerimpl.cpp:71
virtual bool isEqual(H5BaseContainer *other) const override
Does the same as operator '=='.
Definition h5basecontainerimpl.cpp:291
virtual h5geo::ContainerType getContainerType() override
Get current container type.
Definition h5basecontainerimpl.cpp:284
virtual H5BaseObject * openObject(const std::string &name) override
Open geo-object.
Definition h5basecontainerimpl.cpp:53
virtual std::vector< h5gt::Group > getObjGroupList(const h5geo::ObjectType &objType, bool recursive) override
Find all geo-objects of specified type within current container and return them as vector of Groups.
Definition h5basecontainerimpl.cpp:263
virtual h5gt::File getH5File() const override
Get HDF5 file.
Definition h5basecontainerimpl.cpp:257
Base class for all geo-containers and geo-objects.
Definition h5base.h:182
Definition h5baseimpl.h:8
Base class for geo-objects.
Definition h5baseobject.h:13
Base class for Points.
Definition h5basepoints.h:16
Provides API to work with horizons.
Definition h5horizon.h:17
Provides API to work with 1D points.
Definition h5points1.h:12
Provides API to work with 2D points.
Definition h5points2.h:12
Provides API to work with 3D points.
Definition h5points3.h:12
Provides API to work with 4D points.
Definition h5points4.h:12
H5GEO_EXPORT H5BaseContainer * openBaseContainerByName(const std::string &fileName)
Factory function for opening H5BaseContainer.
Definition h5baseimpl.cpp:1707
H5GEO_EXPORT H5BaseContainer * openContainer(h5gt::File h5File)
Factory function for opening geo-container.
Definition h5baseimpl.cpp:1723
CreationType
Definition h5enum.h:468
H5GEO_EXPORT H5BaseContainer * openBaseContainer(h5gt::File h5File)
Factory function for opening H5BaseContainer.
Definition h5baseimpl.cpp:1701
Class for creating H5Horizon.
Definition h5base.h:87
Common class for creating H5Points1, H5Points2, H5Points3, H5Points4.
Definition h5base.h:71