mi::shader_v3::Map_declaration_base Class Reference

Map_declaration_base class. The Map_declaration_base class is an interface class which provides ways to add/query map field names and ids in a map declaration. 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 the 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, though names can be different.
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 the 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 the given name.
virtual Map_status add_integer (const char *name)=0
 adds an integer field with the given name.
virtual Map_status add_vector (const char *name)=0
 adds a vector field with the given name.
virtual Map_status add_color (const char *name)=0
 adds a color field with the given name.
virtual Map_status add_transform (const char *name)=0
 adds a transform field with the given name.
virtual Map_status add_scalar_array (const char *name, const miUint dim)=0
 adds a scalar array field with the given name.
virtual Map_status add_integer_array (const char *name, const miUint dim)=0
 adds an integer array field with the 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_base class. The Map_declaration_base class is an interface class which provides ways to add/query map field names and ids in a map declaration.


Member Function Documentation

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

adds a field with the 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 dimension (ignored for non-arrays)
Returns:
a status code

virtual Map_status mi::shader_v3::Map_declaration_base::add_color const char *  name  )  [pure virtual]
 

adds a color field with the given name.

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

virtual Map_status mi::shader_v3::Map_declaration_base::add_integer const char *  name  )  [pure virtual]
 

adds an integer field with the given name.

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

virtual Map_status mi::shader_v3::Map_declaration_base::add_integer_array const char *  name,
const miUint  dim
[pure virtual]
 

adds an integer array field with the given name.

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

virtual Map_status mi::shader_v3::Map_declaration_base::add_scalar const char *  name  )  [pure virtual]
 

adds a scalar field with the given name.

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

virtual Map_status mi::shader_v3::Map_declaration_base::add_scalar_array const char *  name,
const miUint  dim
[pure virtual]
 

adds a scalar array field with the given name.

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

virtual Map_status mi::shader_v3::Map_declaration_base::add_transform const char *  name  )  [pure virtual]
 

adds a transform field with the given name.

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

virtual Map_status mi::shader_v3::Map_declaration_base::add_vector const char *  name  )  [pure virtual]
 

adds a vector field with the given name.

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

virtual miUint mi::shader_v3::Map_declaration_base::get_dimension  )  const [pure virtual]
 

returns the dimension of the position.

Returns:
the dimension of the position

virtual Map_field_id mi::shader_v3::Map_declaration_base::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_v3::Map_declaration_base::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_v3::Map_declaration_base::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_v3::Map_declaration_base::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

virtual bool mi::shader_v3::Map_declaration_base::has_field const char *  name,
Map_status status = 0
const [pure virtual]
 

returns true if the declaration has a field with the given name.

Parameters:
name is the name of the field to look for
status is a pointer to a status code
Returns:
true if it has a field with such name, false otherwise

virtual bool mi::shader_v3::Map_declaration_base::is_empty  )  const [pure virtual]
 

returns true if the declaration is empty, excluding the position (which is always there).

Returns:
true if it's empty, false otherwise

virtual bool mi::shader_v3::Map_declaration_base::is_equivalent const Map_declaration other,
Map_status status = 0
const [pure virtual]
 

returns true if the declaration is equivalent to the given one, that is same field types and in the same order, though names can be different.

Parameters:
other is the declaration to compare to
status is a pointer to a status code
Returns:
true if they are equivalent, false otherwise

virtual bool mi::shader_v3::Map_declaration_base::matches const Map_declaration other,
Map_status status = 0
const [pure virtual]
 

returns true if the declaration matches exactly the given one, that is same field types, in the same order and with the same names.

Parameters:
other is the declaration to compare to
status is a pointer to a status code
Returns:
true if they match, false otherwise

virtual miUint mi::shader_v3::Map_declaration_base::size  )  const [pure virtual]
 

returns the number of fields (excluding the position).

Returns:
the number of fields in the declaration


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

Copyright © 1986-2008 by mental images GmbH