Commit 977ba14c authored by berenger-bramas's avatar berenger-bramas

Add a class to forbid copy and or assignement.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@325 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 7e5da75a
#ifndef FNOCOPYABLE_HPP
#define FNOCOPYABLE_HPP
/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* This class has to be inherited to forbid copy
*/
class FNoCopyable {
private:
/** Forbiden copy constructor */
FNoCopyable(const FNoCopyable&);
/** Forbiden copy operator */
FNoCopyable& operator=(const FNoCopyable&);
protected:
/** Empty constructor */
FNoCopyable(){}
};
/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* This class has to be inherited to forbid assignement
*/
class FNoAssignement {
private:
/** Forbiden copy operator */
FNoAssignement& operator=(const FNoAssignement&);
protected:
/** Empty constructor */
FNoAssignement(){}
};
#endif // FNOCOPYABLE_HPP
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment