Skip to content

Commit

Permalink
Normalize C++ w/ develop (#3279)
Browse files Browse the repository at this point in the history
  • Loading branch information
derobins authored Jul 27, 2023
1 parent 576aed7 commit 6ab7357
Show file tree
Hide file tree
Showing 49 changed files with 249 additions and 990 deletions.
14 changes: 7 additions & 7 deletions c++/examples/h5tutr_extend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ main(void)
// ---------------------------------------

int rdata[10][3];
int i, j, rank, rank_chunk;
int i, j, rank;
hsize_t chunk_dimsr[2], dimsr[2];

// Open the file and dataset.
Expand All @@ -111,13 +111,13 @@ main(void)
prop = dataset->getCreatePlist();

// Get information to obtain memory dataspace.
rank = filespace->getSimpleExtentNdims();
herr_t status_n = filespace->getSimpleExtentDims(dimsr);
rank = filespace->getSimpleExtentNdims();
(void)filespace->getSimpleExtentDims(dimsr);

if (H5D_CHUNKED == prop.getLayout())
rank_chunk = prop.getChunk(rank, chunk_dimsr);
cout << "rank chunk = " << rank_chunk << endl;
;
if (H5D_CHUNKED == prop.getLayout()) {
int rank_chunk = prop.getChunk(rank, chunk_dimsr);
cout << "rank chunk = " << rank_chunk << endl;
}

memspace = new DataSpace(rank, dimsr, NULL);
dataset->read(rdata, PredType::NATIVE_INT, *memspace, *filespace);
Expand Down
4 changes: 2 additions & 2 deletions c++/examples/readdata.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ main(void)
* Get order of datatype and print message if it's a little endian.
*/
H5std_string order_string;
H5T_order_t order = intype.getOrder(order_string);
(void)intype.getOrder(order_string);
cout << order_string << endl;

/*
Expand All @@ -109,7 +109,7 @@ main(void)
* display them.
*/
hsize_t dims_out[2];
int ndims = dataspace.getSimpleExtentDims(dims_out, NULL);
(void)dataspace.getSimpleExtentDims(dims_out, NULL);
cout << "rank " << rank << ", dimensions " << (unsigned long)(dims_out[0]) << " x "
<< (unsigned long)(dims_out[1]) << endl;

Expand Down
4 changes: 0 additions & 4 deletions c++/examples/testh5c++.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,6 @@
# [email protected].
#
# Tests for the h5c++ compiler tool
# Created: Albert Cheng, 2007/3/14
#
# Modification:
#

srcdir=@srcdir@

Expand Down
12 changes: 0 additions & 12 deletions c++/src/H5AbstractDs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
///\brief Default constructor
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::AbstractDs()
{
Expand All @@ -44,7 +43,6 @@ AbstractDs::AbstractDs()
//--------------------------------------------------------------------------
// Function: AbstractDs default constructor
///\brief Creates an AbstractDs instance using an existing id.
// Programmer Binh-Minh Ribler - 2000
//
// *** Deprecation warning ***
// This constructor is no longer appropriate because the data member "id" had
Expand All @@ -60,7 +58,6 @@ AbstractDs::AbstractDs()
/// object, which can be a dataset or an attribute.
///\return Datatype class identifier
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_class_t
AbstractDs::getTypeClass() const
Expand Down Expand Up @@ -107,7 +104,6 @@ AbstractDs::getTypeClass() const
/// can be a dataset or an attribute.
///\return DataType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
DataType
AbstractDs::getDataType() const
Expand Down Expand Up @@ -135,7 +131,6 @@ AbstractDs::getDataType() const
/// can be a dataset or an attribute.
///\return ArrayType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
ArrayType
AbstractDs::getArrayType() const
Expand Down Expand Up @@ -165,7 +160,6 @@ AbstractDs::getArrayType() const
/// can be a dataset or an attribute.
///\return CompType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
CompType
AbstractDs::getCompType() const
Expand Down Expand Up @@ -193,7 +187,6 @@ AbstractDs::getCompType() const
/// can be a dataset or an attribute.
///\return EnumType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
EnumType
AbstractDs::getEnumType() const
Expand Down Expand Up @@ -221,7 +214,6 @@ AbstractDs::getEnumType() const
/// can be a dataset or an attribute.
///\return IntType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
IntType
AbstractDs::getIntType() const
Expand Down Expand Up @@ -249,7 +241,6 @@ AbstractDs::getIntType() const
/// which can be a dataset or an attribute.
///\return FloatType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
FloatType
AbstractDs::getFloatType() const
Expand Down Expand Up @@ -277,7 +268,6 @@ AbstractDs::getFloatType() const
/// can be a dataset or an attribute.
///\return StrType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
StrType
AbstractDs::getStrType() const
Expand Down Expand Up @@ -305,7 +295,6 @@ AbstractDs::getStrType() const
/// which can be a dataset or an attribute.
///\return VarLenType instance
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Jul, 2005
//--------------------------------------------------------------------------
VarLenType
AbstractDs::getVarLenType() const
Expand All @@ -330,7 +319,6 @@ AbstractDs::getVarLenType() const
//--------------------------------------------------------------------------
// Function: AbstractDs destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AbstractDs::~AbstractDs()
{
Expand Down
11 changes: 0 additions & 11 deletions c++/src/H5ArrayType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: ArrayType default constructor
///\brief Default constructor: Creates a stub ArrayType
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType() : DataType()
{
Expand All @@ -42,7 +41,6 @@ ArrayType::ArrayType() : DataType()
///\brief Creates an ArrayType object using an existing id.
///\param existing_id - IN: Id of an existing datatype
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id)
{
Expand All @@ -51,7 +49,6 @@ ArrayType::ArrayType(const hid_t existing_id) : DataType(existing_id)
//--------------------------------------------------------------------------
// Function: ArrayType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const ArrayType &original) : DataType(original)
{
Expand All @@ -65,7 +62,6 @@ ArrayType::ArrayType(const ArrayType &original) : DataType(original)
///\param ndims - IN: Rank of the array, [0..H5S_MAX_RANK]
///\param dims - IN: Size of each array dimension
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims) : DataType()
{
Expand All @@ -88,7 +84,6 @@ ArrayType::ArrayType(const DataType &base_type, int ndims, const hsize_t *dims)
///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const char*) to
Expand All @@ -107,7 +102,6 @@ ArrayType::ArrayType(const H5Location &loc, const char *dtype_name) : DataType()
///\param loc - IN: Location of the type
///\param dtype_name - IN: Array type name
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Dec 2016
// Description
// In 1.10.1, this constructor was introduced and may replace the
// existing function CommonFG::openArrayType(const H5std_string&)
Expand All @@ -128,7 +122,6 @@ ArrayType::ArrayType(const H5Location &loc, const H5std_string &dtype_name) : Da
// Description
// Closes the id on the lhs object first with setId, then copies
// each data member from the rhs object. (Issue HDFFV-9562)
// Programmer Binh-Minh Ribler - Mar 2016
//--------------------------------------------------------------------------
ArrayType &
ArrayType::operator=(const ArrayType &rhs)
Expand All @@ -153,7 +146,6 @@ ArrayType::operator=(const ArrayType &rhs)
/// binary object description of this type.
///
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Aug 2017
//--------------------------------------------------------------------------
DataType *
ArrayType::decode() const
Expand All @@ -175,7 +167,6 @@ ArrayType::decode() const
///\brief Returns the number of dimensions for an array datatype.
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int
ArrayType::getArrayNDims() const
Expand All @@ -195,7 +186,6 @@ ArrayType::getArrayNDims() const
///\param dims - OUT: Sizes of dimensions
///\return Number of dimensions
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
int
ArrayType::getArrayDims(hsize_t *dims) const
Expand All @@ -212,7 +202,6 @@ ArrayType::getArrayDims(hsize_t *dims) const
//--------------------------------------------------------------------------
// Function: ArrayType destructor
///\brief Properly terminates access to this array datatype.
// Programmer Binh-Minh Ribler - May 2004
//--------------------------------------------------------------------------
ArrayType::~ArrayType()
{
Expand Down
14 changes: 0 additions & 14 deletions c++/src/H5AtomType.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ namespace H5 {
//--------------------------------------------------------------------------
// Function: AtomType default constructor [protected]
// Purpose Default constructor: creates a stub atomic datatype.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType() : DataType()
{
Expand All @@ -43,7 +42,6 @@ AtomType::AtomType() : DataType()
// Purpose Creates an AtomType object using an existing id.
// Parameter existing_id - IN: Id of an existing datatype
// Exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType(const hid_t existing_id) : DataType(existing_id)
{
Expand All @@ -52,7 +50,6 @@ AtomType::AtomType(const hid_t existing_id) : DataType(existing_id)
//--------------------------------------------------------------------------
// Function: AtomType copy constructor
///\brief Copy constructor: same HDF5 object as \a original
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::AtomType(const AtomType &original) : DataType(original)
{
Expand All @@ -64,7 +61,6 @@ AtomType::AtomType(const AtomType &original) : DataType(original)
///\brief Sets the total size for an atomic datatype.
///\param size - IN: Size to set
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setSize(size_t size) const
Expand All @@ -84,7 +80,6 @@ AtomType::setSize(size_t size) const
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - Mar, 2005
//--------------------------------------------------------------------------
H5T_order_t
AtomType::getOrder() const
Expand Down Expand Up @@ -114,7 +109,6 @@ AtomType::getOrder() const
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
H5T_order_t
AtomType::getOrder(H5std_string &order_string) const
Expand All @@ -140,7 +134,6 @@ AtomType::getOrder(H5std_string &order_string) const
/// \li \c H5T_ORDER_BE
/// \li \c H5T_ORDER_VAX
///\exception H5::DataTypeIException
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setOrder(H5T_order_t order) const
Expand All @@ -161,7 +154,6 @@ AtomType::setOrder(H5T_order_t order) const
/// The precision is the number of significant bits which,
/// unless padding is present, is 8 times larger than the
/// value returned by \c DataType::getSize().
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
size_t
AtomType::getPrecision() const
Expand All @@ -184,7 +176,6 @@ AtomType::getPrecision() const
///\par Description
/// For information, please refer to the H5Tset_precision API in
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setPrecision(size_t precision) const
Expand All @@ -204,7 +195,6 @@ AtomType::setPrecision(size_t precision) const
///\par Description
/// For information, please refer to the H5Tget_offset API in
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
// Modification
// 12/05/00: due to C API change
// - return type changed from size_t to int
Expand All @@ -230,7 +220,6 @@ AtomType::getOffset() const
///\par Description
/// For information, please refer to the H5Tset_offset API in
/// the HDF5 C Reference Manual.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setOffset(size_t offset) const
Expand All @@ -254,7 +243,6 @@ AtomType::setOffset(size_t offset) const
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
/// \li \c H5T_PAD_ONE (1) - Set background to ones.
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const
Expand All @@ -277,7 +265,6 @@ AtomType::getPad(H5T_pad_t &lsb, H5T_pad_t &msb) const
/// \li \c H5T_PAD_ZERO (0) - Set background to zeros.
/// \li \c H5T_PAD_ONE (1) - Set background to ones.
/// \li \c H5T_PAD_BACKGROUND (2) - Leave background alone.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
void
AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
Expand All @@ -293,7 +280,6 @@ AtomType::setPad(H5T_pad_t lsb, H5T_pad_t msb) const
//--------------------------------------------------------------------------
// Function: AtomType destructor
///\brief Noop destructor.
// Programmer Binh-Minh Ribler - 2000
//--------------------------------------------------------------------------
AtomType::~AtomType()
{
Expand Down
Loading

0 comments on commit 6ab7357

Please sign in to comment.