TorqueScript Reference
Public Member Functions | List of all members
ModuleDefinition Class Reference

#include <moduleDefinition_ScriptBinding.h>

Inherits SimSet.

Public Member Functions

Boolean addDependency (moduleId, versionId)
 
String getDependency (int dependencyIndex)
 
Integer getDependencyCount ()
 
Integer getModuleManager ()
 
String getModulePath ()
 
Boolean removeDependency (moduleId)
 
Boolean save ()
 
- Public Member Functions inherited from SimSet
void add (obj1, [obj2] *)
 
void bringToFront (object)
 
void callOnChildren (string method, [string args] *)
 
void callOnChildrenNoRecurse (string method, [string args] *)
 
void clear ()
 
void deleteObjects ()
 
Integer findObjectByInternalName (string name, [bool searchChildren]?)
 
Integer getCount ()
 
Integer getObject (index)
 
Boolean isMember (object)
 
void listObjects ()
 
void pushToBack (object)
 
void remove (obj1, [obj2] *)
 
void removeIfMember (obj1, [obj2] *)
 
void reorderChild (SimObject child1, SimObject child2)
 
- Public Member Functions inherited from SimObject
void assignFieldsFrom (SimObject)
 
Integer clone ([copyDynamicFields=false]?)
 
void delete ()
 
Integer getId ()
 
void setName (newName)
 
String getName ()
 
String getClassNamespace ()
 
String getSuperClassNamespace ()
 
void setClassNamespace (nameSpace)
 
void setSuperClassNamespace ()
 
Boolean isMethod (string methodName)
 
String call (methodName, [args] *)
 
void dumpClassHierarchy ()
 
void dump ()
 
Boolean isMemberOfClass (string classname)
 
String getClassName ()
 
String getFieldValue (fieldName)
 
Boolean setFieldValue (fieldName, value)
 
Boolean setEditFieldValue (fieldName, value)
 
Integer getDynamicFieldCount ()
 
String getDynamicField (index)
 
Integer getFieldCount ()
 
String getField (int index)
 
void setProgenitorFile (file)
 
String getProgenitorFile ()
 
Integer getType ()
 
String getFieldType (fieldName)
 
void setInternalName (string InternalName)
 
String getInternalName ()
 
Boolean isChildOfGroup (groupID)
 
Integer getGroup ()
 
Boolean startTimer (callbackFunction, float timePeriod, [repeat]?)
 
void stopTimer ()
 
Boolean isTimerActive ()
 
Integer schedule (time, command, [arg] *)
 
void startListening (SimObject)
 
void stopListening (SimObject)
 
void addListener (SimObject)
 
void removeListener (SimObject)
 
void removeAllListeners ()
 
void postEvent (String eventName, String data)
 
Boolean save (fileName, [selectedOnly]?)
 
void addFieldFilter (fieldName)
 
void removeFieldFilter (fieldName)
 

Member Function Documentation

◆ addDependency()

Boolean addDependency ( moduleId  ,
versionId   
)

Adds the specified moduleId and vesionId as a dependency.

Parameters
moduleIdThe module Id to add as a dependency.
versionIdThe version Id to add as a dependency. Using zero indicates any version.
Returns
(bool success) Whether the module dependency was added or not.

◆ getDependency()

String getDependency ( int  dependencyIndex)

Gets the module dependency at the specified index.

Parameters
dependencyIndexThe module dependency index.
Returns
(module-dependency) The module dependency at the specified index.

◆ getDependencyCount()

Integer getDependencyCount ( )

Gets the number of module dependencies this module definition has.

Returns
(int count) The number of module dependencies this module definition has.

◆ getModuleManager()

Integer getModuleManager ( )

Gets the module manager which this module definition is registered with (if any).

Returns
(moduleManager) The module manager which this module definition is registered with (zero if not registered).

◆ getModulePath()

String getModulePath ( )

Returns the path to the module directory.

Returns
A path to the module definition.

◆ removeDependency()

Boolean removeDependency ( moduleId  )

Removes the specified moduleId as a dependency.

Parameters
moduleIdThe module Id to remove as a dependency.
Returns
(bool success) Whether the module dependency was removed or not.

◆ save()

Boolean save ( )

Saves the module definition to the file it was loaded from (if any).

Returns
(bool success) Whether the module definition was saved or not.