My Project  1.10.11
H5StrType.h
1 // C++ informative line for the emacs editor: -*- C++ -*-
2 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
3  * Copyright by The HDF Group. *
4  * All rights reserved. *
5  * *
6  * This file is part of HDF5. The full HDF5 copyright notice, including *
7  * terms governing use, modification, and redistribution, is contained in *
8  * the COPYING file, which can be found at the root of the source code *
9  * distribution tree, or in https://www.hdfgroup.org/licenses. *
10  * If you do not have access to either file, you may request a copy from *
11  * help@hdfgroup.org. *
12  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
13 
14 #ifndef H5StrType_H
15 #define H5StrType_H
16 
17 namespace H5 {
18 
23 // Inheritance: AtomType -> DataType -> H5Object -> H5Location -> IdComponent
24 class H5_DLLCPP StrType : public AtomType {
25  public:
26  // Creates a string type using a predefined type
27  StrType(const PredType &pred_type);
28 
29  // Creates a string type with specified length - may be obsolete
30  StrType(const PredType &pred_type, const size_t &size);
31 
32  // Creates a string type with specified length
33  StrType(const int dummy, const size_t &size);
34 
35  // Gets the string datatype of the specified dataset
36  StrType(const DataSet &dataset);
37 
38  // Constructors that open an HDF5 string datatype, given a location.
39  StrType(const H5Location &loc, const char *name);
40  StrType(const H5Location &loc, const H5std_string &name);
41 
42  // Returns an StrType object via DataType* by decoding the
43  // binary object description of this type.
44  virtual DataType *decode() const;
45 
46  // Retrieves the character set type of this string datatype.
47  H5T_cset_t getCset() const;
48 
49  // Sets character set to be used.
50  void setCset(H5T_cset_t cset) const;
51 
52  // Retrieves the string padding method for this string datatype.
53  H5T_str_t getStrpad() const;
54 
55  // Defines the storage mechanism for character strings.
56  void setStrpad(H5T_str_t strpad) const;
57 
59  virtual H5std_string
60  fromClass() const
61  {
62  return ("StrType");
63  }
64 
65  // default constructor
66  StrType();
67 
68  // Creates a string datatype using an existing id
69  StrType(const hid_t existing_id);
70 
71  // Copy constructor: same as the original StrType.
72  StrType(const StrType &original);
73 
74  // Noop destructor.
75  virtual ~StrType();
76 
77 }; // end of StrType
78 } // namespace H5
79 
80 #endif // H5StrType_H
H5::StrType::fromClass
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5StrType.h:60
H5::PredType::C_S1
static const PredType & C_S1
Definition: H5PredType.h:87
H5::StrType::setStrpad
void setStrpad(H5T_str_t strpad) const
Defines the storage mechanism for this string datatype.
Definition: H5StrType.cpp:297
H5::StrType::StrType
StrType(const int dummy, const size_t &size)
H5::AtomType
AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType.
Definition: H5AtomType.h:27
H5::DataType::copy
void copy(const DataType &like_type)
Copies an existing datatype to this datatype object.
Definition: H5DataType.cpp:208
H5::DataSet
Class DataSet operates on HDF5 datasets.
Definition: H5DataSet.h:27
H5::DataTypeIException
Definition: H5Exception.h:109
H5::PredType
Class PredType holds the definition of all the HDF5 predefined datatypes.
Definition: H5PredType.h:27
H5::StrType::getCset
H5T_cset_t getCset() const
Retrieves the character set type of this string datatype.
Definition: H5StrType.cpp:229
H5::AtomType::setSize
void setSize(size_t size) const
Sets the total size for an atomic datatype.
Definition: H5AtomType.cpp:70
H5::DataSet::getId
virtual hid_t getId() const
Get the id of this dataset.
Definition: H5DataSet.cpp:693
H5::StrType
StrType is a derivative of a DataType and operates on HDF5 string datatype.
Definition: H5StrType.h:24
H5::StrType::setCset
void setCset(H5T_cset_t cset) const
Sets character set to be used.
Definition: H5StrType.cpp:256
H5::StrType::decode
virtual DataType * decode() const
Returns an StrType object via DataType* by decoding the binary object description of this type.
Definition: H5StrType.cpp:199
H5::StrType::StrType
StrType()
Default constructor: Creates a stub string datatype.
Definition: H5StrType.cpp:43
H5::StrType::~StrType
virtual ~StrType()
Properly terminates access to this string datatype.
Definition: H5StrType.cpp:310
H5::StrType::getStrpad
H5T_str_t getStrpad() const
Retrieves the storage mechanism for of this string datatype.
Definition: H5StrType.cpp:275
H5
Definition: H5AbstractDs.cpp:33
H5::DataType
Class DataType provides generic operations on HDF5 datatypes.
Definition: H5DataType.h:27
H5::H5Location
H5Location is an abstract base class, added in version 1.8.12.
Definition: H5Location.h:30
H5::DataSetIException
Definition: H5Exception.h:130


The HDF Group Help Desk:
  Copyright by The HDF Group