[svn-r4977]

Purpose:
    Adding support for dll
Description:
    Added __DLLCPP__ to all public classes and templates.
    Added #include "H5Include.h" to H5RefCounter.cpp because of the
          use of DLLCPP in .h file and it needs the following chain:
                H5Include.h/hdf5.h/H5public.h/H5api_adpt.h
    Added #pragma warning(disable: 4251) to H5Exception.h to eliminate
        this warning on private data members of type 'string.'  This
        occurs because 'string' is not yet instantiated at compilation
        time; however, since the class is exported, the warning is
        harmless.
    Changed this member function's parameter to be passed as reference.
        from:
            void CompType::insertMember( const string name,...
        to:
            void CompType::insertMember( const string& name,...
Platforms tested:
    Linux 6.2 (eirene)
    Windows 2000
This commit is contained in:
Binh-Minh Ribler 2002-02-15 19:49:46 -05:00
parent 7b3df5b3f4
commit 855aa23823
28 changed files with 44 additions and 39 deletions

View File

@ -10,7 +10,7 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class AbstractDs : public H5Object {
class __DLLCPP__ AbstractDs : public H5Object {
public:
// Gets the dataspace of this abstract dataset - pure virtual
virtual DataSpace getSpace() const = 0;

View File

@ -10,7 +10,7 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class AtomType : public DataType {
class __DLLCPP__ AtomType : public DataType {
public:
// Sets the total size for an atomic datatype.
void setSize( size_t size ) const;

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class Attribute : public AbstractDs {
class __DLLCPP__ Attribute : public AbstractDs {
public:
// Writes data to this attribute.
void write(const DataType& mem_type, const void *buf ) const;

View File

@ -12,7 +12,7 @@ namespace H5 {
class Group;
class H5File;
class CommonFG {
class __DLLCPP__ CommonFG {
public:
// Creates a new group at this location which can be a file or another group.
Group createGroup( const string& name, size_t size_hint = 0 ) const;

View File

@ -198,7 +198,7 @@ void CompType::getMemberType( int member_num, StrType& strtype ) const
*/
// Adds a new member to a compound datatype
void CompType::insertMember( const string name, size_t offset, const DataType& new_member ) const
void CompType::insertMember( const string& name, size_t offset, const DataType& new_member ) const
{
// Convert string to C-string
const char* name_C;

View File

@ -9,7 +9,7 @@
namespace H5 {
#endif
class CompType : public DataType {
class __DLLCPP__ CompType : public DataType {
public:
// Creates a new compound datatype, given the type's size
CompType( size_t size ); // H5Tcreate
@ -59,7 +59,7 @@ class CompType : public DataType {
StrType getMemberStrType( int member_num ) const;
// Adds a new member to this compound datatype.
void insertMember( const string name, size_t offset, const DataType& new_member ) const;
void insertMember( const string& name, size_t offset, const DataType& new_member ) const;
// Recursively removes padding from within this compound datatype.
void pack() const;

View File

@ -8,7 +8,7 @@
namespace H5 {
#endif
class DataSet : public AbstractDs {
class __DLLCPP__ DataSet : public AbstractDs {
public:
// Gets the dataspace of this dataset.
virtual DataSpace getSpace() const;

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class DataSpace : public IdComponent {
class __DLLCPP__ DataSpace : public IdComponent {
public:
// Default DataSpace objects
static const DataSpace ALL;

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class DataType : public H5Object {
class __DLLCPP__ DataType : public H5Object {
public:
// Creates a datatype given its class and size
DataType( const H5T_class_t type_class, size_t size );

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class DSetCreatPropList : public PropList {
class __DLLCPP__ DSetCreatPropList : public PropList {
public:
static const DSetCreatPropList DEFAULT;

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class DSetMemXferPropList : public PropList {
class __DLLCPP__ DSetMemXferPropList : public PropList {
public:
static const DSetMemXferPropList DEFAULT;

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class EnumType : public DataType {
class __DLLCPP__ EnumType : public DataType {
public:
// Creates an empty enumeration datatype based on a native signed

View File

@ -8,7 +8,7 @@ namespace H5 {
using namespace std;
#endif
class Exception {
class __DLLCPP__ Exception {
public:
// Default constructor
Exception();
@ -65,11 +65,15 @@ class Exception {
virtual ~Exception();
private:
// Because 'string' is not instantiated at compilation time, this
// warning is displayed; but the class is exported so the warning
// is harmless
#pragma warning(disable: 4251)
string detailMessage;
string funcName;
};
class FileIException : public Exception {
class __DLLCPP__ FileIException : public Exception {
public:
FileIException();
FileIException( const string& func_name, const string& message = NULL);
@ -77,7 +81,7 @@ class FileIException : public Exception {
virtual ~FileIException();
};
class GroupIException : public Exception {
class __DLLCPP__ GroupIException : public Exception {
public:
GroupIException();
GroupIException( const string& func_name, const string& message=NULL);
@ -85,7 +89,7 @@ class GroupIException : public Exception {
virtual ~GroupIException();
};
class DataSpaceIException : public Exception {
class __DLLCPP__ DataSpaceIException : public Exception {
public:
DataSpaceIException();
DataSpaceIException(const string& func_name, const string& message=NULL);
@ -93,7 +97,7 @@ class DataSpaceIException : public Exception {
virtual ~DataSpaceIException();
};
class DataTypeIException : public Exception {
class __DLLCPP__ DataTypeIException : public Exception {
public:
DataTypeIException();
DataTypeIException(const string& func_name, const string& message = NULL);
@ -101,7 +105,7 @@ class DataTypeIException : public Exception {
virtual ~DataTypeIException();
};
class PropListIException : public Exception {
class __DLLCPP__ PropListIException : public Exception {
public:
PropListIException();
PropListIException(const string& func_name, const string& message=NULL);
@ -109,7 +113,7 @@ class PropListIException : public Exception {
virtual ~PropListIException();
};
class DataSetIException : public Exception {
class __DLLCPP__ DataSetIException : public Exception {
public:
DataSetIException();
DataSetIException(const string& func_name, const string& message=NULL);
@ -117,7 +121,7 @@ class DataSetIException : public Exception {
virtual ~DataSetIException();
};
class AttributeIException : public Exception {
class __DLLCPP__ AttributeIException : public Exception {
public:
AttributeIException();
AttributeIException(const string& func_name, const string& message=NULL);
@ -125,7 +129,7 @@ class AttributeIException : public Exception {
virtual ~AttributeIException();
};
class ReferenceException : public Exception {
class __DLLCPP__ ReferenceException : public Exception {
public:
ReferenceException();
ReferenceException(const string& func_name, const string& message=NULL);
@ -133,7 +137,7 @@ class ReferenceException : public Exception {
virtual ~ReferenceException();
};
class LibraryIException : public Exception {
class __DLLCPP__ LibraryIException : public Exception {
public:
LibraryIException();
LibraryIException(const string& func_name, const string& message=NULL);
@ -141,7 +145,7 @@ class LibraryIException : public Exception {
virtual ~LibraryIException();
};
class IdComponentException : public Exception {
class __DLLCPP__ IdComponentException : public Exception {
public:
IdComponentException();
IdComponentException(const string& func_name, const string& message=NULL);

View File

@ -7,7 +7,7 @@ namespace H5 {
#endif
// class for file access properties
class FileAccPropList : public PropList {
class __DLLCPP__ FileAccPropList : public PropList {
public:
static const FileAccPropList DEFAULT;

View File

@ -7,7 +7,7 @@ namespace H5 {
#endif
// class for file access properties
class FileCreatPropList : public PropList {
class __DLLCPP__ FileCreatPropList : public PropList {
public:
static const FileCreatPropList DEFAULT;

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class H5File : public IdComponent, public CommonFG {
class __DLLCPP__ H5File : public IdComponent, public CommonFG {
public:
// copy constructor: makes a copy of the original H5File object.
H5File(const H5File& original );

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class FloatType : public AtomType {
class __DLLCPP__ FloatType : public AtomType {
public:
// default constructor
FloatType();

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class Group : public H5Object, public CommonFG {
class __DLLCPP__ Group : public H5Object, public CommonFG {
public:
// default constructor
Group();

View File

@ -9,7 +9,7 @@
namespace H5 {
#endif
class IdComponent {
class __DLLCPP__ IdComponent {
public:
// Parent classes must reset the current IdComponent copy
// before setting new id to control reference count

View File

@ -13,7 +13,7 @@ namespace H5 {
// a member function so it can be template to work around that problem.
template <class Type>
void resetIdComponent(
__DLLCPP__ void resetIdComponent(
Type* obj ) // pointer to object to be reset
{
if( obj->noReference()) // ref count of this object is decremented here

View File

@ -5,7 +5,7 @@
#ifndef H5_NO_NAMESPACE
namespace H5 {
#endif
class IntType : public AtomType {
class __DLLCPP__ IntType : public AtomType {
public:
// default constructor

View File

@ -12,7 +12,7 @@ namespace H5 {
// It is not even working, inifiteloop message still printed when
// calling H5close
class H5Library {
class __DLLCPP__ H5Library {
public:
static bool need_cleanup; // indicates if H5close should be called

View File

@ -13,7 +13,7 @@
namespace H5 {
#endif
class H5Object; // forward declaration for UserData4Aiterate
class __DLLCPP__ H5Object; // forward declaration for UserData4Aiterate
// Define the operator function pointer for H5Aiterate().
typedef void (*attr_operator_t)( H5Object& loc/*in*/,
@ -30,7 +30,7 @@ class UserData4Aiterate { // user data for attribute iteration
// The above part is being moved into Iterator, but not completed
class H5Object : public IdComponent {
class __DLLCPP__ H5Object : public IdComponent {
public:
// Pure virtual function so appropriate close function can
// be called by subclasses' for the corresponding HDF5 object

View File

@ -11,7 +11,7 @@
namespace H5 {
#endif
class PredType : public AtomType {
class __DLLCPP__ PredType : public AtomType {
public:
// Default destructor
virtual ~PredType();

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class PropList : public IdComponent {
class __DLLCPP__ PropList : public IdComponent {
public:
// Default property list
static const PropList DEFAULT;

View File

@ -1,3 +1,4 @@
#include "H5Include.h"
#include "H5RefCounter.h"
#ifndef H5_NO_NAMESPACE

View File

@ -22,7 +22,7 @@ const bool true = 1;
#endif
class RefCounter {
class __DLLCPP__ RefCounter {
public:
// Creates a reference counter to be used by an HDF5 object
RefCounter();

View File

@ -6,7 +6,7 @@
namespace H5 {
#endif
class StrType : public AtomType {
class __DLLCPP__ StrType : public AtomType {
public:
// default constructor
StrType();