ESyS-Particle  2.3
ParticleIdPairPy.h
Go to the documentation of this file.
1 // //
3 // Copyright (c) 2003-2014 by The University of Queensland //
4 // Centre for Geoscience Computing //
5 // http://earth.uq.edu.au/centre-geoscience-computing //
6 // //
7 // Primary Business: Brisbane, Queensland, Australia //
8 // Licensed under the Open Software License version 3.0 //
9 // http://www.opensource.org/licenses/osl-3.0.php //
10 // //
12 
13 #ifndef ESYS_LSMPARTICLEIDPAIRPY_H
14 #define ESYS_LSMPARTICLEIDPAIRPY_H
15 
16 #include <boost/python.hpp>
18 
19 namespace esys
20 {
21  namespace lsm
22  {
23  typedef std::pair<int,int> ParticleIdPair;
24 
25  class ParticleIdPairPy : public ParticleIdPair
26  {
27  public:
28  typedef ParticleIdPair Inherited;
29 
30  ParticleIdPairPy(int id1, int id2);
31 
32  ParticleIdPairPy(const Inherited &pair);
33 
34  bool operator<(const ParticleIdPairPy &pair) const;
35 
36  int len() const;
37 
38  int getItem(int i);
39 
40  long hash() const;
41 
42  class PickleSuite : public boost::python::pickle_suite
43  {
44  public:
45  static
46  boost::python::tuple
47  getinitargs(ParticleIdPairPy const& s);
48  };
49 
50  };
51 
52  void exportParticleIdPair();
53  }
54 }
55 
56 #endif
ParticleIdPairPy(int id1, int id2)
Definition: ParticleIdPairPy.cpp:21
void exportParticleIdPair()
Definition: ParticleIdPairPy.cpp:88
bool operator<(const ParticleIdPairPy &pair) const
Definition: ParticleIdPairPy.cpp:34
static boost::python::tuple getinitargs(ParticleIdPairPy const &s)
Definition: ParticleIdPairPy.cpp:83
Definition: CheckPointable.cpp:16
Definition: ParticleIdPairPy.h:42
LsmMpiPy::ParticleIdPair ParticleIdPair
Definition: BondInteractionGroupPy.cpp:24
ParticleIdPair Inherited
Definition: ParticleIdPairPy.h:28
int len() const
Definition: ParticleIdPairPy.cpp:44
Definition: ParticleIdPairPy.h:25
long hash() const
Definition: ParticleIdPairPy.cpp:77
int getItem(int i)
Definition: ParticleIdPairPy.cpp:49