EclipseObject Class Reference

All objects generated from data provided by the eclipse toolset derive from this common interface. More...

#include <eclipse.h>

Inheritance diagram for EclipseObject:

Buffer Film Light LightmapCamera Material Matrix Mesh Scene SurfaceIntegrator Vector3D

List of all members.

Public Member Functions

virtual ~EclipseObject ()
 Destructor.
void AddRef ()
 Increases this object's reference count.
void ReleaseRef ()
 Decreases this object's reference count.
bool IsValid () const
 Retuns true if the object is in a valid state.
virtual PYOBJECT PyAsString () ECLIPSE_PURE
 Python text representation method This function must be implemented by all children.

Static Public Member Functions

static void PyDestructor (PYOBJECT a_pSelf)
 Python-specific destructor Used by the Python environment to destroy EclipseObject instances from within python scripts.
static bool PyTypeCheck (PYOBJECT a_pObject)
 Python type check Verifies that the provided python object encapsulates an EclipseObject.
static PYOBJECT _PyStringRep (PYOBJECT a_pSelf)
 Static interface used by actual python scripts to access this class on string form This function resolves to PyAsString on the inherited class.

Protected Member Functions

 EclipseObject (PyTypeObject *a_pPythonType)
 Only derived classes can instantiate objects.
int GetRefCount ()
 Provides children with access to our reference count number.
void SetIsValid (bool a_bIsValid)
 Sets the validity flag for an object's concrete implementation.
virtual void DeleteObject () ECLIPSE_PURE
 Child message hook for reference-count based destruction.


Detailed Description

All objects generated from data provided by the eclipse toolset derive from this common interface.

Defines a base interface for all objects coming from Eclipse.

Here you can conveniently add utilities and functionality that all of them should inherit.

This class also provides functionality to expose all of its descendants as Python objects, as well as reference-counted automatic destruction.

Children classes must, at least, implement the following: PyAsString DeleteObject

Optionally, children can implement a static PyTypeCheck call, and compare the provided PyObject against their own m_PythonType static member.

Concrete implementations MUST set the validity flag of the class to true when they are sucessfully created. Use SetIsValid for this

Author:
Dan Torres 2008/12/08

Definition at line 62 of file eclipse.h.


Member Function Documentation

virtual void EclipseObject::DeleteObject (  )  [protected, virtual]

Child message hook for reference-count based destruction.

The child class is responsible for deleting any instance to which this this function is called.

Reimplemented in Buffer, LightmapCamera, Film, Vector3D, Matrix, DirectLightingIntegrator, PhotonIntegrator, AmbientOcclusionIntegrator, PointLight, AreaLight, AmbientLight, SpotLight, ShinyDiffuseMaterial, Mesh, and Scene.

int EclipseObject::GetRefCount (  )  [inline, protected]

Provides children with access to our reference count number.

Returns:
Our current reference count

Definition at line 133 of file eclipse.h.

virtual PYOBJECT EclipseObject::PyAsString (  )  [virtual]

Python text representation method This function must be implemented by all children.

Returns:
A python string object with a description of ourselves

Reimplemented in Buffer, LightmapCamera, Film, Vector3D, Matrix, SurfaceIntegrator, Light, Material, Mesh, and Scene.

static bool EclipseObject::PyTypeCheck ( PYOBJECT  a_pObject  )  [static]

Python type check Verifies that the provided python object encapsulates an EclipseObject.

Returns:
True if the provided object type is the same as ours

Reimplemented in Buffer, LightmapCamera, Film, Vector3D, Matrix, SurfaceIntegrator, Light, Material, Mesh, and Scene.

void EclipseObject::SetIsValid ( bool  a_bIsValid  )  [inline, protected]

Sets the validity flag for an object's concrete implementation.

Parameters:
a_bIsValid True if the instance is a valid object

Definition at line 139 of file eclipse.h.


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

Generated on Tue Jan 20 17:57:57 2009 for EclipseRay by  doxygen 1.5.7.1