MRenderOperationList Class Reference

#include <MViewport2Renderer.h>

Class Description

Base class for holding a list of MRenderOperations.

The list is the owner of the operations.

Public Member Functions

 MRenderOperationList ()
 Constructor.
 
 ~MRenderOperationList ()
 Destructor.
 
int length () const
 Get the number of MRenderOperation in the list. More...
 
const MRenderOperationoperator[] (int index) const
 Gets the MRenderOperation at the requested index. More...
 
MRenderOperationoperator[] (int index)
 Gets the MRenderOperation at the requested index. More...
 
bool replace (const MString &name, MRenderOperation *operation)
 Replace the operation with the given name by a new operation. More...
 
bool append (MRenderOperation *operation)
 Add a MRenderOperation to the list. More...
 
bool insertBefore (const MString &name, MRenderOperation *operation)
 Insert a MRenderOperation in the list before the operation with a name matching the input. More...
 
bool insertAfter (const MString &name, MRenderOperation *operation)
 Insert a MRenderOperation in the list after the operation with a name matching the input. More...
 
bool remove (const MString &name)
 Remove a MRenderOperation from the list. More...
 
bool removeAt (int index)
 Remove a MRenderOperation from the list. More...
 
MRenderOperationtake (const MString &name)
 Remove a MRenderOperation from the list and return it. More...
 
MRenderOperationtakeAt (int index)
 Remove a MRenderOperation from the list and return it. More...
 
int indexOf (const MString &name)
 get the index of the operation with a name matching the input. More...
 
void clear ()
 Clears the list.
 

Static Public Member Functions

static const char * className ()
 Returns the name of this class. More...
 

Member Function Documentation

int length ( ) const

Get the number of MRenderOperation in the list.

Returns
The number of MRenderOperation in the list
const MRenderOperation * operator[] ( int  index) const

Gets the MRenderOperation at the requested index.

Parameters
[in]indexThe index of the MRenderOperation to retrieve
Returns
A pointer to the internally held MRenderOperation
MRenderOperation * operator[] ( int  index)

Gets the MRenderOperation at the requested index.

Parameters
[in]indexThe index of the MRenderOperation to retrieve
Returns
A pointer to the internally held MRenderOperation
bool replace ( const MString name,
MRenderOperation operation 
)

Replace the operation with the given name by a new operation.

The previous operation is deleted when replaced.

Parameters
[in]nameThe name of the operation to replace.
[in]operationThe MRenderOperation to replace it with.
Returns
True on success. False if an operation with that name was not found.
bool append ( MRenderOperation operation)

Add a MRenderOperation to the list.

Creates and stores a copy which is owned by the list.

Parameters
[in]operationThe MRenderOperation to add.
Returns
True on success
bool insertBefore ( const MString name,
MRenderOperation operation 
)

Insert a MRenderOperation in the list before the operation with a name matching the input.

Parameters
[in]nameThe name of the MRenderOperation to insert before
[in]operationThe operation to insert
Returns
True on success
bool insertAfter ( const MString name,
MRenderOperation operation 
)

Insert a MRenderOperation in the list after the operation with a name matching the input.

Parameters
[in]nameThe name of the MRenderOperation to insert after
[in]operationThe operation to insert
Returns
True on success
bool remove ( const MString name)

Remove a MRenderOperation from the list.

Parameters
[in]nameThe name of the MRenderOperation to remove
Returns
True on success
bool removeAt ( int  index)

Remove a MRenderOperation from the list.

Parameters
[in]indexThe index of the MRenderOperation to remove
Returns
True on success
MRenderOperation * take ( const MString name)

Remove a MRenderOperation from the list and return it.

The caller takes ownership of the returned operation.

Parameters
[in]nameThe name of the MRenderOperation to take
Returns
The MRenderOperation at that location. Caller must take ownership.
MRenderOperation * takeAt ( int  index)

Remove a MRenderOperation from the list and return it.

The caller takes ownership of the returned operation.

Parameters
[in]indexThe index of the MRenderOperation to take
Returns
The MRenderOperation at that location. Caller must take ownership.
int indexOf ( const MString name)

get the index of the operation with a name matching the input.

Parameters
[in]nameThe name of the MRenderOperation locate
Returns
The index of the operation or -1 if not found
const char * className ( )
static

Returns the name of this class.

Returns
The name of this class.

The documentation for this class was generated from the following files:
  • MViewport2Renderer.h
  • MViewport2Renderer.cpp