FAbstractSendable.hpp 1.58 KB
Newer Older
1
// ===================================================================================
2 3 4 5 6 7 8 9
// Logiciel initial: ScalFmm Version 0.5
// Co-auteurs : Olivier Coulaud, Bérenger Bramas.
// Propriétaires : INRIA.
// Copyright © 2011-2012, diffusé sous les termes et conditions d’une licence propriétaire.
// Initial software: ScalFmm Version 0.5
// Co-authors: Olivier Coulaud, Bérenger Bramas.
// Owners: INRIA.
// Copyright © 2011-2012, spread under the terms and conditions of a proprietary license.
10
// ===================================================================================
11 12
#ifndef FABSTRACTSENDABLE_HPP
#define FABSTRACTSENDABLE_HPP
13

14 15
class FBufferReader;
class FBufferWriter;
16 17 18 19 20

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

30 31 32 33 34 35 36 37
    ///////////////////////////////////////////////
    // For Upward pass
    ///////////////////////////////////////////////

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

39 40 41 42 43 44 45 46
    ///////////////////////////////////////////////
    // For Downward pass
    ///////////////////////////////////////////////

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

49

50 51
#endif //FABSTRACTSENDABLE_HPP

52