VR-Forces 4.3.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator 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. More...

Inheritance diagram for DtScriptComponentSystem:
Inheritance graph
[legend]

Public Member Functions

 DtScriptComponentSystem (const DtVrfObject *vrfObject)
 DtScriptComponentSystem (const DtScriptComponentSystem &orig)
DtScriptComponentSystemoperator= (const DtScriptComponentSystem &orig)
 ~DtScriptComponentSystem ()
bool operator== (const DtScriptComponentSystem &orig)
virtual DtComponentSystemcomponentSystem () const
 Gets the print name of this system.
virtual void setComponentSystem (DtComponentSystem *system)
 Sets the component system.
virtual DtString serialize ()
 Inherited from DtAsciiSerializable. Returns a string serialized version of this class.
virtual void init (void *userData)
 Called after object is constructed, but before deserialize() is called, during deserialization (scenario and script reload).
bool deserialize (const DtString &data)
 Inherited from DtAsciiSerializable.
virtual DtString objectType () const
 Should return the string name of this object.
virtual std::string getName () const
 Script API functions.
virtual DtReaderWritergetAttribute (const std::string &attributeName, bool &error) const
 This is not directly in the API in Lua; there is a wrapper function.
virtual bool setAttribute (const std::string &attributeName, DtReaderWriter *value)
 Sets the given attribute.
virtual std::list< std::string > getAllAttributeNames () const
 Returns a list of the names of all of the attributes in this system that support get-attribute calls.
- Public Member Functions inherited from DtAsciiSerializable
 DtAsciiSerializable ()
 The implementer of this interface should be sure to create a creator function to create an empty object that returns a pointer to this interface.
 DtAsciiSerializable (const DtAsciiSerializable &orig)
virtual ~DtAsciiSerializable ()
virtual std::string objectTypeC () const
 Returns a std::string version of the objectType.

Static Public Member Functions

static DtAsciiSerializablecreator ()
 Inherited from DtAsciiSerializable. Returns a new object of this type with.
- Static Public Member Functions inherited from DtObjectDebugger< DtScriptComponentSystem >
static DtObjectCounter::CounterType ObjectCount ()
static const DtObjectContainer * ObjectContainer ()

Protected Attributes

DtSimManagermySimManager
 Returns the vrf object referenced by myObject.
const DtVrfObjectmyObject
DtComponentSystemmyComponentSystem

Private Member Functions

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

Additional Inherited Members

- Protected Member Functions inherited from DtObjectDebugger< DtAsciiSerializable >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()
- Protected Member Functions inherited from DtObjectDebugger< DtScriptComponentSystem >
 DtObjectDebugger ()
 DtObjectDebugger (const DtObjectDebugger &)
 ~DtObjectDebugger ()

Detailed Description

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.

Constructor & Destructor Documentation

DtScriptComponentSystem::DtScriptComponentSystem ( )
private

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

DtScriptComponentSystem::DtScriptComponentSystem ( const DtVrfObject 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 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 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 ( 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 ( void *  userData)
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.

Reimplemented from DtAsciiSerializable.

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

DtSimManager* DtScriptComponentSystem::mySimManager
protected

Returns the vrf object referenced by myObject.

DtVrfObject* vrfObject() const;

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

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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)