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


The HDF Group Help Desk:
  Copyright by The HDF Group
and the Board of Trustees of the University of Illinois