CrystalSpace

Public API Reference

csGraphics2D Class Reference
[Common Plugin Classes]

This is the base class for 2D canvases. More...

#include <csplugincommon/canvas/graph2d.h>

Inheritance diagram for csGraphics2D:

List of all members.

Public Member Functions

 csGraphics2D (iBase *)
 Create csGraphics2D object.
virtual bool Initialize (iObjectRegistry *)
 Initialize the plugin.
virtual ~csGraphics2D ()
 Destroy csGraphics2D object.

Public Attributes

csConfigAccess config
 The configuration file.

Protected Member Functions

iDebugHelper implementation



virtual csTicks Benchmark (int)
 Perform a benchmark.
virtual bool DebugCommand (const char *cmd)
 Perform a debug command as defined by the module itself.
virtual void Dump (iGraphics3D *)
 Do a graphical dump of the current state of this object.
virtual csPtr< iStringDump ()
 Do a text dump of the current state of this object.
virtual int GetSupportedTests () const
 Return a bit field indicating what types of functions this specific unit test implementation supports.
virtual csPtr< iStringStateTest ()
 Perform a state test.
virtual csPtr< iStringUnitTest ()

Detailed Description

This is the base class for 2D canvases.

Plugins should derive their own class from this one and implement required (marked with an asterisk (*)) functions. Functions not marked with an asterisk are optional, but possibly slow since they are too general.

Definition at line 221 of file graph2d.h.


Constructor & Destructor Documentation

csGraphics2D::csGraphics2D ( iBase  ) 

Create csGraphics2D object.

virtual csGraphics2D::~csGraphics2D (  )  [virtual]

Destroy csGraphics2D object.


Member Function Documentation

virtual csTicks csGraphics2D::Benchmark ( int  num_iterations  )  [inline, protected, virtual]

Perform a benchmark.

This function will return a number indicating how long the benchmark lasted in milliseconds.

Implements iDebugHelper.

Definition at line 254 of file graph2d.h.

virtual bool csGraphics2D::DebugCommand ( const char *  cmd  )  [protected, virtual]

Perform a debug command as defined by the module itself.

Returns 'false' if the command was not recognized.

Implements iDebugHelper.

virtual void csGraphics2D::Dump ( iGraphics3D g3d  )  [inline, protected, virtual]

Do a graphical dump of the current state of this object.

Implements iDebugHelper.

Definition at line 256 of file graph2d.h.

virtual csPtr<iString> csGraphics2D::Dump (  )  [inline, protected, virtual]

Do a text dump of the current state of this object.

Returns 0 if not supported or else a string which you should DecRef() after use.

Implements iDebugHelper.

Definition at line 255 of file graph2d.h.

virtual int csGraphics2D::GetSupportedTests (  )  const [inline, protected, virtual]

Return a bit field indicating what types of functions this specific unit test implementation supports.

This will return a combination of the CS_DBGHELP_... flags:

Implements iDebugHelper.

Definition at line 251 of file graph2d.h.

virtual bool csGraphics2D::Initialize ( iObjectRegistry  )  [virtual]

Initialize the plugin.

Reimplemented from CS::PluginCommon::CanvasCommonBase.

Reimplemented in csGraphics2DGLCommon.

virtual csPtr<iString> csGraphics2D::StateTest (  )  [inline, protected, virtual]

Perform a state test.

This function will test if the current state of the object is ok. It will return 0 if it is ok. Otherwise an iString is returned containing some information about the errors. DecRef() this returned string after using it.

Implements iDebugHelper.

Definition at line 253 of file graph2d.h.


Member Data Documentation

The configuration file.

Definition at line 237 of file graph2d.h.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1