h5cpp
0.3.3
A modern C++ wrapper for the HDF5 C library
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Namespace Members
+
All
a
c
d
e
f
g
i
k
l
m
n
o
p
r
s
t
v
+
Functions
c
g
i
l
m
o
p
r
Variables
Typedefs
Enumerations
Enumerator
+
Classes
Class List
Class Index
Class Hierarchy
+
Class Members
+
All
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
+
Functions
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
~
Variables
+
Typedefs
b
c
d
i
n
p
r
s
t
u
v
Enumerations
Related Functions
+
Files
File List
+
File Members
All
Typedefs
Macros
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Modules
Pages
h5cpp
src
h5cpp
core
context.hpp
Go to the documentation of this file.
1
//
2
// (c) Copyright 2017 DESY,ESS
3
//
4
// This file is part of h5pp.
5
//
6
// This library is free software; you can redistribute it and/or modify it
7
// under the terms of the GNU Lesser General Public License as published
8
// by the Free Software Foundation; either version 2.1 of the License, or
9
// (at your option) any later version.
10
//
11
// This library is distributed in the hope that it will be useful, but
12
// WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY
13
// or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14
// License for more details.
15
//
16
// You should have received a copy of the GNU Lesser General Public License
17
// along with this library; if not, write to the
18
// Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
19
// Boston, MA 02110-1301 USA
20
// ===========================================================================
21
//
22
// Author: Martin Shetty <martin.shetty@esss.se>
23
//
24
#pragma once
25
26
#include <
object_id.hpp
>
27
#include <map>
28
#include <mutex>
29
30
namespace
hdf5
31
{
32
33
class
Context
34
{
35
public
:
36
void
open
(
const
hid_t&);
37
bool
is_open
(
const
hid_t&)
const
;
38
void
close
(
const
hid_t&);
39
40
private
:
41
mutable
std::mutex mutex_;
42
std::map<id, hid_t> objects_;
43
44
void
close
(
const
id
&);
45
46
//singleton assurance
47
public
:
48
static
Context
&
singleton
()
49
{
50
static
Context
singleton_instance;
51
return
singleton_instance;
52
}
53
54
Context
(
Context
const
&) =
delete
;
55
void
operator=
(
Context
const
&) =
delete
;
56
57
private
:
58
Context
() {}
59
~
Context
();
60
};
61
62
63
}
hdf5::Context::operator=
void operator=(Context const &)=delete
object_id.hpp
hdf5::Context::open
void open(const hid_t &)
hdf5::Context
Definition:
context.hpp:33
hdf5
Definition:
attribute.hpp:43
hdf5::Context::singleton
static Context & singleton()
Definition:
context.hpp:48
hdf5::Context::is_open
bool is_open(const hid_t &) const
hdf5::Context::close
void close(const hid_t &)
Generated on Mon Nov 29 2021 15:15:10 for h5cpp by
1.8.13