Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
ibodycontainer.h
1 #pragma once
2 // ibodycontainer.h
4 #include "base/src/callback.h"
5 
6 namespace itasca {
7  class IThing;
8 }
9 namespace itascaxd {
10  class IBody;
11 }
12 
13 namespace itascaxd {
14  using namespace itasca;
15 
17  public:
18  inline static const TType type_ = 0x4e99d617;
19 
20  virtual IThing * getIThing()=0;
21  virtual const IThing * getIThing() const =0;
22  virtual IContainer * pieces() =0;
23  virtual const IContainer * pieces() const =0;
24  virtual IContainer * getIContainer() =0;
25  virtual const IContainer * getIContainer() const =0;
26  virtual IThing * create() =0;
27  virtual void addPieceToBody(IThing *,IThing *) =0;
28 
30  virtual quint64 createBlocks() = 0;
32  virtual quint64 getBlocks() = 0;
33 
35  virtual void threadedCallbackObject(Callback4<void,IBody *,quint32,quint32,void *> &callback,void *v=nullptr,bool useThreads=true) =0;
36 
38  template <class S,void (S::*MFP)(IBody *,quint32,quint32,void *)>
39  void threadedCallbackMethod(S *s,void *v=nullptr,bool useThreads=true) {
41  threadedCallbackObject(callback,v,useThreads);
42  }
43 
44  };
45 
46 } // namespace itascaxd
47 // EoF
Definition: callback.h:30
namespace Itasca
Definition: basememory.cpp:9
Base class for items that will be stored in containers.
Definition: ithing.h:31
unsigned int TType
class type indicator
Definition: basedef.h:41
void threadedCallbackMethod(S *s, void *v=nullptr, bool useThreads=true)
Implementation of the multithreaded loop using the threadedCallbackObject.
Definition: ibodycontainer.h:39
Definition: callback.h:122
Itasca Library standard namespace, specific to 2D or 3D.
Definition: icontactmodule.h:4
Interface for containers of IThings.
Definition: icontainer.h:23
Definition: ibodycontainer.h:16
Interface for container of IThings.