Itasca C++ Interface
Loading...
Searching...
No Matches
itable.h
Go to the documentation of this file.
1#pragma once
2
3#include "base/src/baseqt.h"
10namespace itasca {
11
13
17 class ITable {
18 public:
20 inline static const TType type_ = 0x4c815b99;
22 virtual const IThing *getIThing() const =0;
24 virtual IThing * getIThing()=0;
25
27 virtual uint64 getID() const=0;
28
30 virtual IString getName() const=0;
31
33 virtual void setName(const IString &s)=0;
34
35 virtual IString getLabel() const=0;
36 virtual void setLabel(const IString &s)=0;
37
39 virtual int32 getSize() const=0;
40
42 virtual DVect2 get(const int32 pos) const=0;
43
47 virtual double getValue(const double x,const bool log10x=false,const bool log10y=false) const=0;
48
52 virtual double getSlope(const double x,const bool log10x=false,const bool log10y=false) const=0;
53
56 virtual void insert(const DVect2 &v)=0;
57
60 virtual void put(const int32 pos,const DVect2 &v)=0;
61
63 virtual void putx(const int32 pos,const double x)=0;
64
66 virtual void puty(const int32 pos,const double y)=0;
67
69 virtual void sort()=0;
70
72 virtual void clear()=0;
73
75 virtual void add(const DVect2 &v)=0;
76
79 virtual std::vector<DVect2> getAll() const=0;
80
82 virtual const ITable *getNext() const=0;
83
87 virtual uint32 getNotice() const=0;
88 };
89} // namespace itasca
90namespace module {
91 using itasca::ITable;
92}
93// EoF
All default base headers if Qt is being used.
Definition istring.h:14
Interface to a particular table of values.
Definition itable.h:17
virtual uint32 getNotice() const =0
virtual double getSlope(const double x, const bool log10x=false, const bool log10y=false) const =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 put(const int32 pos, const DVect2 &v)=0
virtual IThing * getIThing()=0
Returns a IThing interface for a table.
virtual const IThing * getIThing() const =0
Returns a const 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 const ITable * getNext() const =0
Used to iterate on Tables on the global table list. See ITableList::getFirst().
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 insert(const DVect2 &v)=0
static const TType type_
The type identification number for this class, for use in convert_cast() and convert_getcast().
Definition itable.h:20
virtual int32 getSize() const =0
Returns the number of pair entries in the table.
virtual double getValue(const double x, const bool log10x=false, const bool log10y=false) const =0
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 void sort()=0
Sorts table by x-value.
virtual void add(const DVect2 &v)=0
Adds (v.x,v.y) to the end of the table - no sorting.
virtual void clear()=0
Removes all table pairs - table is empty.
virtual std::vector< DVect2 > getAll() const =0
virtual void setName(const IString &s)=0
Sets the name of the table - only used for identification and not necessarily unique.
Base class for items that will be stored in containers.
Definition ithing.h:30
uint32 TType
class type indicator
Definition basedef.h:46
Base class for items that will be stored in containers.
namespace Itasca
Definition basememory.cpp:10