iLand
Public Slots | Public Member Functions | List of all members
ScriptObjectFactory Class Reference

The ScriptObjectFactory can instantiate objects of other C++ (QObject-based) types. More...

#include <scriptglobal.h>

Inheritance diagram for ScriptObjectFactory:

Public Slots

QJSValue newCSVFile (QString filename)
 create a new instance of CSVFile and return it More...
 
QJSValue newClimateConverter ()
 create new instance of ClimateConverter and return it More...
 
QJSValue newMap ()
 create new instance of Map and return it More...
 
QJSValue newDBHDistribution ()
 create new instance of DBHDistribution and return it More...
 
QJSValue newGrid ()
 creates a new grid object and return it More...
 
QJSValue newSpatialAnalysis ()
 creates a new SpatialAnalysis object and returns it More...
 
int stats ()
 return the number of created objects More...
 

Public Member Functions

 ScriptObjectFactory (QObject *parent=nullptr)
 

Detailed Description

The ScriptObjectFactory can instantiate objects of other C++ (QObject-based) types.

This factory approach is used because the V8 (QJSEngine) does not work with the "new" way of creating objects.

Constructor & Destructor Documentation

◆ ScriptObjectFactory()

ScriptObjectFactory::ScriptObjectFactory ( QObject *  parent = nullptr)

Member Function Documentation

◆ newClimateConverter

QJSValue ScriptObjectFactory::newClimateConverter ( )
slot

create new instance of ClimateConverter and return it

◆ newCSVFile

QJSValue ScriptObjectFactory::newCSVFile ( QString  filename)
slot

create a new instance of CSVFile and return it

◆ newDBHDistribution

QJSValue ScriptObjectFactory::newDBHDistribution ( )
slot

create new instance of DBHDistribution and return it

◆ newGrid

QJSValue ScriptObjectFactory::newGrid ( )
slot

creates a new grid object and return it

◆ newMap

QJSValue ScriptObjectFactory::newMap ( )
slot

create new instance of Map and return it

◆ newSpatialAnalysis

QJSValue ScriptObjectFactory::newSpatialAnalysis ( )
slot

creates a new SpatialAnalysis object and returns it

◆ stats

int ScriptObjectFactory::stats ( )
inlineslot

return the number of created objects


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