|
SAGA API
v9.6
|
Go to the documentation of this file.
53 #ifndef HEADER_INCLUDED__SAGA_API__table_H
54 #define HEADER_INCLUDED__SAGA_API__table_H
118 #define SG_TABLE_REC_FLAG_Modified 0x01
119 #define SG_TABLE_REC_FLAG_Selected 0x02
152 bool Set_Value (
int Field,
double Value);
182 bool Add_Value (
int Field,
double Value);
183 bool Add_Value (
const CSG_String &Field,
double Value);
187 bool Mul_Value (
int Field,
double Value);
188 bool Mul_Value (
const CSG_String &Field,
double Value);
192 bool Set_NoData (
int Field);
197 bool is_NoData (
int Field)
const;
198 bool is_NoData (
const CSG_String &Field)
const;
202 const SG_Char * asString (
int Field,
int Decimals = -99)
const;
207 SG_Char asChar (
int Field)
const;
212 short asShort (
int Field)
const;
213 short asShort (
const CSG_String &Field)
const;
217 int asInt (
int Field)
const;
222 sLong asLong (
int Field)
const;
227 float asFloat (
int iField)
const;
228 float asFloat (
const CSG_String &Field)
const;
232 double asDouble (
int Field)
const;
233 double asDouble (
const CSG_String &Field)
const;
261 void Set_Selected (
bool bOn =
true);
267 bool _Add_Field (
int add_Field);
268 bool _Del_Field (
int del_Field);
270 int _Get_Field (
const CSG_String &Field)
const;
333 virtual bool Save (
const wchar_t *File,
int Format = 0) {
return(
Save(
CSG_String(File), Format) ); }
354 virtual bool Mov_Field (
int iField,
int Position);
362 int Get_Field (
const wchar_t *Name)
const;
407 virtual bool Find_Record (
sLong &Index,
int iField,
double Value,
bool bCreateIndex =
false);
415 virtual bool Get_Value (
sLong Index,
int iField,
double &Value)
const;
426 virtual bool Select (
sLong Index ,
bool bInvert =
false);
434 bool Set_Index (
CSG_Index &Index,
int Fields[],
int nFields,
bool bAscending =
true)
const;
441 int Get_Index_Field (
int i)
const {
return( i < 0 || i >= m_Index_Fields.Get_Size() ? -1 : abs(m_Index_Fields[i]) - 1 ); }
495 bool _Destroy_Selection (
void);
497 bool _Inc_Array (
void);
498 bool _Dec_Array (
void);
503 bool _Load_Text (
const CSG_String &File,
bool bHeadline,
const SG_Char Separator);
506 void _Index_Update (
void);
549 #endif // #ifndef HEADER_INCLUDED__SAGA_API__table_H
bool Set_Value(const char *Field, size_t Value)
friend class CSG_Table_Record
virtual bool Find_Record(sLong &Index, int iField, const CSG_String &Value, bool bCreateIndex=false)
virtual bool Assign(CSG_Data_Object *pObject)
virtual bool Assign(CSG_Data_Object *pTable)
bool Set_Value(int Field, long Value)
virtual bool is_Valid(void) const
virtual bool Set_Count(sLong nRecords)
virtual bool Save(const wchar_t *File, int Format=0)
virtual bool Del_Records(void)
sLong Get_Index(sLong Index) const
sLong Get_Size(void) const
virtual bool On_Reload(void)=0
bool Set_Value(const char *Field, int Value)
virtual bool On_Delete(void)=0
bool Set_Value(const char *Field, const CSG_String &Value)
virtual bool _Stats_Update(int iField) const
bool Set_Value(const wchar_t *Field, double Value)
virtual TSG_Data_Object_Type Get_ObjectType(void) const
Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking.
virtual sLong Inv_Selection(void)
class CSG_Table * m_pTable
virtual bool Get_Value(sLong Index, int iField, CSG_String &Value) const
bool Set_Value(int Field, const wchar_t *Value)
virtual bool is_Selected(sLong Index) const
virtual bool Del_Field(int iField)
virtual CSG_Table_Record * Get_Record(sLong Index) const
bool Set_Value(const char *Field, DWORD Value)
#define SG_TABLE_REC_FLAG_Selected
CSG_String ** m_Field_Name
SG_Char asChar(const char *Field) const
bool Find_Field(const wchar_t *Name, int &Index) const
CSG_Table & operator=(const CSG_Table &Table)
bool Mul_Value(const char *Field, double Value)
virtual bool Save(const CSG_String &File, int Format=0)=0
virtual CSG_Table_Record * Get_Selection(sLong Index=0) const
sLong asLong(const wchar_t *Field) const
bool Set_Value(const wchar_t *Field, DWORD Value)
short asShort(const char *Field) const
bool is_Selected(void) const
TSG_Table_Index_Order Get_Index_Order(int i) const
int Get_Field_Count(void) const
bool Set_Value(const wchar_t *Field, const CSG_String &Value)
short asShort(const wchar_t *Field) const
int Get_Field_Length(int iField, int Encoding=SG_FILE_ENCODING_UNDEFINED) const
class CSG_Table_Value ** m_Values
virtual bool Set_Record(sLong Index, CSG_Table_Record *pCopy)
bool Find_Field(const char *Name, int &Index) const
@ TABLE_FILETYPE_Undefined
class CSG_Table * Get_Table(void)
bool is_NoData(const char *Field) const
virtual CSG_Table_Record & operator[](sLong Index) const
int Get_Index_Field(size_t i) const
virtual void Set_Modified(bool bModified=true)
bool _Stats_Invalidate(void) const
TSG_Data_Type * m_Field_Type
virtual bool Save(const wchar_t *File, int Format, SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
TSG_Table_Index_Order Get_Index_Order(size_t i) const
double Get_StdDev(int iField) const
virtual bool Add_Field(const wchar_t *Name, TSG_Data_Type Type, int Position=-1)
int Find_Field(const CSG_String &Name) const
bool Set_Value(const CSG_String &Field, DWORD Value)
bool Set_Value(const CSG_String &Field, int Value)
bool is_Compatible(const CSG_Table &Table, bool bExactMatch=false) const
bool Set_Value(const CSG_String &Field, size_t Value)
SG_Char asChar(const wchar_t *Field) const
CSG_Simple_Statistics ** m_Field_Stats
bool Add_Value(const wchar_t *Field, double Value)
int Find_Field(const char *Name) const
virtual bool Add_Field(const char *Name, TSG_Data_Type Type, int Position=-1)
virtual bool On_NoData_Changed(void)
const SG_Char * Get_Field_Name(int iField) const
bool Set_Value(int Field, size_t Value)
@ SG_FILE_ENCODING_UNDEFINED
bool Set_File_Encoding(int Encoding)
sLong Get_Selection_Count(void) const
bool Serialize(CSG_File &Stream, bool bSave)
bool _Set_Selection(sLong Index, sLong Selected)
bool Set_Value(const char *Field, sLong Value)
#define SG_TABLE_REC_FLAG_Modified
bool Set_Value(const char *Field, double Value)
int asInt(const char *Field) const
float asFloat(const char *Field) const
virtual bool On_Update(void)
bool is_Indexed(void) const
bool Set_Value(const wchar_t *Field, long Value)
void _On_Construction(void)
sLong Get_N(int iField) const
virtual bool Mov_Field(int iField, int Position)
sLong Get_Count(void) const
bool Assign_Values(const CSG_Table &Table)
bool Set_NoData(const wchar_t *Field)
@ TABLE_FILETYPE_Text_NoHeadLine
bool Set_Value(const wchar_t *Field, size_t Value)
bool Set_Value(int Field, int Value)
int Get_Index_Field(int i) const
double Get_Maximum(int iField) const
bool Set_Value(const char *Field, const CSG_Bytes &Value)
#define SAGA_API_DLL_EXPORT
sLong asLong(const char *Field) const
virtual void Set_Modified(bool bOn=true)
virtual bool Set_Value(sLong Index, int iField, const SG_Char *Value)
const CSG_Simple_Statistics & Get_Statistics(int iField) const
virtual bool Save(const char *File, int Format=0)
double asDouble(const wchar_t *Field) const
CSG_Table_Record * Get_Record_byIndex(sLong Index) const
bool is_NoData(const wchar_t *Field) const
virtual const CSG_Rect & Get_Extent(void)
bool _Del_Selection(sLong Index)
double Get_Variance(int iField) const
double asDouble(const char *Field) const
double Get_Sum(int iField) const
bool Set_Value(int Field, const char *Value)
bool Set_Field_Name(int iField, const SG_Char *Name)
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
SAGA_API_DLL_EXPORT CSG_Table * SG_Create_Table(void)
bool Set_Value(const wchar_t *Field, const CSG_Bytes &Value)
bool _Save_DBase(const CSG_String &File)
int asInt(const wchar_t *Field) const
bool _Add_Selection(sLong Index)
bool Mul_Value(const wchar_t *Field, double Value)
bool Add_Value(const char *Field, double Value)
bool Set_Value(const CSG_String &Field, long Value)
bool Set_Value(int Field, DWORD Value)
double Get_Mean(int iField) const
virtual bool Del_Record(sLong Index)
bool Load(const CSG_String &File, int Format, SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
@ SG_DATAOBJECT_TYPE_Table
double Get_Minimum(int iField) const
bool Set_NoData(const char *Field)
sLong Get_Selection_Index(sLong Index=0) const
virtual CSG_Table_Record * Ins_Record(sLong Index, CSG_Table_Record *pCopy=NULL)
bool Set_Value(const char *Field, long Value)
const SG_Char * asString(const char *Field, int Decimals=-99) const
sLong Get_Index(void) const
bool Set_Value(const char *Field, const char *Value)
double Get_Range(int iField) const
virtual CSG_Table_Record * _Get_New_Record(sLong Index)
CSG_Table_Value * Get_Value(int Field)
virtual bool Save(const char *File, int Format, SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
bool Set_Value(const wchar_t *Field, sLong Value)
bool Set_Value(const wchar_t *Field, int Value)
virtual bool Select(sLong Index, bool bInvert=false)
bool Set_Index(CSG_Index &Index, int Field, bool bAscending=true) const
TSG_Data_Type Get_Field_Type(int iField) const
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
bool Set_Value(const wchar_t *Field, const wchar_t *Value)
int Get_Field(const CSG_String &Name) const
virtual sLong Del_Selection(void)
virtual bool Set_Field_Type(int iField, TSG_Data_Type Type)
bool is_Modified(void) const
virtual bool Destroy(void)
bool _Save_Text(const CSG_String &File, bool bHeadline, const SG_Char Separator)
float asFloat(const wchar_t *Field) const
bool Toggle_Index(int iField)
const SG_Char * asString(const wchar_t *Field, int Decimals=-99) const
int Find_Field(const wchar_t *Name) const
void * Get_Entry(sLong Index) const
Returns a pointer to the memory address of the requested variable. You have to type cast and derefere...
int Get_File_Encoding(void) const