rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvFloatMatrixItem Class Reference

Matrix item class. More...

#include <ilviews/gadgets/matrix.h>

Inheritance diagram for IlvFloatMatrixItem:
IlvAbstractMatrixItem IlvFilledFloatMatrixItem

List of all members.

Public Member Functions

 IlvFloatMatrixItem (IlFloat value)
 Constructor.
virtual IlvAbstractMatrixItemcopy () const
 Copies this object.
IlFloat getFloat () const
 Returns the floating-point value stored in this matrix item.
virtual const char * getFormat () const
 Returns the format used to display the floating-point value stored in the matrix item.
virtual const char * getLabel () const
 Returns the label that identifies this matrix item.
void setFloat (IlFloat value)
 Sets the floating-point value stored in this matrix item.
virtual void setLabel (const char *, IlBoolean copy=IlTrue)
 Sets the label of the matrix item.
virtual void write (IlvOutputFile &) const
 Writes an object description to a file.

Static Public Member Functions

static IlvAbstractMatrixItemreadItem (IlvInputFile &, IlvDisplay *)
 Reads an object description from a file.

Detailed Description

Matrix item class.

Library: ilvadvgdt

Use this class to define a matrix item as a floating-point value.

See also:
IlvFilledFloatMatrixItem, IlvMatrix(IlFloat).

Constructor & Destructor Documentation

IlvFloatMatrixItem::IlvFloatMatrixItem ( IlFloat  value  ) 

Constructor.

Initializes a new instance of the class IlvFloatMatrixItem.

Parameters:
value The floating-point value encapsulated by the matrix item.

Member Function Documentation

virtual IlvAbstractMatrixItem* IlvFloatMatrixItem::copy (  )  const [virtual]

Copies this object.

Allocates and returns a copy of this object.

Returns:
A copy of the object.
See also:
IlvPredefinedMatrixItemIOMembers.

Reimplemented from IlvAbstractMatrixItem.

Reimplemented in IlvFilledFloatMatrixItem.

IlFloat IlvFloatMatrixItem::getFloat (  )  const

Returns the floating-point value stored in this matrix item.

Returns:
The floating-point value stored in this matrix item.
See also:
setFloat
virtual const char* IlvFloatMatrixItem::getFormat (  )  const [virtual]

Returns the format used to display the floating-point value stored in the matrix item.

The default implementation returns %.1f. You can override this member function in a subclass to modify the format.

Returns:
The format used to display the floating-point value stored in the matrix item.
virtual const char* IlvFloatMatrixItem::getLabel (  )  const [virtual]

Returns the label that identifies this matrix item.

Returns:
The label that identifies this matrix item. The returned string must not be deleted or modified.
See also:
setLabel

Reimplemented from IlvAbstractMatrixItem.

Reimplemented in IlvFilledFloatMatrixItem.

static IlvAbstractMatrixItem* IlvFloatMatrixItem::readItem ( IlvInputFile file,
IlvDisplay display 
) [static]

Reads an object description from a file.

Reads an object description from the file input. It reads the information that was saved by the member function write to be able to create a new instance of this object. Usually, because of the availability of the constructor that expects an IlvInputFile, readItem should be equivalent to :

 IlvAbstractMatrixItem*
 MyClass::readItem(IlvInputFile& file, IlvDisplay* display)
 {
     return new MyClass(file, display);
 }
Parameters:
file The file to be read from.
display The display used to create the object.
See also:
DeclareMatrixItemInfoRO, DeclareMatrixItemInfo, IlvPredefinedMatrixItemIOMembers.
Warning:
[note] The readItem method is not capitalized like other static methods so that it is consistent with the write method.

Reimplemented from IlvAbstractMatrixItem.

Reimplemented in IlvFilledFloatMatrixItem.

void IlvFloatMatrixItem::setFloat ( IlFloat  value  ) 

Sets the floating-point value stored in this matrix item.

Parameters:
value The new floating-point value.
See also:
getFloat
virtual void IlvFloatMatrixItem::setLabel ( const char *  label,
IlBoolean  copy = IlTrue 
) [virtual]

Sets the label of the matrix item.

Parameters:
label The label of the matrix item.
copy A Boolean value specifying whether a label should be copied. If the value is IlFalse, then you must allocate some memory for the label because in any case the label characters are deleted from the memory by the IlvAbstractMatrixItem.
See also:
getLabel

Reimplemented from IlvAbstractMatrixItem.

Reimplemented in IlvFilledFloatMatrixItem.

virtual void IlvFloatMatrixItem::write ( IlvOutputFile file  )  const [virtual]

Writes an object description to a file.

Writes out, in a file, the object description. This description contains all the information necessary to create an exact copy of this object by means of the member function readItem.

Parameters:
file The name of the file to be written to.
See also:
DeclareMatrixItemInfoRO, DeclareMatrixItemInfo, IlvPredefinedMatrixItemIOMembers.

Reimplemented from IlvAbstractMatrixItem.

Reimplemented in IlvFilledFloatMatrixItem.

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

© Copyright 2012, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.