diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2002-02-16 00:49:46 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2002-02-16 00:49:46 (GMT) |
commit | 855aa23823a1091262524773626de3d920838e72 (patch) | |
tree | 6e8408e2341b007323405575051f39c76c61ead9 /c++/src | |
parent | 7b3df5b3f4bee819277e8a72e208437eb6ed5f26 (diff) | |
download | hdf5-855aa23823a1091262524773626de3d920838e72.zip hdf5-855aa23823a1091262524773626de3d920838e72.tar.gz hdf5-855aa23823a1091262524773626de3d920838e72.tar.bz2 |
[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
Diffstat (limited to 'c++/src')
-rw-r--r-- | c++/src/H5AbstractDs.h | 2 | ||||
-rw-r--r-- | c++/src/H5AtomType.h | 2 | ||||
-rw-r--r-- | c++/src/H5Attribute.h | 2 | ||||
-rw-r--r-- | c++/src/H5CommonFG.h | 2 | ||||
-rw-r--r-- | c++/src/H5CompType.cpp | 2 | ||||
-rw-r--r-- | c++/src/H5CompType.h | 4 | ||||
-rw-r--r-- | c++/src/H5DataSet.h | 2 | ||||
-rw-r--r-- | c++/src/H5DataSpace.h | 2 | ||||
-rw-r--r-- | c++/src/H5DataType.h | 2 | ||||
-rw-r--r-- | c++/src/H5DcreatProp.h | 2 | ||||
-rw-r--r-- | c++/src/H5DxferProp.h | 2 | ||||
-rw-r--r-- | c++/src/H5EnumType.h | 2 | ||||
-rw-r--r-- | c++/src/H5Exception.h | 26 | ||||
-rw-r--r-- | c++/src/H5FaccProp.h | 2 | ||||
-rw-r--r-- | c++/src/H5FcreatProp.h | 2 | ||||
-rw-r--r-- | c++/src/H5File.h | 2 | ||||
-rw-r--r-- | c++/src/H5FloatType.h | 2 | ||||
-rw-r--r-- | c++/src/H5Group.h | 2 | ||||
-rw-r--r-- | c++/src/H5IdComponent.h | 2 | ||||
-rw-r--r-- | c++/src/H5Idtemplates.h | 2 | ||||
-rw-r--r-- | c++/src/H5IntType.h | 2 | ||||
-rw-r--r-- | c++/src/H5Library.h | 2 | ||||
-rw-r--r-- | c++/src/H5Object.h | 4 | ||||
-rw-r--r-- | c++/src/H5PredType.h | 2 | ||||
-rw-r--r-- | c++/src/H5PropList.h | 2 | ||||
-rw-r--r-- | c++/src/H5RefCounter.cpp | 1 | ||||
-rw-r--r-- | c++/src/H5RefCounter.h | 2 | ||||
-rw-r--r-- | c++/src/H5StrType.h | 2 |
28 files changed, 44 insertions, 39 deletions
diff --git a/c++/src/H5AbstractDs.h b/c++/src/H5AbstractDs.h index 4c95b39..1886903 100644 --- a/c++/src/H5AbstractDs.h +++ b/c++/src/H5AbstractDs.h @@ -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; diff --git a/c++/src/H5AtomType.h b/c++/src/H5AtomType.h index 046989f..23a5e17 100644 --- a/c++/src/H5AtomType.h +++ b/c++/src/H5AtomType.h @@ -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; diff --git a/c++/src/H5Attribute.h b/c++/src/H5Attribute.h index 7c509d5..b9bb70c 100644 --- a/c++/src/H5Attribute.h +++ b/c++/src/H5Attribute.h @@ -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; diff --git a/c++/src/H5CommonFG.h b/c++/src/H5CommonFG.h index 4557293..e42bf73 100644 --- a/c++/src/H5CommonFG.h +++ b/c++/src/H5CommonFG.h @@ -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; diff --git a/c++/src/H5CompType.cpp b/c++/src/H5CompType.cpp index 0bfa220..6fdba0b 100644 --- a/c++/src/H5CompType.cpp +++ b/c++/src/H5CompType.cpp @@ -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; diff --git a/c++/src/H5CompType.h b/c++/src/H5CompType.h index 1e06a12..bca5722 100644 --- a/c++/src/H5CompType.h +++ b/c++/src/H5CompType.h @@ -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; diff --git a/c++/src/H5DataSet.h b/c++/src/H5DataSet.h index dc4edc1..c860d3f 100644 --- a/c++/src/H5DataSet.h +++ b/c++/src/H5DataSet.h @@ -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; diff --git a/c++/src/H5DataSpace.h b/c++/src/H5DataSpace.h index 7267fe6..5ec7842 100644 --- a/c++/src/H5DataSpace.h +++ b/c++/src/H5DataSpace.h @@ -6,7 +6,7 @@ namespace H5 { #endif -class DataSpace : public IdComponent { +class __DLLCPP__ DataSpace : public IdComponent { public: // Default DataSpace objects static const DataSpace ALL; diff --git a/c++/src/H5DataType.h b/c++/src/H5DataType.h index 0b9d877..7c28383 100644 --- a/c++/src/H5DataType.h +++ b/c++/src/H5DataType.h @@ -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 ); diff --git a/c++/src/H5DcreatProp.h b/c++/src/H5DcreatProp.h index c469326..1c164b1 100644 --- a/c++/src/H5DcreatProp.h +++ b/c++/src/H5DcreatProp.h @@ -6,7 +6,7 @@ namespace H5 { #endif -class DSetCreatPropList : public PropList { +class __DLLCPP__ DSetCreatPropList : public PropList { public: static const DSetCreatPropList DEFAULT; diff --git a/c++/src/H5DxferProp.h b/c++/src/H5DxferProp.h index 9c10c78..b1740b6 100644 --- a/c++/src/H5DxferProp.h +++ b/c++/src/H5DxferProp.h @@ -6,7 +6,7 @@ namespace H5 { #endif -class DSetMemXferPropList : public PropList { +class __DLLCPP__ DSetMemXferPropList : public PropList { public: static const DSetMemXferPropList DEFAULT; diff --git a/c++/src/H5EnumType.h b/c++/src/H5EnumType.h index fd331f5..b003e43 100644 --- a/c++/src/H5EnumType.h +++ b/c++/src/H5EnumType.h @@ -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 diff --git a/c++/src/H5Exception.h b/c++/src/H5Exception.h index 1256a8d..dc55844 100644 --- a/c++/src/H5Exception.h +++ b/c++/src/H5Exception.h @@ -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); diff --git a/c++/src/H5FaccProp.h b/c++/src/H5FaccProp.h index c48c65a..c7884f7 100644 --- a/c++/src/H5FaccProp.h +++ b/c++/src/H5FaccProp.h @@ -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; diff --git a/c++/src/H5FcreatProp.h b/c++/src/H5FcreatProp.h index 54b615b..2a65b0c 100644 --- a/c++/src/H5FcreatProp.h +++ b/c++/src/H5FcreatProp.h @@ -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; diff --git a/c++/src/H5File.h b/c++/src/H5File.h index 2defa2e..8e5d46a 100644 --- a/c++/src/H5File.h +++ b/c++/src/H5File.h @@ -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 ); diff --git a/c++/src/H5FloatType.h b/c++/src/H5FloatType.h index 5477211..a6d21e3 100644 --- a/c++/src/H5FloatType.h +++ b/c++/src/H5FloatType.h @@ -6,7 +6,7 @@ namespace H5 { #endif -class FloatType : public AtomType { +class __DLLCPP__ FloatType : public AtomType { public: // default constructor FloatType(); diff --git a/c++/src/H5Group.h b/c++/src/H5Group.h index 3a0ee4f..2fe7fd6 100644 --- a/c++/src/H5Group.h +++ b/c++/src/H5Group.h @@ -6,7 +6,7 @@ namespace H5 { #endif -class Group : public H5Object, public CommonFG { +class __DLLCPP__ Group : public H5Object, public CommonFG { public: // default constructor Group(); diff --git a/c++/src/H5IdComponent.h b/c++/src/H5IdComponent.h index 09a227b..08f2dac 100644 --- a/c++/src/H5IdComponent.h +++ b/c++/src/H5IdComponent.h @@ -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 diff --git a/c++/src/H5Idtemplates.h b/c++/src/H5Idtemplates.h index af9bccc..dbf5348 100644 --- a/c++/src/H5Idtemplates.h +++ b/c++/src/H5Idtemplates.h @@ -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 diff --git a/c++/src/H5IntType.h b/c++/src/H5IntType.h index 76ef6a9..5635946 100644 --- a/c++/src/H5IntType.h +++ b/c++/src/H5IntType.h @@ -5,7 +5,7 @@ #ifndef H5_NO_NAMESPACE namespace H5 { #endif -class IntType : public AtomType { +class __DLLCPP__ IntType : public AtomType { public: // default constructor diff --git a/c++/src/H5Library.h b/c++/src/H5Library.h index 3e071fb..f0d2e02 100644 --- a/c++/src/H5Library.h +++ b/c++/src/H5Library.h @@ -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 diff --git a/c++/src/H5Object.h b/c++/src/H5Object.h index 6ffe927..e02c3b3 100644 --- a/c++/src/H5Object.h +++ b/c++/src/H5Object.h @@ -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 diff --git a/c++/src/H5PredType.h b/c++/src/H5PredType.h index 8c0fbf0..3172d86 100644 --- a/c++/src/H5PredType.h +++ b/c++/src/H5PredType.h @@ -11,7 +11,7 @@ namespace H5 { #endif -class PredType : public AtomType { +class __DLLCPP__ PredType : public AtomType { public: // Default destructor virtual ~PredType(); diff --git a/c++/src/H5PropList.h b/c++/src/H5PropList.h index 66ccbd1..fecadcd 100644 --- a/c++/src/H5PropList.h +++ b/c++/src/H5PropList.h @@ -6,7 +6,7 @@ namespace H5 { #endif -class PropList : public IdComponent { +class __DLLCPP__ PropList : public IdComponent { public: // Default property list static const PropList DEFAULT; diff --git a/c++/src/H5RefCounter.cpp b/c++/src/H5RefCounter.cpp index 22d5cd5..aadc391 100644 --- a/c++/src/H5RefCounter.cpp +++ b/c++/src/H5RefCounter.cpp @@ -1,3 +1,4 @@ +#include "H5Include.h" #include "H5RefCounter.h" #ifndef H5_NO_NAMESPACE diff --git a/c++/src/H5RefCounter.h b/c++/src/H5RefCounter.h index 1620d88..f4ebc40 100644 --- a/c++/src/H5RefCounter.h +++ b/c++/src/H5RefCounter.h @@ -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(); diff --git a/c++/src/H5StrType.h b/c++/src/H5StrType.h index 2da5ca2..871d323 100644 --- a/c++/src/H5StrType.h +++ b/c++/src/H5StrType.h @@ -6,7 +6,7 @@ namespace H5 { #endif -class StrType : public AtomType { +class __DLLCPP__ StrType : public AtomType { public: // default constructor StrType(); |