HDF5 C++ API  1.8.12
 All Classes Namespaces Files Functions Variables Typedefs Macros Pages
H5StrType.h
Go to the documentation of this file.
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 files COPYING and Copyright.html. COPYING can be found at the root *
10  * of the source code distribution tree; Copyright.html can be found at the *
11  * root level of an installed copy of the electronic HDF5 document set and *
12  * is linked from the top-level documents page. It can also be found at *
13  * http://hdfgroup.org/HDF5/doc/Copyright.html. If you do not have *
14  * access to either file, you may request a copy from help@hdfgroup.org. *
15  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
16 
17 #ifndef __H5StrType_H
18 #define __H5StrType_H
19 
20 #ifndef H5_NO_NAMESPACE
21 namespace H5 {
22 #endif
23 
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  // Retrieves the character set type of this string datatype.
40  H5T_cset_t getCset() const;
41 
42  // Sets character set to be used.
43  void setCset(H5T_cset_t cset) const;
44 
45  // Retrieves the string padding method for this string datatype.
46  H5T_str_t getStrpad() const;
47 
48  // Defines the storage mechanism for character strings.
49  void setStrpad(H5T_str_t strpad) const;
50 
52  virtual H5std_string fromClass () const { return("StrType"); }
53 
54  // default constructor
55  StrType();
56 
57  // Creates a string datatype using an existing id
58  StrType(const hid_t existing_id);
59 
60  // Copy constructor - makes a copy of the original object
61  StrType(const StrType& original);
62 
63  // Noop destructor.
64  virtual ~StrType();
65 };
66 #ifndef H5_NO_NAMESPACE
67 }
68 #endif
69 #endif // __H5StrType_H
Class DataSet operates on HDF5 datasets.
Definition: H5DataSet.h:31
Class PredType holds the definition of all the HDF5 predefined datatypes.
Definition: H5PredType.h:41
virtual H5std_string fromClass() const
Returns this class name.
Definition: H5StrType.h:52
#define H5std_string
Definition: H5Exception.h:29
Class StrType operates on HDF5 string datatypes.
Definition: H5StrType.h:25
Class AtomType is a base class, inherited by IntType, FloatType, StrType, and PredType.
Definition: H5AtomType.h:31