QMCPACK
h5data_proxy< std::bitset< N > > Struct Template Reference

specialization for std::bitset<N> More...

+ Collaboration diagram for h5data_proxy< std::bitset< N > >:

Public Types

using data_type = std::bitset< N >
 

Public Member Functions

 h5data_proxy (const data_type &a)
 
bool read (data_type &ref, hid_t grp, const std::string &aname, hid_t xfer_plist=H5P_DEFAULT)
 
bool write (const data_type &ref, hid_t grp, const std::string &aname, hid_t xfer_plist=H5P_DEFAULT) const
 

Detailed Description

template<std::size_t N>
struct qmcplusplus::h5data_proxy< std::bitset< N > >

specialization for std::bitset<N>

Definition at line 106 of file hdf_stl.h.

Member Typedef Documentation

◆ data_type

using data_type = std::bitset<N>

Definition at line 108 of file hdf_stl.h.

Constructor & Destructor Documentation

◆ h5data_proxy()

h5data_proxy ( const data_type a)
inline

Definition at line 110 of file hdf_stl.h.

110 {}

Member Function Documentation

◆ read()

bool read ( data_type ref,
hid_t  grp,
const std::string &  aname,
hid_t  xfer_plist = H5P_DEFAULT 
)
inline

Definition at line 112 of file hdf_stl.h.

References h5data_proxy< T >::read().

113  {
114  unsigned long c = ref.to_ulong();
115  h5data_proxy<unsigned long> hc(c);
116  if (hc.read(ref, grp, aname, xfer_plist))
117  {
118  ref = c;
119  return true;
120  }
121  else
122  return false;
123  }

◆ write()

bool write ( const data_type ref,
hid_t  grp,
const std::string &  aname,
hid_t  xfer_plist = H5P_DEFAULT 
) const
inline

Definition at line 125 of file hdf_stl.h.

References h5data_proxy< T >::write().

126  {
127  unsigned long c = ref.to_ulong();
128  h5data_proxy<unsigned long> hc(c);
129  return hc.write(ref, grp, aname, xfer_plist);
130  }

The documentation for this struct was generated from the following file: