|
Torque2D Reference
|
#include <simObject.h>
Inheritance diagram for SimObject:Classes | |
| struct | Notify |
Public Types | |
| enum | WriteFlags { SelectedOnly = BIT(0) } |
Public Member Functions | |
| StringTableEntry | getClassNamespace () const |
| StringTableEntry | getSuperClassNamespace () const |
| void | setClassNamespace (const char *classNamespace) |
| void | setSuperClassNamespace (const char *superClassNamespace) |
| void | pushScriptCallbackGuard (void) |
| void | popScriptCallbackGuard (void) |
| S32 | getScriptCallbackGuard (void) |
| virtual SimObject * | findObject (const char *name) |
| Namespace * | getNamespace () |
| Return the object's namespace. | |
| const char * | tabComplete (const char *prevText, S32 baseLen, bool) |
| virtual void | dump () |
| virtual void | dumpClassHierarchy () |
| SimObject * | clone (const bool copyDynamicFields) |
| virtual void | copyTo (SimObject *object) |
| template<typename T > | |
| bool | isType (void) |
| virtual bool | handlesConsoleMethod (const char *fname, S32 *routingId) |
| DECLARE_CONOBJECT (SimObject) | |
Public Member Functions inherited from ConsoleObject | |
| const AbstractClassRep::Field * | findField (StringTableEntry fieldName) const |
| Get a reference to a field by name. | |
| virtual AbstractClassRep * | getClassRep () const |
| Gets the ClassRep. | |
| bool | setField (const char *fieldName, const char *value) |
| Set the value of a field. | |
| virtual | ~ConsoleObject () |
| const AbstractClassRep::FieldList & | getFieldList () const |
| Get a list of all the fields. This information cannot be modified. | |
| AbstractClassRep::FieldList & | getModifiableFieldList () |
| bool & | getDynamicGroupExpand () |
| S32 | getClassId (U32 netClassGroup) const |
| const char * | getClassName () const |
Static Public Member Functions | |
| static void | initPersistFields () |
Static Public Member Functions inherited from ConsoleObject | |
| static const char * | lookupClassName (const U32 in_classTag) |
| Get the classname from a class tag. | |
| static void | initPersistFields () |
| static void | consoleInit () |
| static AbstractClassRep * | getStaticClassRep () |
| Get the abstract class information for this class. | |
| static AbstractClassRep * | getParentStaticClassRep () |
| Get the abstract class information for this class's superclass. | |
| static ConsoleObject * | create (const char *in_pClassName) |
| static ConsoleObject * | create (const U32 groupId, const U32 typeId, const U32 in_classId) |
Protected Member Functions | |
| virtual void | onTamlPreWrite (void) |
| Taml callbacks. | |
| virtual void | onTamlPostWrite (void) |
| Called after Taml has finished writing the object. | |
| virtual void | onTamlPreRead (void) |
| Called prior to Taml reading the object. | |
| virtual void | onTamlPostRead (const TamlCustomNodes &customNodes) |
| virtual void | onTamlAddParent (SimObject *pParentObject) |
| Called after Taml has finished reading the object and has added the object to any parent. | |
| virtual void | onTamlCustomWrite (TamlCustomNodes &customNodes) |
| Called during the writing of the object to allow custom properties to be written. | |
| virtual void | onTamlCustomRead (const TamlCustomNodes &customNodes) |
| Called during the reading of the object to allow custom properties to be read. | |
| void | linkNamespaces () |
| void | unlinkNamespaces () |
Protected Member Functions inherited from ConsoleObject | |
| ConsoleObject () | |
| ConsoleObject (const ConsoleObject &) | |
Static Protected Member Functions | |
| static bool | setClass (void *obj, const char *data) |
| static bool | setSuperClass (void *obj, const char *data) |
| static bool | writeObjectName (void *obj, StringTableEntry pFieldName) |
| static bool | writeCanSaveDynamicFields (void *obj, StringTableEntry pFieldName) |
| static bool | writeInternalName (void *obj, StringTableEntry pFieldName) |
| static bool | setParentGroup (void *obj, const char *data) |
| static bool | writeParentGroup (void *obj, StringTableEntry pFieldName) |
| static bool | writeSuperclass (void *obj, StringTableEntry pFieldName) |
| static bool | writeClass (void *obj, StringTableEntry pFieldName) |
| static bool | setProtectedName (void *obj, const char *data) |
Static Protected Member Functions inherited from ConsoleObject | |
| static void | addGroup (const char *in_pGroupname, const char *in_pGroupDocs=NULL) |
| static void | endGroup (const char *in_pGroupname) |
| static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL) |
| static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::WriteDataNotify in_writeDataFn, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL) |
| static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, const char *in_pFieldDocs) |
| static void | addField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::WriteDataNotify in_writeDataFn, const char *in_pFieldDocs) |
| static void | addFieldV (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, ConsoleTypeValidator *v, const char *in_pFieldDocs=NULL) |
| static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL) |
| static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, AbstractClassRep::WriteDataNotify in_writeDataFn=&defaultProtectedWriteFn, const U32 in_elementCount=1, EnumTable *in_table=NULL, const char *in_pFieldDocs=NULL) |
| static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, const char *in_pFieldDocs=NULL) |
| static void | addProtectedField (const char *in_pFieldname, const U32 in_fieldType, const dsize_t in_fieldOffset, AbstractClassRep::SetDataNotify in_setDataFn, AbstractClassRep::GetDataNotify in_getDataFn=&defaultProtectedGetFn, AbstractClassRep::WriteDataNotify in_writeDataFn=&defaultProtectedWriteFn, const char *in_pFieldDocs=NULL) |
| static void | addDepricatedField (const char *fieldName) |
| static bool | removeField (const char *in_pFieldname) |
Protected Attributes | |
| SimObjectId | mId |
| Id number for this object. | |
| StringTableEntry | mIdString |
| Namespace * | mNameSpace |
| U32 | mTypeMask |
| S32 | mScriptCallbackGuard |
| Whether the object is executing a script callback. | |
| bool | mCanSaveFieldDictionary |
| true if dynamic fields (added at runtime) should be saved, defaults to true | |
| StringTableEntry | mInternalName |
| Stores object Internal Name. | |
| StringTableEntry | mClassName |
| Stores the class name to link script class namespaces. | |
| StringTableEntry | mSuperClassName |
| Stores super class name to link script class namespaces. | |
Friends | |
| class | SimManager |
| class | SimGroup |
| class | SimNameDictionary |
| class | SimManagerNameDictionary |
| class | SimIdDictionary |
Notification | |
| static SimObject::Notify * | mNotifyFreeList = NULL |
| static SimObject::Notify * | allocNotify () |
| Get a free Notify structure. | |
| static void | freeNotify (SimObject::Notify *) |
| Mark a Notify structure as free. | |
| Notify * | removeNotify (void *ptr, Notify::Type) |
| Remove a notification from the list. | |
| void | deleteNotify (SimObject *obj) |
| Notify an object when we are deleted. | |
| void | clearNotify (SimObject *obj) |
| Notify an object when we are cleared. | |
| void | clearAllNotifications () |
| Remove all notifications for this object. | |
| void | processDeleteNotifies () |
| Send out deletion notifications. | |
| void | registerReference (SimObject **obj) |
| void | unregisterReference (SimObject **obj) |
| void | addListener (std::string objID) |
| void | removeListener (std::string objID) |
| void | removeAllListeners () |
| void | postEvent (std::string eventName, std::string data) |
Accessors | |
| static bool | disableNameChanging = false |
| const char * | getDataField (StringTableEntry slotName, const char *array) |
| virtual void | setDataField (StringTableEntry slotName, const char *array, const char *value) |
| const char * | getPrefixedDataField (StringTableEntry fieldName, const char *array) |
| void | setPrefixedDataField (StringTableEntry fieldName, const char *array, const char *value) |
| const char * | getPrefixedDynamicDataField (StringTableEntry fieldName, const char *array, const S32 fieldType=-1) |
| void | setPrefixedDynamicDataField (StringTableEntry fieldName, const char *array, const char *value, const S32 fieldType=-1) |
| StringTableEntry | getDataFieldPrefix (StringTableEntry fieldName) |
| U32 | getDataFieldType (StringTableEntry slotName, const char *array) |
| SimFieldDictionary * | getFieldDictionary () |
| void | clearDynamicFields (void) |
| Clear all dynamic fields. | |
| void | setCanSaveDynamicFields (bool bCanSave) |
| Set whether fields created at runtime should be saved. Default is true. | |
| bool | getCanSaveDynamicFields (void) const |
| Get whether fields created at runtime should be saved. Default is true. | |
| void | setInternalName (const char *newname) |
| StringTableEntry | getInternalName () |
| Get the internal of of this control. | |
| virtual bool | save (const char *pcFilePath, bool bOnlySelected=false) |
| Save object as a TorqueScript File. | |
| virtual bool | isMethod (const char *methodName) |
| Check if a method exists in the objects current namespace. | |
| SimObjectId | getId (void) const |
| StringTableEntry | getIdString (void) const |
| U32 | getType () const |
| const StringTableEntry | getName (void) const |
| void | setId (SimObjectId id) |
| void | assignName (const char *name) |
| SimGroup * | getGroup () const |
| bool | isChildOfGroup (SimGroup *pGroup) |
| bool | isProperlyAdded () const |
| bool | isDeleted () const |
| bool | isRemoved () const |
| bool | isLocked () const |
| void | setLocked (bool b) |
| bool | isHidden () const |
| void | setHidden (bool b) |
| void | setProgenitorFile (const char *pFile) |
| StringTableEntry | getProgenitorFile (void) const |
| void | setPeriodicTimerID (const S32 timerID) |
| S32 | getPeriodicTimerID (void) const |
| bool | isPeriodicTimerActive (void) const |
| bool | isSelected () const |
| bool | isExpanded () const |
| void | setSelected (bool sel) |
| void | setExpanded (bool exp) |
| void | setModDynamicFields (bool dyn) |
| void | setModStaticFields (bool sta) |
Initialization | |
| SimObject () | |
| virtual | ~SimObject () |
| virtual bool | processArguments (S32 argc, const char **argv) |
| Process constructor options. (ie, new SimObject(1,2,3)) | |
Events | |
| virtual bool | onAdd () |
| Called when the object is added to the sim. | |
| virtual void | onRemove () |
| Called when the object is removed from the sim. | |
| virtual void | onGroupAdd () |
| Called when the object is added to a SimGroup. | |
| virtual void | onGroupRemove () |
| Called when the object is removed from a SimGroup. | |
| virtual void | onNameChange (const char *name) |
| Called when the object's name is changed. | |
| virtual void | onStaticModified (const char *slotName, const char *newValue=NULL) |
| virtual void | inspectPreApply () |
| virtual void | inspectPostApply () |
| virtual void | onDeleteNotify (SimObject *object) |
| virtual void | onEditorEnable () |
| Called when the editor is activated. | |
| virtual void | onEditorDisable () |
| Called when the editor is deactivated. | |
Registration | |
SimObjects must be registered with the object system. | |
| bool | registerObject () |
| bool | registerObject (U32 id) |
| bool | registerObject (const char *name) |
| bool | registerObject (const char *name, U32 id) |
| void | unregisterObject () |
| void | deleteObject () |
Sets | |
The object must be properly registered before you can add/remove it to/from a set. All these functions accept either a name or ID to identify the set you wish to operate on. Then they call addObject or removeObject on the set, which sets up appropriate notifications. An object may be in multiple sets at a time. | |
| bool | addToSet (SimObjectId) |
| bool | addToSet (const char *) |
| bool | removeFromSet (SimObjectId) |
| bool | removeFromSet (const char *) |
Serialization | |
| virtual bool | writeField (StringTableEntry fieldname, const char *value) |
| virtual void | write (Stream &stream, U32 tabStop, U32 flags=0) |
| virtual void | writeFields (Stream &stream, U32 tabStop) |
| virtual bool | writeObject (Stream *stream) |
| virtual bool | readObject (Stream *stream) |
| virtual void | buildFilterList () |
| void | addFieldFilter (const char *fieldName) |
| void | removeFieldFilter (const char *fieldName) |
| void | clearFieldFilters () |
| bool | isFiltered (const char *fieldName) |
| void | assignFieldsFrom (SimObject *obj) |
| void | assignDynamicFieldsFrom (SimObject *obj) |
Base class for objects involved in the simulation.
SimObject is a base class for most of the classes you'll encounter working in Torque. It provides fundamental services allowing "smart" object referencing, creation, destruction, organization, and location. Along with SimEvent, it gives you a flexible event-scheduling system, as well as laying the foundation for the in-game editors, GUI system, and other vital subsystems.
You will spend a lot of your time in Torque subclassing, or working with subclasses of, SimObject. SimObject is designed to be easy to subclass.
You should not need to override anything in a subclass except:
Of course, if you know what you're doing, go nuts! But in most cases, you shouldn't need to touch things not on that list.
When you subclass, you should define a typedef in the class, called Parent, that references the class you're inheriting from.
Then, when you override a method, put in:
Of course, you want to replace onAdd with the appropriate method call.
SimObjects do not live apart. One of the primary benefits of using a SimObject is that you can uniquely identify it and easily find it (using its ID). Torque does this by keeping a global hierarchy of SimGroups - a tree - containing every registered SimObject. You can then query for a given object using Sim::findObject() (or SimSet::findObject() if you want to search only a specific set).
Registering a SimObject performs these tasks:
For advanced users: There are two flags which control the behavior of these functions. The first is ModStaticFields, which controls whether or not the DataField functions look through the static fields (defined with addField; see ConsoleObject for details) of the class. The second is ModDynamicFields, which controls dynamically defined fields. They are set automatically by the console constructor code.
| enum WriteFlags |
| Enumerator | |
|---|---|
| SelectedOnly | Passed to SimObject::write to indicate that only objects |
| SimObject | ( | ) |
|
virtual |
| void addFieldFilter | ( | const char * | fieldName | ) |
| void addListener | ( | std::string | objID | ) |
| bool addToSet | ( | const char * | ObjectName | ) |
| bool addToSet | ( | SimObjectId | spid | ) |
|
staticprotected |
Get a free Notify structure.
| void assignDynamicFieldsFrom | ( | SimObject * | obj | ) |
Copy dynamic fields from another object onto this one.
Everything from obj will overwrite what's in this object.
| obj | Object to copy from. |
| void assignFieldsFrom | ( | SimObject * | obj | ) |
Copy fields from another object onto this one.
Objects must be of same type. Everything from obj will overwrite what's in this object; extra fields in this object will remain. This includes dynamic fields.
| obj | Object to copy from. |
| void assignName | ( | const char * | name | ) |
|
virtual |
| void clearAllNotifications | ( | ) |
Remove all notifications for this object.
|
inline |
Clear all dynamic fields.
| void clearFieldFilters | ( | ) |
| SimObject * clone | ( | const bool | copyDynamicFields | ) |
|
virtual |
Reimplemented in ShapeVector, AnimationAsset, FontAsset, ImageAsset, ParticleAsset, ParticleAssetEmitter, AmbientForceController, BuoyancyController, GroupedSceneController, PickingSceneController, PointForceController, RenderProxy, SpriteBase, WaveComposite, GuiSpriteCtrl, CompositeSprite, ParticlePlayer, SceneObject, Scroller, Sprite, TextSprite, Trigger, AssetBase, AudioAsset, and BehaviorComponent.
| DECLARE_CONOBJECT | ( | SimObject | ) |
| void deleteObject | ( | ) |
Unregister, mark as deleted, and free the object.
|
virtual |
|
virtual |
|
virtual |
Find a named sub-object of this object.
This is subclassed in the SimGroup and SimSet classes.
For a single object, it just returns NULL, as normal objects cannot have children.
Reimplemented in SceneObjectSet, SimSet, and SimGroup.
|
staticprotected |
Mark a Notify structure as free.
|
inline |
Get whether fields created at runtime should be saved. Default is true.
|
inline |
| const char * getDataField | ( | StringTableEntry | slotName, |
| const char * | array | ||
| ) |
| StringTableEntry getDataFieldPrefix | ( | StringTableEntry | fieldName | ) |
| U32 getDataFieldType | ( | StringTableEntry | slotName, |
| const char * | array | ||
| ) |
Get the type of a field on the object.
| slotName | Field to access. |
| array | String containing index into array (if field is an array); if NULL, it is ignored. |
|
inline |
Get reference to the dictionary containing dynamic fields.
See here for a detailed discussion of what this function does.
This dictionary can be iterated over using a SimFieldDictionaryIterator.
|
inline |
|
inline |
|
inline |
| StringTableEntry getInternalName | ( | ) |
Get the internal of of this control.
|
inline |
|
inline |
Return the object's namespace.
|
inline |
| const char * getPrefixedDataField | ( | StringTableEntry | fieldName, |
| const char * | array | ||
| ) |
| const char * getPrefixedDynamicDataField | ( | StringTableEntry | fieldName, |
| const char * | array, | ||
| const S32 | fieldType = -1 |
||
| ) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inlinevirtual |
Reimplemented in BehaviorComponent, and DynamicConsoleMethodComponent.
|
static |
|
virtual |
Called after any property of the object is changed in the world editor.
Reimplemented in GuiSceneObjectCtrl, GuiChainCtrl, GuiFrameSetCtrl, GuiGridCtrl, GuiScrollCtrl, GuiInspector, GuiMenuBarCtrl, GuiMenuItemCtrl, GuiControl, GuiMessageVectorCtrl, and GuiTextEditCtrl.
|
virtual |
Specifically, this is called by setDataField when a static field is modified, see the console details. Called before any property of the object is changed in the world editor.
The calling order here is:
Reimplemented in GuiChainCtrl, and GuiControl.
| bool isChildOfGroup | ( | SimGroup * | pGroup | ) |
|
inline |
|
inline |
| bool isFiltered | ( | const char * | fieldName | ) |
|
inline |
|
inline |
|
virtual |
Check if a method exists in the objects current namespace.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
protected |
|
virtual |
Called when the object is added to the sim.
Reimplemented in AnimationAsset, FontAsset, ImageAsset, EditorToySceneWindow, EditorToyTool, SceneWindow, Scene, CompositeSprite, LightObject, SceneObject, Scroller, ShapeVector, TextSprite, Trigger, AssetManager, NameTags, UndoScriptAction, BehaviorComponent, BehaviorInstance, BehaviorTemplate, SimComponent, Array, GameConnection, GuiFrameSetCtrl, GuiFrameSetCtrl, GuiPanelCtrl, GuiTabBookCtrl, GuiEditCtrl, GuiInspectorField, GuiInspectorGroup, GuiInspectorDynamicField, GuiControl, GuiMessageVectorCtrl, GuiTextEditCtrl, GuiBorderProfile, GuiControlProfile, MessageVector, ActionMap, FileStreamObject, StreamObject, ModuleManager, NetObject, TCPObject, SimXMLDocument, Taml, PopupMenu, UInputManager, SimDataBlock, and GuiCursor.
|
virtual |
Called when a SimObject is deleted.
When you are on the notification list for another object and it is deleted, this method is called.
Reimplemented in ParticleAsset, Scene, Path, SceneObjectSet, BehaviorComponent, ModuleManager, UInputManager, and SimSet.
|
inlinevirtual |
Called when the editor is deactivated.
|
inlinevirtual |
Called when the editor is activated.
|
virtual |
Called when the object is added to a SimGroup.
|
virtual |
Called when the object is removed from a SimGroup.
Reimplemented in GuiControl.
|
virtual |
Called when the object's name is changed.
|
virtual |
Called when the object is removed from the sim.
Reimplemented in AnimationAsset, FontAsset, ImageAsset, EditorToySceneWindow, EditorToyTool, SceneWindow, Scene, CompositeSprite, LightObject, SceneObject, SceneObjectSet, Scroller, ShapeVector, TextSprite, AssetManager, UndoScriptAction, BehaviorComponent, BehaviorInstance, BehaviorTemplate, SimComponent, Array, GameConnection, GuiTabBookCtrl, GuiEditCtrl, GuiControl, GuiMessageVectorCtrl, GuiCursor, GuiBorderProfile, MessageVector, ModuleManager, NetConnection, NetObject, SimXMLDocument, Taml, PopupMenu, UInputManager, SimDataBlock, SimSet, and SimGroup.
|
virtual |
Called when a static field is modified.
Reimplemented in SimDataBlock.
|
inlineprotectedvirtual |
Called after Taml has finished reading the object and has added the object to any parent.
Implements TamlCallbacks.
Reimplemented in ParticlePlayer.
|
inlineprotectedvirtual |
Called during the reading of the object to allow custom properties to be read.
Implements TamlCallbacks.
Reimplemented in FontAsset, ImageAsset, ParticleAsset, ParticleAssetEmitter, Scene, CompositeSprite, SceneObject, AssetQuery, AssetTagsManifest, BehaviorComponent, and GuiFrameSetCtrl.
|
inlineprotectedvirtual |
Called during the writing of the object to allow custom properties to be written.
Implements TamlCallbacks.
Reimplemented in FontAsset, ImageAsset, ParticleAsset, ParticleAssetEmitter, Scene, CompositeSprite, SceneObject, AssetQuery, AssetTagsManifest, BehaviorComponent, and GuiFrameSetCtrl.
|
inlineprotectedvirtual |
Called after Taml has finished reading the object. The custom properties is additionally passed here for object who want to process it at the end of reading.
Implements TamlCallbacks.
Reimplemented in Scene.
|
inlineprotectedvirtual |
Called after Taml has finished writing the object.
Implements TamlCallbacks.
Reimplemented in FontAsset, ImageAsset, and AudioAsset.
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
|
inline |
| void postEvent | ( | std::string | eventName, |
| std::string | data | ||
| ) |
|
virtual |
Process constructor options. (ie, new SimObject(1,2,3))
Reimplemented in SimComponent, ConsoleLogger, TCPObject, SimXMLDocument, and SimGroup.
| void processDeleteNotifies | ( | ) |
Send out deletion notifications.
|
inline |
| bool registerObject | ( | ) |
Register an object with the object system.
This must be called if you want to keep the object around. In the rare case that you will delete the object immediately, or don't want to be able to use Sim::findObject to locate it, then you don't need to register it.
registerObject adds the object to the global ID and name dictionaries, after first assigning it a new ID number. It calls onAdd(). If onAdd fails, it unregisters the object and returns false.
If a subclass's onAdd doesn't eventually call SimObject::onAdd(), it will cause an assertion.
| bool registerObject | ( | const char * | name | ) |
Register the object, assigning the name.
| name | Name to assign to the object. |
| bool registerObject | ( | const char * | name, |
| U32 | id | ||
| ) |
Register the object, assigning a name and ID.
| name | Name to assign to the object. |
| id | ID to assign to the object. |
| bool registerObject | ( | U32 | id | ) |
Register the object, forcing the id.
| id | ID to assign to the object. |
| void registerReference | ( | SimObject ** | obj | ) |
Register a reference to this object.
You pass a pointer to your reference to this object.
When the object is deleted, it will null your pointer, ensuring you don't access old memory.
| obj | Pointer to your reference to the object. |
| void removeAllListeners | ( | ) |
| void removeFieldFilter | ( | const char * | fieldName | ) |
| bool removeFromSet | ( | const char * | objectName | ) |
| bool removeFromSet | ( | SimObjectId | sid | ) |
| void removeListener | ( | std::string | objID | ) |
| SimObject::Notify * removeNotify | ( | void * | ptr, |
| Notify::Type | type | ||
| ) |
Remove a notification from the list.
|
virtual |
Save object as a TorqueScript File.
|
inline |
Set whether fields created at runtime should be saved. Default is true.
|
inlinestaticprotected |
| void setClassNamespace | ( | const char * | classNamespace | ) |
|
virtual |
Set the value of a field on the object.
See here for a detailed discussion of what this function does.
| slotName | Field to access. |
| array | String containing index into array; if NULL, it is ignored. |
| value | Value to store. |
Reimplemented in GuiControl.
|
inline |
| void setHidden | ( | bool | b = true | ) |
| void setId | ( | SimObjectId | id | ) |
| void setInternalName | ( | const char * | newname | ) |
These functions support internal naming that is not namespace bound for locating child controls in a generic way.
Set the internal name of this control (Not linked to a namespace)
| void setLocked | ( | bool | b = true | ) |
|
inline |
|
inline |
|
staticprotected |
|
inline |
| void setPrefixedDataField | ( | StringTableEntry | fieldName, |
| const char * | array, | ||
| const char * | value | ||
| ) |
| void setPrefixedDynamicDataField | ( | StringTableEntry | fieldName, |
| const char * | array, | ||
| const char * | value, | ||
| const S32 | fieldType = -1 |
||
| ) |
|
inline |
|
staticprotected |
|
inline |
|
inlinestaticprotected |
| void setSuperClassNamespace | ( | const char * | superClassNamespace | ) |
| const char * tabComplete | ( | const char * | prevText, |
| S32 | baseLen, | ||
| bool | fForward | ||
| ) |
Get next matching item in namespace.
This wraps a call to Namespace::tabComplete; it gets the next thing in the namespace, given a starting value and a base length of the string. See Namespace::tabComplete for details.
|
protected |
| void unregisterObject | ( | ) |
Unregister the object from Sim.
This performs several operations:
| void unregisterReference | ( | SimObject ** | obj | ) |
Unregister a reference to this object.
Remove a reference from the list, so that it won't get nulled inappropriately.
Call this when you're done with your reference to the object, especially if you're going to free the memory. Otherwise, you may erroneously get something overwritten.
|
virtual |
Output the TorqueScript to recreate this object.
This calls writeFields internally.
| stream | Stream to output to. |
| tabStop | Indentation level for this object. |
| flags | If SelectedOnly is passed here, then only objects marked as selected (using setSelected) will output themselves. |
Reimplemented in GuiControl, NameTags, BehaviorComponent, SimComponent, and SimSet.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
virtual |
Determine whether or not a field should be written.
| fieldname | The name of the field being written. |
| value | The value of the field. |
Reimplemented in SceneObject, and SimComponent.
|
virtual |
Write the fields of this object in TorqueScript.
| stream | Stream for output. |
| tabStop | Indentation level for the fields. |
Reimplemented in NameTags, and GuiFrameSetCtrl.
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
inlinestaticprotected |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
static |
Get the value of a field on the object.
See here for a detailed discussion of what this function does.
| slotName | Field to access. |
| array | String containing index into array (if field is an array); if NULL, it is ignored. |
|
protected |
true if dynamic fields (added at runtime) should be saved, defaults to true
|
protected |
Stores the class name to link script class namespaces.
|
protected |
Id number for this object.
|
protected |
|
protected |
Stores object Internal Name.
|
protected |
|
staticprotected |
|
protected |
Whether the object is executing a script callback.
|
protected |
Stores super class name to link script class namespaces.
|
protected |