echelon  0.8.0
hdf5/precursor/object.hpp
1 // Copyright (c) 2012-2014 Christopher Hinz
2 //
3 // Distributed under the Boost Software License, Version 1.0. (See accompanying
4 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 
6 #ifndef ECHELON_HDF5_PRECURSOR_OBJECT_HPP
7 #define ECHELON_HDF5_PRECURSOR_OBJECT_HPP
8 
9 #include <hdf5.h>
10 #include <string>
11 
12 namespace echelon
13 {
14 namespace hdf5
15 {
16 namespace precursor
17 {
18 class dataset;
19 class group;
20 
21 struct share_ownership_t
22 {
23 };
24 
25 static constexpr share_ownership_t share_ownership = {};
26 
27 class object
28 {
29 public:
30  object();
31 
32  explicit object(hid_t object_id_);
33  object(hid_t object_id_, share_ownership_t);
34  object(hid_t loc_id_, const std::string& name);
35 
36  explicit object(const dataset& other);
37  explicit object(const group& other);
38 
39  object(const object& other);
40  object(object&& other);
41 
42  ~object();
43 
44  object& operator=(const object& other);
45  object& operator=(object&& other);
46 
47  hid_t id() const;
48 
49  explicit operator bool() const;
50 private:
51  hid_t object_id_;
52 };
53 
54 bool exists(const object& loc, const std::string& name);
55 std::string get_name(const object& loc);
56 }
57 }
58 }
59 
60 #endif
echelon&#39;s core namespace
Definition: attribute.cpp:10