summaryrefslogtreecommitdiffstats
path: root/c++/src/H5IdComponent.h
diff options
context:
space:
mode:
authorAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
committerAllen Byrne <byrn@hdfgroup.org>2020-09-30 14:27:10 (GMT)
commitb2d661b508a7fc7a2592c13bc6bdc175551f075d (patch)
tree13baeb0d83a7c2a4c6299993c182b1227c2f6114 /c++/src/H5IdComponent.h
parent29ab58b58dce556639ea3154e262895773a8a8df (diff)
downloadhdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.zip
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.gz
hdf5-b2d661b508a7fc7a2592c13bc6bdc175551f075d.tar.bz2
Clang-format of source files
Diffstat (limited to 'c++/src/H5IdComponent.h')
-rw-r--r--c++/src/H5IdComponent.h109
1 files changed, 56 insertions, 53 deletions
diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h
index b4070b0..8db1af2 100644
--- a/c++/src/H5IdComponent.h
+++ b/c++/src/H5IdComponent.h
@@ -25,85 +25,88 @@ namespace H5 {
rarely needs them.
*/
class H5_DLLCPP IdComponent {
- public:
+ public:
+ // Increment reference counter.
+ void incRefCount(const hid_t obj_id) const;
+ void incRefCount() const;
- // Increment reference counter.
- void incRefCount(const hid_t obj_id) const;
- void incRefCount() const;
+ // Decrement reference counter.
+ void decRefCount(const hid_t obj_id) const;
+ void decRefCount() const;
- // Decrement reference counter.
- void decRefCount(const hid_t obj_id) const;
- void decRefCount() const;
+ // Get the reference counter to this identifier.
+ int getCounter(const hid_t obj_id) const;
+ int getCounter() const;
- // Get the reference counter to this identifier.
- int getCounter(const hid_t obj_id) const;
- int getCounter() const;
+ // Returns an HDF5 object type, given the object id.
+ static H5I_type_t getHDFObjType(const hid_t obj_id);
- // Returns an HDF5 object type, given the object id.
- static H5I_type_t getHDFObjType(const hid_t obj_id);
+ // Returns an HDF5 object type of this object.
+ H5I_type_t getHDFObjType() const;
- // Returns an HDF5 object type of this object.
- H5I_type_t getHDFObjType() const;
+ // Returns the number of members in a type.
+ static hsize_t getNumMembers(H5I_type_t type);
- // Returns the number of members in a type.
- static hsize_t getNumMembers(H5I_type_t type);
+ // Checks if the given ID is valid.
+ static bool isValid(hid_t an_id);
- // Checks if the given ID is valid.
- static bool isValid(hid_t an_id);
+ // Determines if an type exists.
+ static bool typeExists(H5I_type_t type);
- // Determines if an type exists.
- static bool typeExists(H5I_type_t type);
+ // Assignment operator.
+ IdComponent &operator=(const IdComponent &rhs);
- // Assignment operator.
- IdComponent& operator=(const IdComponent& rhs);
-
- // Sets the identifier of this object to a new value.
- void setId(const hid_t new_id);
+ // Sets the identifier of this object to a new value.
+ void setId(const hid_t new_id);
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- // Gets the identifier of this object.
- virtual hid_t getId () const = 0;
+ // Gets the identifier of this object.
+ virtual hid_t getId() const = 0;
- // Pure virtual function for there are various H5*close for the
- // subclasses.
- virtual void close() = 0;
+ // Pure virtual function for there are various H5*close for the
+ // subclasses.
+ virtual void close() = 0;
- // Makes and returns the string "<class-name>::<func_name>";
- // <class-name> is returned by fromClass().
- H5std_string inMemFunc(const char* func_name) const;
+ // Makes and returns the string "<class-name>::<func_name>";
+ // <class-name> is returned by fromClass().
+ H5std_string inMemFunc(const char *func_name) const;
- ///\brief Returns this class name.
- virtual H5std_string fromClass() const { return("IdComponent");}
+ ///\brief Returns this class name.
+ virtual H5std_string
+ fromClass() const
+ {
+ return ("IdComponent");
+ }
#endif // DOXYGEN_SHOULD_SKIP_THIS
- // Destructor
- virtual ~IdComponent();
+ // Destructor
+ virtual ~IdComponent();
#ifndef DOXYGEN_SHOULD_SKIP_THIS
- protected:
- // Default constructor.
- IdComponent();
+ protected:
+ // Default constructor.
+ IdComponent();
- // Gets the name of the file, in which an HDF5 object belongs.
- H5std_string p_get_file_name() const;
+ // Gets the name of the file, in which an HDF5 object belongs.
+ H5std_string p_get_file_name() const;
- // Verifies that the given id is valid.
- static bool p_valid_id(const hid_t obj_id);
+ // Verifies that the given id is valid.
+ static bool p_valid_id(const hid_t obj_id);
- // Sets the identifier of this object to a new value. - this one
- // doesn't increment reference count
- virtual void p_setId(const hid_t new_id) = 0;
+ // Sets the identifier of this object to a new value. - this one
+ // doesn't increment reference count
+ virtual void p_setId(const hid_t new_id) = 0;
- // This flag is used to decide whether H5dont_atexit should be called
- static bool H5dontAtexit_called;
+ // This flag is used to decide whether H5dont_atexit should be called
+ static bool H5dontAtexit_called;
- private:
- // This flag indicates whether H5Library::initH5cpp has been called
- // to register various terminating functions with atexit()
- static bool H5cppinit;
+ private:
+ // This flag indicates whether H5Library::initH5cpp has been called
+ // to register various terminating functions with atexit()
+ static bool H5cppinit;
#endif // DOXYGEN_SHOULD_SKIP_THIS