Removed unsafe copy constructor and assignment operator, declared private

This commit is contained in:
Jarle Ladstein 2013-12-09 18:43:38 +01:00
parent a770fb3509
commit cf35fe8980
2 changed files with 9 additions and 20 deletions

View File

@ -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() :

View File

@ -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);
};
}