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 Version getCodeVersion() const=0;
48 virtual uint64 getStep() const=0;
50 virtual DExtent3 getModelExtent() const=0;
52 virtual IKernel * getIKernel()=0;
54 virtual const IKernel * getIKernel() const=0;
60 virtual void * findInterface(const string &name)=0;
61 virtual const void * findInterface(const string &name) const=0;
65 template <class T> T * findInterface() { return reinterpret_cast<T *>(findInterface(typeid(T).name())); }
69 template <class T> const T * findInterface() const { return reinterpret_cast<const T *>(findInterface(typeid(T).name())); }
75 virtual void registerInterface(const string &name,void *iface,bool errorOnDuplicate=true)=0;
79 template <class T> void registerInterface(T *iface,bool errorOnDuplicate=true) { registerInterface(typeid(T).name(),reinterpret_cast<void *>(iface),errorOnDuplicate); }
81 virtual void destroy()=0;
84 virtual bool isModelMapped() const=0;
85 virtual string getHomePath() const=0;
86 };
87} // namespace itasca
88namespace kernel {
89 using itasca::IProgram;
90}
91// EoF
All default base headers if Qt is being used.
This Interface provides an entry point for command processing.
Definition ikernel.h:37
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:79
const T * findInterface() const
Definition iprogram.h:69
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 Version getCodeVersion() const =0
Returns the code Major version, Minor version, and revision.
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 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.
T * findInterface()
Definition iprogram.h:65
virtual IKernelInput * getIKernelInput()=0
Returns a pointer to the IKernelInput object.
namespace Itasca
Definition basememory.cpp:14
Definition version.h:4