FAbstractSendable.hpp 1.84 KB
Newer Older
1
// ===================================================================================
2 3 4 5 6 7 8 9 10 11 12 13 14
// Copyright ScalFmm 2011 INRIA, Olivier Coulaud, Bérenger Bramas, Matthias Messner
// olivier.coulaud@inria.fr, berenger.bramas@inria.fr
// This software is a computer program whose purpose is to compute the FMM.
//
// This software is governed by the CeCILL-C and LGPL licenses and
// abiding by the rules of distribution of free software.  
// 
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public and CeCILL-C Licenses for more details.
// "http://www.cecill.info". 
// "http://www.gnu.org/licenses".
15
// ===================================================================================
16 17
#ifndef FABSTRACTSENDABLE_HPP
#define FABSTRACTSENDABLE_HPP
18

19 20
class FBufferReader;
class FBufferWriter;
21 22 23 24 25

/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* @class FAbstractSendable
* Please read the license
26 27 28
*
* To make your cells are usable in the mpi fmm,
* they must provide this interface
29 30 31 32 33 34
*/
class FAbstractSendable {
protected:
    /** Empty Destructor */
    virtual ~FAbstractSendable(){}

35 36 37 38 39 40 41 42
    ///////////////////////////////////////////////
    // For Upward pass
    ///////////////////////////////////////////////

    /** Save your data */
    virtual void serializeUp(FBufferWriter&) const  = 0;
    /** Retrieve your data */
    virtual void deserializeUp(FBufferReader&) = 0;
43

44 45 46 47 48 49 50 51
    ///////////////////////////////////////////////
    // For Downward pass
    ///////////////////////////////////////////////

    /** Save your data */
    virtual void serializeDown(FBufferWriter&) const = 0;
    /** Retrieve your data */
    virtual void deserializeDown(FBufferReader&) = 0;
52 53
};

54

55 56
#endif //FABSTRACTSENDABLE_HPP

57