mi::shader::Map_declaration Class Reference

Map_declaration class. More...

#include <shader_map.h>

List of all members.

Public Member Functions

virtual void release () const =0
 deletes the object
virtual miUint size () const =0
 returns the number of fields (excluding position)
virtual bool is_empty () const =0
 returns true if the declaration is empty, excluding the position which is always there
virtual miUint get_dimension () const =0
 returns the dimension of the position
virtual bool is_equivalent (const Map_declaration *other, Map_status *status=0) const =0
 returns true if the declaration is equivalent to the given one, that is same field types and in the same order. Names can be different, though
virtual bool matches (const Map_declaration *other, Map_status *status=0) const =0
 returns true if the declaration matches exactly the given one, that is same field types, in the same order and with the same names
virtual bool has_field (const char *name, Map_status *status=0) const =0
 returns true if the declaration has a field with the given name
virtual Map_status add (const char *name, const Map_field_type type, const miUint dim=0)=0
 adds a field with given name, type and (possible) dimension (ignored in case of non-array types)
virtual Map_status add_scalar (const char *name)=0
 adds a scalar field with given name
virtual Map_status add_integer (const char *name)=0
 adds an integer field with given name
virtual Map_status add_vector (const char *name)=0
 adds a vector field with given name
virtual Map_status add_color (const char *name)=0
 adds a color field with given name
virtual Map_status add_transform (const char *name)=0
 adds a transform field with given name
virtual Map_status add_scalar_array (const char *name, const miUint dim)=0
 adds a scalar array field with given name
virtual Map_status add_integer_array (const char *name, const miUint dim)=0
 adds an integer array field with given name
virtual const char * get_field_name (const Map_field_id field_id, Map_status *status=0) const =0
 returns the name of the desired field
virtual Map_field_id get_field_id (const char *field_name, Map_status *status=0) const =0
 returns the id of the field with the given name
virtual Map_status get_field_type_dim (const Map_field_id field_id, Map_field_type &field_type, miUint &field_dimension) const =0
 returns the type and the dimension of the desired field
virtual Map_status get_field_type_dim (const char *field_name, Map_field_type &field_type, miUint &field_dimension) const =0
 returns the type and the dimension of the desired field


Detailed Description

Map_declaration class.

The Map_declaration class is an abstract class which provides ways to add/query map field names and ids


Member Function Documentation

virtual Map_status mi::shader::Map_declaration::add const char *  name,
const Map_field_type  type,
const miUint  dim = 0
[pure virtual]
 

adds a field with given name, type and (possible) dimension (ignored in case of non-array types)

Parameters:
name is the field name
type is the field type
dim is the (possible) dimension
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::add_color const char *  name  )  [pure virtual]
 

adds a color field with given name

Parameters:
name is the field name
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::add_integer const char *  name  )  [pure virtual]
 

adds an integer field with given name

Parameters:
name is the field name
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::add_integer_array const char *  name,
const miUint  dim
[pure virtual]
 

adds an integer array field with given name

Parameters:
name is the field name
dim is the dimension of the array
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::add_scalar const char *  name  )  [pure virtual]
 

adds a scalar field with given name

Parameters:
name is the field name
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::add_scalar_array const char *  name,
const miUint  dim
[pure virtual]
 

adds a scalar array field with given name

Parameters:
name is the field name
dim is the dimension of the array
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::add_transform const char *  name  )  [pure virtual]
 

adds a transform field with given name

Parameters:
name is the field name
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::add_vector const char *  name  )  [pure virtual]
 

adds a vector field with given name

Parameters:
name is the field name
Returns:
a status code

virtual Map_field_id mi::shader::Map_declaration::get_field_id const char *  field_name,
Map_status status = 0
const [pure virtual]
 

returns the id of the field with the given name

Parameters:
field_name is the name of the desired field
status is the optional returned status code
Returns:
the id of the field with the given name

virtual const char* mi::shader::Map_declaration::get_field_name const Map_field_id  field_id,
Map_status status = 0
const [pure virtual]
 

returns the name of the desired field

Parameters:
field_id is the id of the desired field
status is the optional returned status code
Returns:
the name of the desired field

virtual Map_status mi::shader::Map_declaration::get_field_type_dim const char *  field_name,
Map_field_type field_type,
miUint &  field_dimension
const [pure virtual]
 

returns the type and the dimension of the desired field

Parameters:
field_name is the name of the desired field
field_type is the returned type
field_dimension is the returned dimension
Returns:
a status code

virtual Map_status mi::shader::Map_declaration::get_field_type_dim const Map_field_id  field_id,
Map_field_type field_type,
miUint &  field_dimension
const [pure virtual]
 

returns the type and the dimension of the desired field

Parameters:
field_id is the id of the desired field
field_type is the returned type
field_dimension is the returned dimension
Returns:
a status code


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

Copyright © 1986-2008 by mental images GmbH