Definition of H5Fed C++ interface, class definition and implementation, first material.

This commit is contained in:
Benedikt Oswald
2007-12-17 11:11:00 +00:00
parent 0235b61dc9
commit 317d1b6d9f
2 changed files with 65 additions and 32 deletions
+48 -4
View File
@@ -40,6 +40,12 @@ using namespace H5Fed;
using namespace std;
/*!
\defgroup h5fed_cpp_api H5Fed CPP API
*/
/** \brief implement constructor without arguments */
H5Fed::H5Fed()
{
@@ -58,7 +64,7 @@ H5Fed::H5Fed(std::string filename)
/** \brief Set name of H5Fed file to be accessed */
int H5Fed::filename(std::string filename)
H5FED_RETURN_CODE H5Fed::filename(std::string filename)
{
/** initialize internal variables */
filename_.erase();
@@ -75,9 +81,47 @@ std::string H5Fed::filename()
}
/*!
\ingroup h5fed_cpp_api
Open file. This function is available in the paralell
and serial version. In the serial case \c comm may have any value.
\return
\return
\note
File is always opened in read/writer mode!
\note
Implement as wrapper of \c H5_open_file()!
*/
H5FED_RETURN_CODE H5Fed::open_file()
{
return(OKCODE);
}
/*!
\ingroup h5fed_cpp_api
Close file. This function is available in the paralell
and serial version. In the serial case \c comm may have
any value.
\return
\return
\note
File is always opened in read/writer mode!
\note
Implement as wrapper of \c H5_open_file()!
*/
H5FED_RETURN_CODE H5Fed::closeFile()
{
return(OKCODE);
}
+17 -28
View File
@@ -48,8 +48,9 @@
namespace H5Fed
{
const int ERRORCODE = -1;
const int OKCODE = 0;
/** \brief Define return codes */
enum H5FED_RETURN_CODE{OKCODE,ERROR};
class H5Fed
@@ -57,14 +58,21 @@ namespace H5Fed
public:
/** \brief infrastructure routines */
H5Fed(); /** \brief Constructor without argument */
H5Fed(std::string filename); /** \brief Constructor without argument */
~H5Fed(); /** \brief Class destructor */
H5Fed(); /** \brief Constructor without argument */
H5Fed(std::string filename); /** \brief Constructor without argument */
~H5Fed(); /** \brief Class destructor */
H5FED_RETURN_CODE filename(std::string filename); /** \brief Set name of H5Fed file to be accessed */
std::string filename(); /** \brief retrieve name of H5Fed file to be accessed */
/****** General routines *****************************************************/
H5FED_RETURN_CODE open_file(); /** \brief open the file */
H5FED_RETURN_CODE closeFile(); /** \brief close the file */
/****** INQUIRY routines *****************************************************/
int filename(std::string filename); /** \brief Set name of H5Fed file to be accessed */
std::string filename(); /** \brief retrieve name of H5Fed file to be accessed */
/** \brief book keeping */
protected:
@@ -76,7 +84,7 @@ namespace H5Fed
private:
/** book keeping */
std::string filename_;
std::string filename_; /** \brief Name of H5Fed file to be accessed */
@@ -84,25 +92,6 @@ namespace H5Fed
};
}
#endif /** H5FED_HH */