FAbstractLeaf.hpp 1.91 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 FABSTRACTLEAF_HPP
#define FABSTRACTLEAF_HPP
13

14 15 16 17 18 19 20 21 22 23


/**
* @author Berenger Bramas (berenger.bramas@inria.fr)
* @class FAbstractLeaf
* @brief
* Please read the license
* This class is used to enable the use of typed particles
* (source XOR target) or simple system (source AND target)
*/
berenger-bramas's avatar
berenger-bramas committed
24
template< class ParticleClass, class ContainerClass >
25 26 27 28 29 30 31 32 33 34 35 36
class FAbstractLeaf {
public:
    /** Default destructor */
    virtual ~FAbstractLeaf(){
    }

    /**
        * To add a new particle in the leaf
        * @param particle the new particle
        * Depending on the system to use the class that inherit
        * this interface can sort the particle as they like.
        */
37
    virtual void push(const ParticleClass& particle) = 0;
38 39 40 41 42 43 44

    /**
        * To get all the sources in a leaf
        * @return a pointer to the list of particles that are sources
        * Depending on the system to use the class that inherit
        * this interface can sort the particle as they like.
        */
berenger-bramas's avatar
berenger-bramas committed
45
    virtual ContainerClass* getSrc() = 0;
46 47 48 49 50 51 52

    /**
        * To get all the target in a leaf
        * @return a pointer to the list of particles that are targets
        * Depending on the system to use the class that inherit
        * this interface can sort the particle as they like.
        */
berenger-bramas's avatar
berenger-bramas committed
53
    virtual ContainerClass* getTargets() = 0;
54 55 56 57 58 59

};


#endif //FABSTRACTLEAF_HPP

60