visAttribute Class Reference

[VisAPI Index] [VisAPI Hierarchy]


Attribute specification. More...

#include <VisApi/VisApi.h>

Inherits: visObject

Public Members


Detailed Description

Defines the basic functionality of attributes in VisApi: The mapping to a scalar or a vector and their arithmetic operations. The reason why they are not using operator overloading is the unhandy usage with pointers that need to be used with virtual functions.

An attribute does not store its vector dimension. The vector dimension must be obtained from the corresponding attribute factory. This saves unnecessary memory usage.


visAttribute()

Constructor.

virtual ~visAttribute()

Destructor calls deallocate method.

virtual double getValue(int i)

Return i-th vector component (0 < i < vector dimension).

virtual void setValue(int dim, visAttrVal val)

Set this attribute to given constant.

virtual void setValue(int i, double x)

Sets i-th vector component (0 < i < vector dimension).

virtual void setValue(int dim, visAttribute *attr)

Set attribute value to attr.

virtual doublegetScalarValue(int dim)

Return scalar value of object.

double *lendBuffer(int dim)

Return buffer to vector data for writing. Use takebackBuffer() to write contents back to attribute.

void takebackBuffer(int dim, double *buffer)

Write vector data to attribute. The buffer must be obtained by lendBuffer!

virtual bool isEqual(int dim, visAttribute *)

Returns true if this object has the same value as the given attribute.

virtual bool isLess(int dim, visAttribute *)

Returns true if this objects value is less than the given attribute.

virtual void add(int dim, visAttribute *)

Add given attribute value to this attribute. Dimension must be equal.

virtual void sub(int dim, visAttribute *)

Substract the given attribute from this attribute. Dimension must be equal.

virtual void mult(int dim, double)

Multiply attribute value by the given scalar.

virtual void div(int dim, double)

Divide attribute value by the given scalar.


  • Author: Peter Breitling
  • Documentation generated by breitlip@atzenger10 on Mon Jan 17 19:29:23 CET 2000
Kdoc