Itasca C++ Interface
Loading...
Searching...
No Matches
iprogram.h
Go to the documentation of this file.
1#pragma once
17#include "base/src/baseqt.h"
18
19namespace itasca {
20 class IImportExport;
21 class IKernel;
22 class IKernelInput;
23 class IKernelOutput;
24
37 class IProgram {
38 public:
40 virtual string getName() const=0;
42 virtual uint32 getCodeVersion() const=0;
44 virtual uint32 getUpdateVersion() const=0;
50 virtual uint64 getStep() const=0;
52 virtual DExtent3 getModelExtent() const=0;
54 virtual IKernel * getIKernel()=0;
56 virtual const IKernel * getIKernel() const=0;
62 virtual void * findInterface(const string &name)=0;
63 virtual const void * findInterface(const string &name) const=0;
67 template <class T> T * findInterface() { return reinterpret_cast<T *>(findInterface(typeid(T).name())); }
71 template <class T> const T * findInterface() const { return reinterpret_cast<const T *>(findInterface(typeid(T).name())); }
77 virtual void registerInterface(const string &name,void *iface,bool errorOnDuplicate=true)=0;
81 template <class T> void registerInterface(T *iface,bool errorOnDuplicate=true) { registerInterface(typeid(T).name(),reinterpret_cast<void *>(iface),errorOnDuplicate); }
83 virtual void destroy()=0;
86 virtual bool isModelMapped() const=0;
87 virtual string getHomePath() const=0;
88 };
89} // namespace itasca
90namespace kernel {
91 using itasca::IProgram;
92}
93// EoF
All default base headers if Qt is being used.
This Interface provides an entry point for command processing.
Definition ikernel.h:38
Interface describing ALL input support the kernel needs to receive from whatever interface is driving...
Definition ikernelinput.h:17
Interface describing ALL output support the kernel needs to send information to whatever interface is...
Definition ikerneloutput.h:12
The main program access point.
Definition iprogram.h:37
void registerInterface(T *iface, bool errorOnDuplicate=true)
Definition iprogram.h:81
const T * findInterface() const
Definition iprogram.h:71
virtual const void * findInterface(const string &name) const =0
virtual IKernel * getIKernel()=0
Returns a pointer to IKernel, the entry point for command processing.
virtual void destroy()=0
Destroy the kernel.
virtual void registerInterface(const string &name, void *iface, bool errorOnDuplicate=true)=0
virtual uint64 getStep() const =0
Returns the total number of cycles - This particular functions is thread safe.
virtual string getName() const =0
Returns the code name.
virtual void * findInterface(const string &name)=0
virtual bool isModelMapped() const =0
virtual uint32 getUpdateVersion() const =0
Returns the code Minor version.
virtual const IKernel * getIKernel() const =0
Returns a const pointer to IKernel, the entry point for command processing.
virtual IKernelOutput * getIKernelOutput()=0
Returns a pointer to the IKernelOutput object.
virtual DExtent3 getModelExtent() const =0
Returns the current model extent.
virtual uint32 getCodeVersion() const =0
Returns the code Major version.
T * findInterface()
Definition iprogram.h:67
virtual IKernelInput * getIKernelInput()=0
Returns a pointer to the IKernelInput object.
namespace Itasca
Definition basememory.cpp:10