Itasca C++ Interface
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 * createBrick() =0;
27  virtual void addPieceToBody(IThing *,IThing *) =0;
28 
30  virtual uint64 createBlocks() = 0;
32  virtual uint64 getBlocks() = 0;
33 
35  virtual void threadedCallbackObject(Callback4<void,IBody *,uint32,uint32,void *> &callback,void *v=nullptr,bool useThreads=true) =0;
36 
38  template <class S,void (S::*MFP)(IBody *,uint32,uint32,void *)>
39  void threadedCallbackMethod(S *s,void *v=nullptr,bool useThreads=true) {
41  threadedCallbackObject(callback,v,useThreads);
42  }
43 
44  // for the brick logic
45  virtual void preMakeBrick() = 0;
46  virtual void postMakeBrick() = 0;
47  virtual void preAssembleBrick() = 0;
48  virtual void postAssembleBrick() = 0;
49 
50  };
51 
52 } // namespace itascaxd
53 // EoF
Definition: callback.h:37
Definition: callback.h:130
Interface for containers of IThings.
Definition: icontainer.h:21
Base class for items that will be stored in containers.
Definition: ithing.h:30
Definition: ibodycontainer.h:16
void threadedCallbackMethod(S *s, void *v=nullptr, bool useThreads=true)
Implementation of the multithreaded loop using the threadedCallbackObject
Definition: ibodycontainer.h:39
virtual uint64 createBlocks()=0
Interface access to the Multicontainer createBlock function.
virtual uint64 getBlocks()=0
Interface access to the Multicontainer getNumberOfBlocks function.
virtual void threadedCallbackObject(Callback4< void, IBody *, uint32, uint32, void * > &callback, void *v=nullptr, bool useThreads=true)=0
Object for creation of multithreaded loop over bodies.
uint32 TType
class type indicator
Definition: basedef.h:46
Interface for container of IThings.
namespace Itasca
Definition: basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition: icontactmodule.h:4