GL Studio C++ Runtime API
RSOInterface2 Class Referenceabstract

#include <rso_interface_2.h>

Inheritance diagram for RSOInterface2:
RSOInterface1 RSOInterface3 RSOInterface4 RSOInterface5 GlsRSOInterfaceImpl

Public Types

typedef unsigned int ResourceHandle
 Typedef for a unique resource identifier.
 

Public Member Functions

virtual ResourceHandle CreateResourceHandle (const char *resourceName)=0
 
virtual void ReleaseResourceHandle (ResourceHandle resourceHandle)=0
 
virtual bool IsResourceHandleValid (ResourceHandle resourceHandle)=0
 
virtual void SetResource (ResourceHandle resourceHandle, const char *resourceVal)=0
 
virtual const char * GetResource (ResourceHandle resourceHandle)=0
 
virtual void SetIntResource (const char *resourceName, long resourceVal)=0
 
virtual long GetIntResource (const char *resourceName)=0
 
virtual void SetIntResource (ResourceHandle handle, long resourceVal)=0
 
virtual long GetIntResource (ResourceHandle resourceHandle)=0
 
virtual void SetFloatResource (const char *resourceName, double resourceVal)=0
 
virtual double GetFloatResource (const char *resourceName)=0
 
virtual void SetFloatResource (ResourceHandle handle, double resourceVal)=0
 
virtual double GetFloatResource (ResourceHandle resourceHandle)=0
 
virtual const char * GetResource (const char *resourceName)=0
 
virtual void SetResource (const char *resourceName, const char *resourceVal)=0
 
- Public Member Functions inherited from RSOInterface1
virtual void Calculate (double time)=0
 The RSO Interface methods. More...
 
virtual void PreDraw (const OpenGLMatrices &current, Culler &culler)=0
 
virtual void Draw ()=0
 
virtual void SetResource (const char *resourceName, const char *resourceVal)=0
 
virtual const char * GetResource (const char *resourceName)=0
 
virtual const char * GetResources (ResourceFilter *filter=0)=0
 
virtual bool HandleInput (Event *ev)=0
 
virtual bool SetEmittedEventHandler (EmittedEventHandler *handler)=0
 
virtual bool Pick3D (const Vector &winLoc, const Vector &logicalCoords, float scale, const Vector &directionVector, Vector &collisionWinLoc, const OpenGLMatrices &drawnMatrices)=0
 
virtual bool GetBoundingSphere (Vector *center, float *radius)=0
 
virtual bool GetBoundingBox (Vector *min, Vector *max, const MatrixD *transform=0)=0
 
virtual RSOInterface1CloneObject ()=0
 
virtual void DeleteInstance ()=0
 Safely delete the object. More...
 

Protected Member Functions

virtual ~RSOInterface2 ()
 Protected destructor so it can't be deleted directly.
 
- Protected Member Functions inherited from RSOInterface1
virtual ~RSOInterface1 ()
 Protected destructor so it can't be deleted directly.
 

Additional Inherited Members

- Static Public Member Functions inherited from RSOInterface1
static unsigned int strlen (const char *str)
 
static char * strcpy (char *dest, const char *src)
 

Detailed Description

The RSOInterface2 class defines an abstract interface to an RSO instance.

Member Function Documentation

◆ CreateResourceHandle()

virtual ResourceHandle CreateResourceHandle ( const char *  resourceName)
pure virtual

Obtains a resource handle to a given named resource This handle must be disposed of with the ReleaseResourceHandle method once it is no longer needed. If this method fails, the return value will not be a valid handle; this can be determined by calling IsResourceHandleValid.

Parameters
resourceNameThe resource name to create a handle for.
Returns
A handle to the desired resource.

Implemented in GlsRSOInterfaceImpl.

◆ GetFloatResource() [1/2]

virtual double GetFloatResource ( const char *  resourceName)
pure virtual
Returns
The value as a float for a given named resource.
Parameters
resourceNameThe name to return the float value for.

