VR-Forces 5.0.1 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
DtScriptComponentSystem Class Reference

This class is a wrapper for a DtCompSystem for use by scripts. It derives from DtAsciiSerializable so that it can provide serialization functions for script saving/reloading.

Inheritance diagram for DtScriptComponentSystem:
Inheritance graph
[legend]

Public Member Functions

 DtScriptComponentSystem (const DtLocalObject *vrfObject)
 
 DtScriptComponentSystem (const DtScriptComponentSystem &orig)
 
DtScriptComponentSystemoperator= (const DtScriptComponentSystem &orig)
 
 ~DtScriptComponentSystem ()
 
bool operator== (const DtScriptComponentSystem &orig)
 
virtual const DtComponentSystemcomponentSystem () const
 
virtual void setComponentSystem (const DtComponentSystem *system)
 
virtual DtString serialize ()
 
virtual void init (const DtSimulationServices *, DtLocalObject *owner)
 
bool deserialize (const DtString &data)
 
virtual DtString objectType () const
 
virtual std::string getName () const
 
virtual std::string getFullName () const
 
virtual bool isEnabled () const
 
virtual bool isValid () const
 
virtual DtReaderWritergetAttribute (const std::string &attributeName, bool &error) const
 
virtual bool setAttribute (const std::string &attributeName, DtReaderWriter *value)
 
virtual std::list< std::string > getAllAttributeNames () const
 
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 
 DtAsciiSerializable (const DtAsciiSerializable &orig)
 
virtual ~DtAsciiSerializable ()
 
virtual std::string objectTypeC () const
 
virtual void init (void *userData)
 

Static Public Member Functions

static DtAsciiSerializablecreator ()
 

Protected Attributes

const DtSimulationServicesmySimServices
 
const DtLocalObjectmyObject
 
const DtComponentSystemmyComponentSystem
 

Private Member Functions

 DtScriptComponentSystem ()
 

Constructor & Destructor Documentation

DtScriptComponentSystem::DtScriptComponentSystem ( )
private

Hide the default constructor so we always get a vrfObject to use.

DtScriptComponentSystem::DtScriptComponentSystem ( const DtLocalObject vrfObject)
DtScriptComponentSystem::DtScriptComponentSystem ( const DtScriptComponentSystem orig)
DtScriptComponentSystem::~DtScriptComponentSystem ( )

Member Function Documentation

DtScriptComponentSystem& DtScriptComponentSystem::operator= ( const DtScriptComponentSystem orig)
bool DtScriptComponentSystem::operator== ( const DtScriptComponentSystem orig)
virtual std::string DtScriptComponentSystem::getName ( ) const
virtual

Script API functions. ////////////////////////////////////!

Gets the print name of the system.

virtual std::string DtScriptComponentSystem::getFullName ( ) const
virtual

Gets the fully qualified name of the system.

virtual bool DtScriptComponentSystem::isEnabled ( ) const
virtual

Returns if system is enabled.

virtual bool DtScriptComponentSystem::isValid ( ) const
virtual

Returns true if this is a valid system.

virtual DtReaderWriter* DtScriptComponentSystem::getAttribute ( const std::string &  attributeName,
bool error 
) const
virtual

This is not directly in the API in Lua; there is a wrapper function

that returns a Lua object, which can be any scalar type; the wrapper function converts the reader-write to the appropriate Luabind object.

virtual bool DtScriptComponentSystem::setAttribute ( const std::string &  attributeName,
DtReaderWriter value 
)
virtual

Sets the given attribute. A wrapper function converts the Luabind object to the appropriate Reader-Writer type.

virtual std::list<std::string> DtScriptComponentSystem::getAllAttributeNames ( ) const
virtual

Returns a list of the names of all of the attributes in this system that support get-attribute calls.

virtual const DtComponentSystem* DtScriptComponentSystem::componentSystem ( ) const
virtual

Gets the print name of this system. Script API functions above. ////////////////////////////////////!

Returns the component system for this class

virtual void DtScriptComponentSystem::setComponentSystem ( const DtComponentSystem system)
virtual

Sets the component system.

virtual DtString DtScriptComponentSystem::serialize ( )
virtual

Inherited from DtAsciiSerializable. Returns a string serialized version of this class.

Implements DtAsciiSerializable.

virtual void DtScriptComponentSystem::init ( const DtSimulationServices ,
DtLocalObject owner 
)
virtual

Called after object is constructed, but before deserialize() is called, during deserialization (scenario and script reload). The Lua scenario loader constructs this object, then calls init with the SimManager as the argument; init saves this in mySimManager.

bool DtScriptComponentSystem::deserialize ( const DtString data)
virtual

Inherited from DtAsciiSerializable. Returns true if it could fill its members with the data contained in the string. False otherwise.

Implements DtAsciiSerializable.

virtual DtString DtScriptComponentSystem::objectType ( ) const
virtual

Should return the string name of this object. The object name should not be part of the serialization unless you want it to be, but you should take it into account when implementing both functions.

Implements DtAsciiSerializable.

static DtAsciiSerializable* DtScriptComponentSystem::creator ( )
static

Inherited from DtAsciiSerializable. Returns a new object of this type with.

Member Data Documentation

const DtSimulationServices* DtScriptComponentSystem::mySimServices
protected

Returns the vrf object referenced by myObject

DtVrfObject* vrfObject() const;

const DtLocalObject* DtScriptComponentSystem::myObject
protected
const DtComponentSystem* DtScriptComponentSystem::myComponentSystem
protected

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

Document ID: Generated on Mon Jun 20 00:38:30 EDT 2022 from SVN revision 244029
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)