Itasca C++ Interface
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Modules Pages
iprogram.h
Go to the documentation of this file.
1 #pragma once
2 
17 #include "base/src/baseqt.h"
18 
19 namespace itasca {
20  class IImportExport;
21  class IKernel;
22  class IKernelInput;
23  class IKernelOutput;
24 
37  class IProgram {
38  public:
40  virtual QObject *getQObject()=0;
42  virtual const QObject *getQObject() const=0;
44  virtual QString getName() const=0;
46  virtual uint getCodeVersion() const=0;
48  virtual uint getUpdateVersion() const=0;
50  virtual IKernelInput * getIKernelInput()=0;
52  virtual IKernelOutput * getIKernelOutput()=0;
54  virtual quint64 getStep() const=0;
56  virtual DExtent3 getModelExtent() const=0;
58  virtual IKernel * getIKernel()=0;
60  virtual const IKernel * getIKernel() const=0;
66  virtual void * findInterface(const QString &name)=0;
67  virtual const void * findInterface(const QString &name) const=0;
68  template <class T> T * findInterface() { return reinterpret_cast<T *>(findInterface(typeid(T).name())); }
75  template <class T> const T * findInterface() const { return reinterpret_cast<const T *>(findInterface(typeid(T).name())); }
81  virtual void registerInterface(const QString &name,void *iface,bool errorOnDuplicate=true)=0;
85  template <class T> void registerInterface(T *iface,bool errorOnDuplicate=true) { registerInterface(typeid(T).name(),reinterpret_cast<void *>(iface),errorOnDuplicate); }
87  virtual void destroy()=0;
90  virtual bool isModelMapped() const=0;
91  virtual QString getHomePath() const=0;
92  };
93 } // namespace itascaxd
94 // EoF
T * findInterface()
Definition: iprogram.h:71
virtual DExtent3 getModelExtent() const =0
Returns the current model extent.
virtual void destroy()=0
Destroy the kernel.
Interface describing ALL output support the kernel needs to send information to whatever interface is...
Definition: ikerneloutput.h:12
namespace Itasca
Definition: basememory.cpp:9
virtual QObject * getQObject()=0
Returns the program access point QObject pointer.
const T * findInterface() const
Definition: iprogram.h:75
virtual uint getUpdateVersion() const =0
Returns the code Minor version.
void registerInterface(T *iface, bool errorOnDuplicate=true)
Definition: iprogram.h:85
virtual IKernelInput * getIKernelInput()=0
Returns a pointer to the IKernelInput object.
virtual void registerInterface(const QString &name, void *iface, bool errorOnDuplicate=true)=0
virtual quint64 getStep() const =0
Returns the total number of cycles - This particular functions is thread safe.
Interface describing ALL input support the kernel needs to receive from whatever interface is driving...
Definition: ikernelinput.h:15
This Interface provides an entry point for command processing.
Definition: ikernel.h:32
virtual uint getCodeVersion() const =0
Returns the code Major version.
virtual IKernelOutput * getIKernelOutput()=0
Returns a pointer to the IKernelOutput object.
virtual bool isModelMapped() const =0
The main program access point.
Definition: iprogram.h:37
virtual IKernel * getIKernel()=0
Returns a pointer to IKernel, the entry point for command processing.
virtual QString getName() const =0
Returns the code name.
All default base headers if Qt is being used.