Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | List of all members
itasca::IProgram Class Referenceabstract

The main program access point. More...

#include <iprogram.h>

Public Member Functions

virtual string getName () const =0
 Returns the code name.
 
virtual Version getCodeVersion () const =0
 Returns the code Major version, Minor version, and revision.
 
virtual IKernelInputgetIKernelInput ()=0
 Returns a pointer to the IKernelInput object.
 
virtual IKernelOutputgetIKernelOutput ()=0
 Returns a pointer to the IKernelOutput object.
 
virtual uint64 getStep () const =0
 Returns the total number of cycles - This particular functions is thread safe.
 
virtual DExtent3 getModelExtent () const =0
 Returns the current model extent.
 
virtual IKernelgetIKernel ()=0
 Returns a pointer to IKernel, the entry point for command processing.
 
virtual const IKernelgetIKernel () const =0
 Returns a const pointer to IKernel, the entry point for command processing.
 
virtual void * findInterface (const string &name)=0
 
virtual const void * findInterface (const string &name) const =0
 
template<class T >
T * findInterface ()
 
template<class T >
const T * findInterface () const
 
virtual void registerInterface (const string &name, void *iface, bool errorOnDuplicate=true)=0
 
template<class T >
void registerInterface (T *iface, bool errorOnDuplicate=true)
 
virtual void destroy ()=0
 Destroy the kernel.
 
virtual bool isModelMapped () const =0
 
virtual string getHomePath () const =0
 

Detailed Description

The main program access point.

Serves at the root of the "tree" giving access to interface describing the entire code.
Use the IFLAC3D interface (not defined at the kernel level) to add application specific data to the interface tree.

Note
If the getIxxx function is tagged with the Optional comment, that means that feature may not available and the user interface should degrade gracefully if it returns 0.

Member Function Documentation

◆ findInterface() [1/4]

template<class T >
T * itasca::IProgram::findInterface ( )
inline

This is a template version of findInterface(const QString &) that uses typeid(T).name() for the string.
For example

IGeometry *geom = prog->findInterface<IGeometry>();


Registered interfaces are documented in the registerd_interfaces module

◆ findInterface() [2/4]

template<class T >
const T * itasca::IProgram::findInterface ( ) const
inline

This is a template version of findInterface(const QString &) that uses typeid(T).name() for the string.
For example

IGeometry *geom = prog->findInterface<IGeometry>();


Registered interfaces are documented in the registerd_interfaces module

◆ findInterface() [3/4]

virtual const void * itasca::IProgram::findInterface ( const string & name) const
pure virtual

The proliferation of getIXXXX() interface functions in IProgram and IFLAC3D is becoming unmanageable.
This interface is intended for future use, to replace all that.
The idea is that interfaces would be registered with the program under a key name, and people could retrieve interface pointers with that name here.
Registered interfaces are documented in the registerd_interfaces module

◆ findInterface() [4/4]

virtual void * itasca::IProgram::findInterface ( const string & name)
pure virtual

The proliferation of getIXXXX() interface functions in IProgram and IFLAC3D is becoming unmanageable.
This interface is intended for future use, to replace all that.
The idea is that interfaces would be registered with the program under a key name, and people could retrieve interface pointers with that name here.
Registered interfaces are documented in the registerd_interfaces module

◆ isModelMapped()

virtual bool itasca::IProgram::isModelMapped ( ) const
pure virtual

Returns FALSE if the model is between the start of RESTORE and the end of mapping, so model data and pointers could be invalid.

◆ registerInterface() [1/2]

virtual void itasca::IProgram::registerInterface ( const string & name,
void * iface,
bool errorOnDuplicate = true )
pure virtual

The proliferation of getIXXXX() interface functions in IProgram and IFLAC3D is becoming unmanageable.
This interface is intended for future use, to replace all that.
The idea is that interfaces would be registered with the program under a key name here, and people could retrieve interface pointers with that name.
Registered interfaces are documented in the registerd_interfaces module

◆ registerInterface() [2/2]

template<class T >
void itasca::IProgram::registerInterface ( T * iface,
bool errorOnDuplicate = true )
inline

This is a templatized version of registerInterface(const QString &name,void *iface), that converts automatically and uses typeid(T).name() for the registration string. We reccomend you use this if at all possible. Registered interfaces are documented in the registerd_interfaces module


The documentation for this class was generated from the following file: