HDF5 C++ API Reference Manual

 

 

 

Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | Examples

H5EnumType.h

Go to the documentation of this file.
00001 // C++ informative line for the emacs editor: -*- C++ -*-
00002 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
00003  * Copyright by the Board of Trustees of the University of Illinois.         *
00004  * All rights reserved.                                                      *
00005  *                                                                           *
00006  * This file is part of HDF5.  The full HDF5 copyright notice, including     *
00007  * terms governing use, modification, and redistribution, is contained in    *
00008  * the files COPYING and Copyright.html.  COPYING can be found at the root   *
00009  * of the source code distribution tree; Copyright.html can be found at the  *
00010  * root level of an installed copy of the electronic HDF5 document set and   *
00011  * is linked from the top-level documents page.  It can also be found at     *
00012  * http://hdf.ncsa.uiuc.edu/HDF5/doc/Copyright.html.  If you do not have     *
00013  * access to either file, you may request a copy from [email protected]. *
00014  * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
00015 
00016 #ifndef _H5EnumType_H
00017 #define _H5EnumType_H
00018 
00019 #ifndef H5_NO_NAMESPACE
00020 namespace H5 {
00021 #endif
00022 
00023 class H5_DLLCPP EnumType : public DataType {
00024 
00025    public:
00026         // Creates an empty enumeration datatype based on a native signed
00027         // integer type, whose size is given by size.
00028         EnumType( size_t size );
00029 
00030         // Gets the enum datatype of the specified dataset
00031         EnumType( const DataSet& dataset );  // H5Dget_type
00032 
00033         // Creates a new enum datatype based on an integer datatype
00034         EnumType( const IntType& data_type );  // H5Tenum_create
00035 
00036         // Returns the number of members in this enumeration datatype.
00037         int getNmembers () const;
00038 
00039         // Returns the index of a member in this enumeration data type.
00040         int getMemberIndex(const char* name) const;
00041         int getMemberIndex(const string& name) const;
00042 
00043         // Returns the value of an enumeration datatype member
00044         void getMemberValue( unsigned memb_no, void *value ) const;
00045 
00046         // Inserts a new member to this enumeration type.
00047         void insert( const char* name, void *value ) const;
00048         void insert( const string& name, void *value ) const;
00049 
00050         // Returns the symbol name corresponding to a specified member
00051         // of this enumeration datatype.
00052         string nameOf( void *value, size_t size ) const;
00053 
00054         // Returns the value corresponding to a specified member of this
00055         // enumeration datatype.
00056         void valueOf( const char* name, void *value ) const;
00057         void valueOf( const string& name, void *value ) const;
00058 
00059         // Returns this class name
00060         virtual string fromClass () const { return("EnumType"); }
00061 
00062         // Default constructor
00063         EnumType();
00064 
00065         // Creates an enumeration datatype using an existing id
00066         EnumType( const hid_t existing_id );
00067 
00068         // Copy constructor: makes a copy of the original EnumType object.
00069         EnumType( const EnumType& original );
00070 
00071         virtual ~EnumType();
00072 };
00073 #ifndef H5_NO_NAMESPACE
00074 }
00075 #endif
00076 #endif

Generated on Mon Oct 31 04:59:47 2005 by  doxygen 1.4.2