Itasca C++ Interface
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
itasca::ITable Class Referenceabstract

Interface to a particular table of values. More...

#include <itable.h>

Public Member Functions

virtual const IThinggetIThing () const =0
 Returns a const IThing interface for a table.
 
virtual IThinggetIThing ()=0
 Returns a IThing interface for a table.
 
virtual uint64 getID () const =0
 Returns the (unique) ID number associated with the table.
 
virtual IString getName () const =0
 Returns a name associated with the table.
 
virtual void setName (const IString &s)=0
 Sets the name of the table - only used for identification and not necessarily unique.
 
virtual IString getLabel () const =0
 
virtual void setLabel (const IString &s)=0
 
virtual int32 getSize () const =0
 Returns the number of pair entries in the table.
 
virtual DVect2 get (const int32 pos) const =0
 Returns the pos pair entry in the table. Returns (0,0) if pos does not exist.
 
virtual double getValue (const double x, const bool log10x=false, const bool log10y=false) const =0
 
virtual double getSlope (const double x, const bool log10x=false, const bool log10y=false) const =0
 
virtual void insert (const DVect2 &v)=0
 
virtual void put (const int32 pos, const DVect2 &v)=0
 
virtual void putx (const int32 pos, const double x)=0
 Replaces the x value of entry pos. Will expand table if pos does not exist.
 
virtual void puty (const int32 pos, const double y)=0
 Replaces the y value of entry pos. Will expand table if pos does not exist.
 
virtual void sort ()=0
 Sorts table by x-value.
 
virtual void clear ()=0
 Removes all table pairs - table is empty.
 
virtual void add (const DVect2 &v)=0
 Adds (v.x,v.y) to the end of the table - no sorting.
 
virtual std::vector< DVect2 > getAll () const =0
 
virtual const ITablegetNext () const =0
 Used to iterate on Tables on the global table list. See ITableList::getFirst().
 
virtual uint32 getNotice () const =0
 

Static Public Attributes

static const TType type_ = 0x4c815b99
 The type identification number for this class, for use in convert_cast() and convert_getcast().
 

Detailed Description

Interface to a particular table of values.

An ITable is a list of number pairs (x,y), which may or may not be ordered by increasing x.
Certain functions will only produce valid results if the table is sorted.

Member Function Documentation

◆ getAll()

virtual std::vector< DVect2 > itasca::ITable::getAll ( ) const
pure virtual

Assumes pv is the beginning of an array of pass_dvects of length len.
Fills the array with all of its entries (or len, if smaller).

◆ getNotice()

virtual uint32 itasca::ITable::getNotice ( ) const
pure virtual

Returns a NoticeManager ID that is unique to this table.
This id is returned to the NoticeManager when the table is destroyed.
The NoticeManager is tagged with this ID when the contents of the table are changed in any way.

◆ getSlope()

virtual double itasca::ITable::getSlope ( const double x,
const bool log10x = false,
const bool log10y = false ) const
pure virtual

Returns the slope at position x. Assumes table is sorted.
No higher order operations. Just the slope of the segment bordering x.
Returns 0.0 if x falls outside table extent.

◆ getValue()

virtual double itasca::ITable::getValue ( const double x,
const bool log10x = false,
const bool log10y = false ) const
pure virtual

Returns a Y value associated with X value. Assumes table is sorted.
Does linear interpolation between pairs.
If x is less than the first entry returns first entry y. Similar if x greater than the last entry.

◆ insert()

virtual void itasca::ITable::insert ( const DVect2 & v)
pure virtual

Inserts value (v.x,v.y) into table based on x value.
Replaces entry if v.x matches existing value. Assumes table is sorted.

◆ put()

virtual void itasca::ITable::put ( const int32 pos,
const DVect2 & v )
pure virtual

Places (v.x,v.y) pair at position pos.
Entries are created if pos is larger than current size.


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