mirror of
https://github.com/Unidata/netcdf-cxx4.git
synced 2024-11-27 07:49:52 +08:00
Removed unsafe copy constructor and assignment operator, declared private
This commit is contained in:
parent
a770fb3509
commit
cf35fe8980
@ -15,18 +15,10 @@ NcFile::~NcFile()
|
||||
ncCheck(nc_close(myId),__FILE__,__LINE__);
|
||||
}
|
||||
|
||||
|
||||
// assignment operator
|
||||
NcFile& NcFile::operator=(const NcGroup & rhs)
|
||||
{
|
||||
NcGroup::operator=(rhs); // assign base class parts
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! The copy constructor.
|
||||
/*//! The copy constructor.
|
||||
NcFile::NcFile(const NcGroup& rhs):
|
||||
NcGroup(rhs) // intialize base class parts
|
||||
{}
|
||||
{}*/
|
||||
|
||||
// Constructor generates a null object.
|
||||
NcFile::NcFile() :
|
||||
|
@ -35,15 +35,7 @@ namespace netCDF
|
||||
nc4classic //!< netCDF-4/HDF5 format, classic data model
|
||||
};
|
||||
|
||||
/*! assignment operator */
|
||||
NcFile& operator =(const NcGroup & rhs);
|
||||
|
||||
/*!
|
||||
The copy constructor. */
|
||||
NcFile(const NcGroup& rhs);
|
||||
|
||||
|
||||
|
||||
|
||||
/*! Constructor generates a \ref isNull "null object". */
|
||||
NcFile();
|
||||
|
||||
@ -69,7 +61,12 @@ namespace netCDF
|
||||
|
||||
/*! destructor */
|
||||
virtual ~NcFile(); //closes file and releases all resources
|
||||
|
||||
|
||||
private:
|
||||
NcFile& operator =(const NcGroup & rhs);
|
||||
NcFile& operator =(const NcFile & rhs);
|
||||
NcFile(const NcGroup& rhs);
|
||||
NcFile(const NcFile& rhs);
|
||||
};
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user