Itasca C++ Interface
Loading...
Searching...
No Matches
irblockmodule.h
1#pragma once
2#include "base/src/farray.h"
3#include "shared/interface/signal.h"
4#include "base/src/callback.h"
5
6namespace itasca {
7 class IContainer;
8 class IEnergyMap;
9}
10
11namespace itascaxd {
12 class IContact;
13 class ICellSpace;
14 class IContainerContact;
15}
16
17namespace rblock {
18 using namespace itasca;
19 using namespace itascaxd;
20
21 class IRBlock;
22 class IGhostRBlock;
23 class IRBlockTemplate;
24
26 public:
28 using prop_signal = shared::Signal<const QString &,const QVariant &>;
29
31 virtual TType getRBlockType() const=0;
33 virtual TType getRBlockTemplateType() const=0;
35 virtual TType getGhostRBlockType() const=0;
37 virtual uint getRBlockGeometryNotice() const=0;
39 virtual uint getRBlockHideNotice() const=0;
41 virtual uint getRBlockSelectNotice() const=0;
43 virtual uint getRBlockCycleNotice() const=0;
45 virtual uint getRBlockFixNotice() const=0;
47 virtual uint getRBlockPropertyNotice() const=0;
49 virtual uint getRBlockExtraNotice() const=0;
51 virtual uint getRBlockGroupNotice() const=0;
53 virtual const IContainer * getIContainerRBlock() const=0;
57 virtual const IContainer * getIContainerRBlockTemplate() const=0;
61 virtual const IContainer * getIContainerGhostRBlock() const=0;
68
70 virtual const ICellSpace * getRBlockCellSpace() const=0;
74 virtual const IRBlock * findIRBlockWithID(quint64 id) const=0;
76 virtual IRBlock * findIRBlockWithID(quint64 id) =0;
78 virtual const IRBlockTemplate * findIRBlockTemplateWithID(quint64 id) const=0;
82 virtual const IRBlockTemplate * findIRBlockTemplateWithName(const QString &s) const=0;
84 virtual IRBlockTemplate * findIRBlockTemplateWithName(const QString &s) =0;
86 virtual const IGhostRBlock * findIGhostRBlockWithID(quint64 id) const=0;
88 virtual IGhostRBlock * findIGhostRBlockWithID(quint64 id) =0;
90 virtual const IRBlock * findIRBlockClosestTo(const DVect &v,const double &radius=limits<double>::max()) const=0;
92 virtual IRBlock * findIRBlockClosestTo(const DVect &v,const double &radius=limits<double>::max())=0;
94 virtual const IRBlock * findIRBlockContaining(const DVect &v,QSet<quint64> *skip=nullptr) const=0;
96 virtual IRBlock * findIRBlockContaining(const DVect &v,QSet<quint64> *skip=nullptr)=0;
98 virtual bool collide(IRBlock *rb1, IRBlock *rb2) const = 0;
99
101 virtual const IEnergyMap * getIRBlockEnergies() const=0;
102
104 virtual void getIRBlocksInBoxList(const DExtent &d,FArray<IRBlock *> *ret,bool intersect=true)=0;
105 virtual void getIRBlocksInBoxList(const DExtent &d,FArray<const IRBlock *> *ret,bool intersect=true)=0;
106
108 virtual void populateAttributeSets(QStringList *scalarAtts,FArray<uint> *scalarNotices,QStringList *stringAtts,FArray<uint> *stringNotices,QStringList *vectorAtts,FArray<uint> *vectorNotices) const=0;
110 virtual void populatePropertySets(QStringList *valueProps,QStringList *labelProps,QStringList *vectorProps)const=0;
112 virtual prop_signal * getPropertySignal() const = 0;
113
115 virtual void threadedCallbackObject(Callback4<void,IRBlock *,quint32,quint32,void *> &callback,void *v=nullptr,bool useThreads=true) const=0;
116
118 template <class S,void (S::*MFP)(IRBlock *,quint32,quint32,void *)>
119 void threadedCallbackMethod(S *s,void *v=nullptr,bool useThreads=true) const {
121 threadedCallbackObject(callback,v,useThreads);
122 }
123 };
124} // namespace rblock
125// EoF
Definition callback.h:37
Definition callback.h:130
An array class that attempts to minimize unnecessary heap access.
Definition farray.h:25
Interface for containers of IThings.
Definition icontainer.h:21
Interface to EnergyMap class.
Definition ienergymap.h:15
Interface to a "refining" cell space.
Definition icellspace.h:24
Contact container class.
Definition icontainercontact.h:28
debug checked shorthand for std::numeric_limits<T>::
Definition limit.h:25
Definition ighostrblock.h:16
Definition irblock.h:25
Definition irblockmodule.h:25
virtual IRBlock * findIRBlockClosestTo(const DVect &v, const double &radius=limits< double >::max())=0
Find the RBlock closest to v.
virtual const ICellSpace * getRBlockCellSpace() const =0
Return a const ICellSpace pointer to the RBlock cell space.
virtual void getIRBlocksInBoxList(const DExtent &d, FArray< IRBlock * > *ret, bool intersect=true)=0
Return the RBlocks in a box.
virtual uint getRBlockSelectNotice() const =0
Return the RBlock select notice.
virtual void populateAttributeSets(QStringList *scalarAtts, FArray< uint > *scalarNotices, QStringList *stringAtts, FArray< uint > *stringNotices, QStringList *vectorAtts, FArray< uint > *vectorNotices) const =0
Populates sets of property names based on their type.
virtual IRBlockTemplate * findIRBlockTemplateWithName(const QString &s)=0
Find the IRBlock with name s that is a template.
virtual IContainerContact * getIContainerRBlockRBlock()=0
Return the IContainerContact of RBlock-RBlock contacts.
virtual const IGhostRBlock * findIGhostRBlockWithID(quint64 id) const =0
Find the const IGhostRBlock with ID id;.
virtual uint getRBlockExtraNotice() const =0
Return the RBlock extra notice.
virtual const IRBlock * findIRBlockClosestTo(const DVect &v, const double &radius=limits< double >::max()) const =0
Find the const RBlock closest to v.
virtual uint getRBlockCycleNotice() const =0
Return the RBlock cycle notice.
virtual IContainer * getIContainerRBlock()=0
Return the IContainer of the RBlocks.
virtual IRBlock * findIRBlockWithID(quint64 id)=0
Find the IRBlock with ID id.
virtual uint getRBlockHideNotice() const =0
Return the RBlock hide notice.
virtual bool collide(IRBlock *rb1, IRBlock *rb2) const =0
Returns a boolean indicating whether a two rigid blocks intersect.
virtual IContainer * getIContainerRBlockTemplate()=0
Return the IContainer of the RBlock templates.
virtual prop_signal * getPropertySignal() const =0
Return the signal associated with the addition of a new property.
virtual const IEnergyMap * getIRBlockEnergies() const =0
Return the EnergyMap attached to the rblocks.
virtual uint getRBlockGroupNotice() const =0
Return the RBlock group notice.
virtual const IContainer * getIContainerGhostRBlock() const =0
Return the const IContainer of the Ghost RBlocks.
virtual uint getRBlockPropertyNotice() const =0
Return the RBlock property notice.
virtual const IRBlock * findIRBlockWithID(quint64 id) const =0
Find the const IRBlock with ID id;.
virtual TType getRBlockTemplateType() const =0
Get the RBlock template TType.
shared::Signal< const QString &, const QVariant & > prop_signal
Typedef for the small granularity signal used to indicate to the gui that a propery has been added.
Definition irblockmodule.h:28
virtual const IRBlock * findIRBlockContaining(const DVect &v, QSet< quint64 > *skip=nullptr) const =0
Find the const RBlock containing to v.
virtual TType getRBlockType() const =0
Return the RBlock TType.
virtual uint getRBlockGeometryNotice() const =0
Return the RBlock geometry notice.
virtual const IContainerContact * getIContainerRBlockRBlock() const =0
Return the IContainerContact of RBlock-RBlock contacts.
virtual IContainer * getIContainerGhostRBlock()=0
Return the IContainer of the Ghost RBlocks.
virtual const IContainer * getIContainerRBlockTemplate() const =0
Return the const IContainer of the RBlock templates.
virtual const IRBlockTemplate * findIRBlockTemplateWithID(quint64 id) const =0
Find the const IRBlock with ID id that is a template;.
virtual uint getRBlockFixNotice() const =0
Return the RBlock fixity notice.
virtual IRBlock * findIRBlockContaining(const DVect &v, QSet< quint64 > *skip=nullptr)=0
Find the RBlock containing to v.
virtual void populatePropertySets(QStringList *valueProps, QStringList *labelProps, QStringList *vectorProps) const =0
Populates sets of property names based on their type.
virtual const IContainer * getIContainerRBlock() const =0
Return the const IContainer of the RBlocks.
virtual ICellSpace * getRBlockCellSpace()=0
Return an ICellSpace pointer to the RBlock cell space.
virtual IGhostRBlock * findIGhostRBlockWithID(quint64 id)=0
Find the IGhostRBlock with ID id.
virtual const IRBlockTemplate * findIRBlockTemplateWithName(const QString &s) const =0
Find the const IRBlock with name s that is a template;.
virtual IRBlockTemplate * findIRBlockTemplateWithID(quint64 id)=0
Find the IRBlock with ID id that is a template.
virtual TType getGhostRBlockType() const =0
Get the GhostRBlock TType.
void threadedCallbackMethod(S *s, void *v=nullptr, bool useThreads=true) const
Implementation of the multithreaded loop using the threadedCallbackObjectRBlock
Definition irblockmodule.h:119
Definition irblocktemplate.h:11
An array class that attempts to minimize unnecessary heap access.
uint32 TType
class type indicator
Definition basedef.h:46
DExtent3 DExtent
A DExtent2 in 2D, a DExtent3 in 3D.
Definition dim.h:160
DVect3 DVect
Vector of doubles, either 2D or 3D.
Definition dim.h:154
namespace Itasca
Definition basememory.cpp:10
Itasca Library standard namespace, specific to 2D or 3D.
Definition icontactmodule.h:4