libSplash
Public Member Functions | Static Public Member Functions | List of all members
splash::ColTypeString Class Reference

#include <ColTypeString.hpp>

Inheritance diagram for splash::ColTypeString:
Inheritance graph
[legend]
Collaboration diagram for splash::ColTypeString:
Collaboration graph
[legend]

Public Member Functions

 ColTypeString (size_t len)
 
size_t getSize () const
 
std::string toString () const
 
bool isVariableLength () const
 
bool isNullTerminated () const
 
- Public Member Functions inherited from splash::CollectionType
const H5DataType & getDataType () const
 
virtual ~CollectionType ()
 

Static Public Member Functions

static CollectionTypegenType (hid_t datatype_id)
 

Detailed Description

Variable and fixed length strings

Do not forget that C-strings are NULL-terminated. As in <cstring>'s strlen() our length in the API does not count the terminator, but c-strings still MUST end with it, else HDF5 write/reads will fail.

See also
https://hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-SetSize
http://hdfgroup.org/HDF5/doc/RM/RM_H5T.html#CreateVLString

Definition at line 43 of file ColTypeString.hpp.

Member Function Documentation

◆ getSize()

size_t splash::ColTypeString::getSize ( ) const
inlinevirtual

Returns the size in bytes of the datatype.

Returns
size of datatype in bytes

Implements splash::CollectionType.

Definition at line 66 of file ColTypeString.hpp.

◆ toString()

std::string splash::ColTypeString::toString ( ) const
inlinevirtual

Returns a human-readable representation of the datatype.

Returns
the name of the datatype as a string

Implements splash::CollectionType.

Definition at line 93 of file ColTypeString.hpp.


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