Itasca C++ Interface
Loading...
Searching...
No Matches
icontactarray.h
Go to the documentation of this file.
1#pragma once
2// icontactarray.h
3
4#include "base/src/callback.h"
5
11namespace itasca
12{
13 class IContainer;
14 class IThing;
15}
16
17namespace block
18{
19 using namespace itasca;
20
21 class IContactThing;
22
26 {
27 public:
28
30 virtual const IThing * getIThing() const=0;
32 virtual IThing * getIThing()=0;
34 virtual const IContainer * getIContainer() const=0;
36 virtual IContainer * getIContainer() =0;
38 virtual const IContactThing * findContactWithID(uint64 id) const=0;
40 virtual IContactThing * findContactWithID(uint64 id)=0;
42 virtual uint32 getContactType() const=0;
44 virtual uint64 getNumContacts() const=0;
46 virtual IContactThing * findContact(const DVect3 &dv)=0;
47
49 virtual uint32 getContactExtraNotice() const=0;
51 virtual uint32 getGroupNotice() const=0;
53 virtual uint32 getModelNotice() const=0;
55 virtual uint32 getMaterialNotice() const=0;
56
60 bool useThreads = true) const = 0;
61
63 template <class S, void (S::*MFP)(const IContactThing*, uint32, uint32, void*)>
64 void threadedCallbackMethod(S* s, void* v = nullptr, bool useThreads = true) const {
66 threadedCallbackObject(callback, v, useThreads);
67 }
68 };
69
70} // end namespace block
71// EOF
Definition callback.h:37
Definition callback.h:130
This interface provides access to contact thing array.
Definition icontactarray.h:26
virtual void threadedCallbackObject(Callback4< void, const IContactThing *, uint32, uint32, void * > &callback, void *v=nullptr, bool useThreads=true) const =0
Object for creation of multithreaded loop over contacts.
virtual uint32 getContactType() const =0
Returns the contact type identifier.
virtual IContactThing * findContact(const DVect3 &dv)=0
Return contact closest to input location.
void threadedCallbackMethod(S *s, void *v=nullptr, bool useThreads=true) const
Implementation of the multithreaded loop using the threadedCallbackObject.
Definition icontactarray.h:64
virtual const IContainer * getIContainer() const =0
Returns a const pointer to the IContainer interface representing the global list of contacts.
virtual const IThing * getIThing() const =0
Returns a const pointer to an IThing interface representing the IContactArray.
virtual uint32 getModelNotice() const =0
Returns the tag for model change notice.
virtual const IContactThing * findContactWithID(uint64 id) const =0
Returns a const pointer to the contact, IContactThing, with the ID id, or 0 if the contact does not e...
virtual IContainer * getIContainer()=0
Returns a pointer to the IContainer interface representing the global list of contacts.
virtual uint64 getNumContacts() const =0
Returns number of contacts in the container.
virtual IThing * getIThing()=0
Returns a pointer to an IThing interface representing the IContactArray.
virtual uint32 getGroupNotice() const =0
Returns tag for group change notice.
virtual uint32 getContactExtraNotice() const =0
Returns the tag for the contact extra variable change notice.
virtual IContactThing * findContactWithID(uint64 id)=0
Returns a pointer to the contact, IContactThing, with the ID id, or 0 if the contact does not exist.
virtual uint32 getMaterialNotice() const =0
Returns the tag for material change notice.
Definition icontactthing.h:31
Interface for containers of IThings.
Definition icontainer.h:21
Base class for items that will be stored in containers.
Definition ithing.h:31
namespace Itasca
Definition basememory.cpp:14