ScriptModule
Properties | List of all members
Module Class Reference

The Module class refers to a specific module linked in the current rendering context. If a module exports its attributes, it is possible to fetch them using methods from this class. Modules can be accessed through the Context. More...

#include <ScriptInterface.h>

Inheritance diagram for Module:
Inheritance graph
[legend]
Collaboration diagram for Module:
Collaboration graph
[legend]

Public Slots

Ports
InputPort input (int idx=0)
 retrieve specific input port
 
Attributes
Attribute attribute (const String &name)
 Retrieve attribute of specific name in current module.
 
Attribute attribute (const String &name, const QVariant &defAttr)
 Retrieve attribute of specific name in current module.
 
Attribute attribute (const String &name, QObject defAttr)
 Retrieve attribute of specific name in current module.
 

Properties

int nInputs
 Number of inputs.
 
String type
 Type name of current module.
 
String name
 Name of current module.
 
int id
 Id of current module.
 

Detailed Description

The Module class refers to a specific module linked in the current rendering context. If a module exports its attributes, it is possible to fetch them using methods from this class. Modules can be accessed through the Context.

// Fetch attribute by its name, value is set to 'undefined' if not found
attr1 = module.attribute( "name" );
// Fetch attribute by its name, value is set to Point3d if not found
attr2 = module.attribute( "name", new Point3d() );

Member Function Documentation

Attribute Module::attribute ( const String &  name)
slot

Retrieve attribute of specific name in current module.

Parameters
nameName of attribute
Returns
Attribute, or null if not found
Attribute Module::attribute ( const String &  name,
const QVariant &  defAttr 
)
slot

Retrieve attribute of specific name in current module.

Parameters
nameName of attribute
defAttrDefault value for attribute if not found
Returns
Attribute, or Attribute linking to defAttr if not found
Attribute Module::attribute ( const String &  name,
QObject  defAttr 
)
slot

Retrieve attribute of specific name in current module.

Parameters
nameName of attribute
defAttrDefault value for attribute if not found
Returns
Attribute, or Attribute linking to defAttr if not found
InputPort Module::input ( int  idx = 0)
slot

retrieve specific input port

Parameters
idxIndex of port [ 0, nInput - 1 ]
Returns
InputPort

Property Documentation

int Module::id
read

Id of current module.

String Module::name
read

Name of current module.

int Module::nInputs
read

Number of inputs.

String Module::type
read

Type name of current module.


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