Implemented in GlsRSOInterfaceImpl.

◆ GetFloatResource() [2/2]

virtual double GetFloatResource ( ResourceHandle  resourceHandle)
pure virtual
Returns
The value as a float for a resource specified by handle.
Parameters
resourceHandleThe handle to return the integer value for.

Implemented in GlsRSOInterfaceImpl.

◆ GetIntResource() [1/2]

virtual long GetIntResource ( const char *  resourceName)
pure virtual
Returns
The value as an integer for a given named resource.
Parameters
resourceNameThe name to return the integer value for.

Implemented in GlsRSOInterfaceImpl.

◆ GetIntResource() [2/2]

virtual long GetIntResource ( ResourceHandle  resourceHandle)
pure virtual
Returns
The value as an integer for a resource specified by handle.
Parameters
resourceHandleThe handle to return the integer value for.

Implemented in GlsRSOInterfaceImpl.

◆ GetResource() [1/2]

virtual const char * GetResource ( const char *  resourceName)
virtual

Get the string value for the given resource

Parameters
resourceNameThe name of the resource whose value is to be returned.
Returns
The string value for the given resource, or empty string if not found.

Implements RSOInterface1.

◆ GetResource() [2/2]

virtual const char * GetResource ( ResourceHandle  resourceHandle)
pure virtual
Returns
The string value for a resource specified by handle.
Parameters
resourceHandleThe handle to return the string value for.

Implemented in GlsRSOInterfaceImpl.

◆ IsResourceHandleValid()

virtual bool IsResourceHandleValid ( ResourceHandle  resourceHandle)
pure virtual

Checks if a given resource handle is valid.

Parameters
resourceHandleThe resource handle to check.
Returns
Whether or not the handle is valid.

Implemented in GlsRSOInterfaceImpl.

◆ ReleaseResourceHandle()

virtual void ReleaseResourceHandle ( ResourceHandle  resourceHandle)
pure virtual

Disposes of a resource handle.

Parameters
resourceHandleThe resource handle to release.

Implemented in GlsRSOInterfaceImpl.

◆ SetFloatResource() [1/2]

virtual void SetFloatResource ( const char *  resourceName,
double  resourceVal 
)
pure virtual

Set the value as a float for a given named resource.

Parameters
resourceNameThe name of the resource to set.
resourceValThe new float value to set.

Implemented in GlsRSOInterfaceImpl.

◆ SetFloatResource() [2/2]

virtual void SetFloatResource ( ResourceHandle  handle,
double  resourceVal 
)
pure virtual

Set the value as a float for a resource specified by handle.

Parameters
handleThe handle of the resource to set.
resourceValThe new float value to set.

Implemented in GlsRSOInterfaceImpl.

◆ SetIntResource() [1/2]

virtual void SetIntResource ( const char *  resourceName,
long  resourceVal 
)
pure virtual

Set the value as an integer for a given named resource.

Parameters
resourceNameThe name of the resource to set.
resourceValThe new integer value to set.

Implemented in GlsRSOInterfaceImpl.

◆ SetIntResource() [2/2]

virtual void SetIntResource ( ResourceHandle  handle,
long  resourceVal 
)
pure virtual

Set the value as an integer for a resource specified by handle.

Parameters
handleThe handle of the resource to set.
resourceValThe new integer value to set.

Implemented in GlsRSOInterfaceImpl.

◆ SetResource() [1/2]

virtual void SetResource ( const char *  resourceName,
const char *  resourceVal 
)
virtual

Set the string value for a given named resource.

Parameters
resourceNameThe name of the resource to set.
resourceValThe new string value to set for the resource.

Implements RSOInterface1.

◆ SetResource() [2/2]

virtual void SetResource ( ResourceHandle  resourceHandle,
const char *  resourceVal 
)
pure virtual

Set the string value for a resource specified by handle

Parameters
resourceHandleThe handle of the resource to set.
resourceValThe new string value to set.

Implemented in GlsRSOInterfaceImpl.


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