Commit c135b81c authored by berenger-bramas's avatar berenger-bramas

Use the FNoCopyable where needed.

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/scalfmm/scalfmm/trunk@326 2616d619-271b-44dc-8df4-d4a8f33a7222
parent 977ba14c
......@@ -3,15 +3,16 @@
// [--License--]
#include "FSubOctree.hpp"
#include "FTreeCoordinate.hpp"
#include "../Utils/FDebug.hpp"
#include "../Utils/FGlobal.hpp"
#include "../Utils/F3DPosition.hpp"
#include "../Utils/FMath.hpp"
#include "FTreeCoordinate.hpp"
#include "../Utils/FNoCopyable.hpp"
#include "../Utils/FAssertable.hpp"
/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* @class FOctree
......@@ -30,10 +31,10 @@
* Cell must extend extend {FExtendPosition,FExtendMortonIndex}
*/
template< class ParticleClass, class CellClass, class ContainerClass, class LeafClass>
class FOctree : protected FAssertable {
class FOctree : protected FAssertable, public FNoCopyable {
FReal*const boxWidthAtLevel; //< to store the width of each boxs at all levels
const int height; //< tree height
const int height; //< tree height
const int subHeight; //< tree height
const int leafIndex; //< index of leaf int array
......@@ -45,15 +46,6 @@ class FOctree : protected FAssertable {
const FReal boxWidth; //< the space system width
/** Forbiden copy operator */
FOctree& operator=(const FOctree&) {
return *this;
}
/** Forbiden copy constructor */
FOctree(const FOctree&) {
}
/**
* Get morton index from a position for the leaf leavel
* @param inPosition position to compute
......
......@@ -11,6 +11,7 @@
#include "../Utils/FComplexe.hpp"
#include "../Utils/FMath.hpp"
#include "../Utils/FTrace.hpp"
#include "../Utils/FNoCopyable.hpp"
#include <iostream>
......@@ -36,7 +37,7 @@ static const int FMB_Info_P = 12;
* Needs cell to extend {FExtendFmbCell}
*/
template< class ParticleClass, class CellClass, class ContainerClass>
class FFmbKernels {
class FFmbKernels : public FNoAssignement {
protected:
// _GRAVITATIONAL_
......@@ -622,8 +623,6 @@ protected:
precomputeM2L();
}
/** Forbiden copy operator */
FFmbKernels& operator=(const FFmbKernels&){ return *this; }
public:
FFmbKernels(const int inTreeHeight, const FReal inTreeWidth) :
......
......@@ -4,12 +4,13 @@
#include "../Utils/FGlobal.hpp"
#include "../Utils/FComplexe.hpp"
#include "../Utils/FSpherical.hpp"
#include "../Utils/FNoCopyable.hpp"
/** This class compute the spherical harmonic.
* It computes the inner, outter, and legendre.
*/
class FHarmonic {
class FHarmonic : public FNoAssignement {
const int devP; //< P
const int expSize; //< Exponen Size
......@@ -112,9 +113,6 @@ class FHarmonic {
}
}
/** Forbid copy operator */
FHarmonic& operator=(const FHarmonic&){ return *this;}
public:
/////////////////////////////////////////////////////////////////
// Constructor & Accessor
......
......@@ -3,6 +3,7 @@
// [--License--]
#include "FGlobal.hpp"
#include "FNoCopyable.hpp"
#ifndef SCALFMM_USE_DEBUG
......@@ -29,7 +30,7 @@
* FDEBUG( FDebug::Controller << "I want to debug " << toto << "\n"; )
* </code>
*/
class FDebug{
class FDebug : public FNoCopyable {
private:
std::ostream* stream; //< Standart c++ ostream
......@@ -52,22 +53,6 @@ private:
if(this->stream != &std::cout) delete(this->stream);
}
/**
* Copy constructor forbiden
* @param other the source class to copy
*/
FDebug(const FDebug& ){}
/**
* Copy constructor forbiden
* @param other the source class to copy
* @return this a reference to the current class
*/
FDebug& operator=(const FDebug& ){
return *this;
}
public:
static FDebug Controller; //< Singleton
......
......@@ -5,6 +5,7 @@
#include <cstdio>
#include "FGlobal.hpp"
#include "FNoCopyable.hpp"
#include "FMath.hpp"
......@@ -184,16 +185,13 @@ public:
/** This class is used to put all the usual method
* related mpi comm
*/
class FComm {
class FComm : public FNoCopyable {
int rank; //< rank related to the comm
int nbProc; //< nb proc in this group
MPI_Comm communicator; //< current mpi communicator
MPI_Group group; //< current mpi group
// Forbid copy
FComm(const FComm&){}
FComm& operator=(const FComm&){return *this;}
// reset : get rank and nb proc from mpi
void reset(){
......
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