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 More...
 
Attributes
SCR_AttributeWrapper * attribute (const String &name)
 Retrieve attribute of specific name in current module. More...
 
SCR_AttributeWrapper * attribute (const String &name, const QVariant &defAttr)
 Retrieve attribute of specific name in current module. More...
 
SCR_AttributeWrapper * attribute (const String &name, QObject defAttr)
 Retrieve attribute of specific name in current module. More...
 

Properties

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

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

SCR_AttributeWrapper* 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
SCR_AttributeWrapper* 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
SCR_AttributeWrapper* 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
readprivate

Id of current module.

String Module::name
readprivate

Name of current module.

int Module::nInputs
readprivate

Number of inputs.

String Module::type
readprivate

Type name of current module.


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