SAGA API v9.10
Loading...
Searching...
No Matches
CSG_Table Class Reference

#include <table.h>

Inheritance diagram for CSG_Table:
CSG_Data_Object CSG_Shapes CSG_TIN CSG_PointCloud

Classes

class  CSG_Field_Info

Public Member Functions

 CSG_Table (void)
bool Create (void)
 CSG_Table (const CSG_Table &Table)
bool Create (const CSG_Table &Table)
 CSG_Table (const CSG_Table *pTemplate)
bool Create (const CSG_Table *pTemplate)
 CSG_Table (const CSG_String &File, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined, int Encoding=SG_FILE_ENCODING_UNDEFINED)
bool Create (const CSG_String &File, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined, int Encoding=SG_FILE_ENCODING_UNDEFINED)
 CSG_Table (const char *File, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined, int Encoding=SG_FILE_ENCODING_UNDEFINED)
bool Create (const char *File, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined, int Encoding=SG_FILE_ENCODING_UNDEFINED)
 CSG_Table (const wchar_t *File, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined, int Encoding=SG_FILE_ENCODING_UNDEFINED)
bool Create (const wchar_t *File, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined, int Encoding=SG_FILE_ENCODING_UNDEFINED)
 CSG_Table (const CSG_String &File, TSG_Table_File_Type Format, const SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
bool Create (const CSG_String &File, TSG_Table_File_Type Format, const SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
 CSG_Table (const char *File, TSG_Table_File_Type Format, const SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
bool Create (const char *File, TSG_Table_File_Type Format, const SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
 CSG_Table (const wchar_t *File, TSG_Table_File_Type Format, const SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
bool Create (const wchar_t *File, TSG_Table_File_Type Format, const SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
virtual ~CSG_Table (void)
virtual bool Destroy (void)
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.
CSG_Tableoperator= (const CSG_Table &Table)
virtual bool Assign (CSG_Data_Object *pTable, bool bProgress=false)
bool Assign_Values (const CSG_Table &Table)
bool Assign_Values (CSG_Table *pTable)
bool Assign_Values (const SG_Char *File)
bool Load (const CSG_String &File, int Format, SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
virtual bool Save (const CSG_String &File, int Format, SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
virtual bool Save (const char *File, int Format, SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
virtual bool Save (const wchar_t *File, int Format, SG_Char Separator, int Encoding=SG_FILE_ENCODING_UNDEFINED)
virtual bool Save (const CSG_String &File, int Format=0)
virtual bool Save (const char *File, int Format=0)
virtual bool Save (const wchar_t *File, int Format=0)
bool Set_File_Encoding (int Encoding)
int Get_File_Encoding (void) const
bool from_Text (const CSG_String &Text)
CSG_String to_Text (bool Selection=false) const
bool Serialize (CSG_File &Stream, bool bSave)
virtual bool is_Valid (void) const
bool is_Compatible (const CSG_Table &Table, bool bExactMatch=false) const
bool is_Compatible (CSG_Table *pTable, bool bExactMatch=false) const
virtual const CSG_RectGet_Extent (void)
virtual bool Add_Field (const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
virtual bool Add_Field (const char *Name, TSG_Data_Type Type, int Position=-1)
virtual bool Add_Field (const wchar_t *Name, TSG_Data_Type Type, int Position=-1)
virtual bool Del_Field (int Field)
virtual bool Mov_Field (int Field, int Position)
int Get_Field_Count (void) const
const SG_CharGet_Field_Name (int Field) const
TSG_Data_Type Get_Field_Type (int Field) const
bool is_Field_Numeric (int Field) const
virtual int Get_Field_Length (int Field, int Encoding=SG_FILE_ENCODING_UNDEFINED) const
int Get_Field (const CSG_String &Name) const
int Get_Field (const char *Name) const
int Get_Field (const wchar_t *Name) const
bool Set_Field_Name (int Field, const SG_Char *Name)
virtual bool Set_Field_Type (int Field, TSG_Data_Type Type)
int Find_Field (const CSG_String &Name) const
int Find_Field (const char *Name) const
int Find_Field (const wchar_t *Name) const
bool Find_Field (const CSG_String &Name, int &Index) const
bool Find_Field (const char *Name, int &Index) const
bool Find_Field (const wchar_t *Name, int &Index) const
sLong Get_N (int Field) const
double Get_Minimum (int Field) const
double Get_Maximum (int Field) const
double Get_Range (int Field) const
double Get_Sum (int Field) const
double Get_Mean (int Field) const
double Get_StdDev (int Field) const
double Get_Variance (int Field) const
const CSG_Simple_StatisticsGet_Statistics (int Field) const
const CSG_HistogramGet_Histogram (int Field, size_t nClasses=0) const
virtual CSG_Table_RecordAdd_Record (CSG_Table_Record *pCopy=NULL)
virtual CSG_Table_RecordIns_Record (sLong Index, CSG_Table_Record *pCopy=NULL)
virtual bool Set_Record (sLong Index, CSG_Table_Record *pCopy)
virtual bool Del_Record (sLong Index)
virtual bool Del_Records (void)
virtual bool Set_Count (sLong nRecords)
sLong Get_Count (void) const
virtual CSG_Table_RecordGet_Record (sLong Index) const
virtual CSG_Table_Recordoperator[] (sLong Index) const
sLong Get_Index (sLong Index) const
CSG_Table_RecordGet_Record_byIndex (sLong Index) const
virtual bool Find_Record (sLong &Index, int Field, const CSG_String &Value, bool bCreateIndex=false)
virtual CSG_Table_RecordFind_Record (int Field, const CSG_String &Value, bool bCreateIndex=false)
virtual bool Find_Record (sLong &Index, int Field, double Value, bool bCreateIndex=false)
virtual CSG_Table_RecordFind_Record (int Field, double Value, bool bCreateIndex=false)
virtual bool Set_Value (sLong Index, int Field, const SG_Char *Value)
virtual bool Set_Value (sLong Index, int Field, double Value)
virtual bool Get_Value (sLong Index, int Field, CSG_String &Value) const
virtual bool Get_Value (sLong Index, int Field, double &Value) const
virtual void Set_Modified (bool bModified=true)
sLong Get_Selection_Count (void) const
sLong Get_Selection_Index (sLong Index=0) const
virtual CSG_Table_RecordGet_Selection (sLong Index=0) const
virtual bool is_Selected (sLong Index) const
virtual bool Select (sLong Index, bool bInvert=false)
virtual bool Select (CSG_Table_Record *pRecord=NULL, bool bInvert=false)
virtual sLong Del_Selection (void)
virtual sLong Inv_Selection (void)
bool Sort (const char *Field, bool bAscending=true)
bool Sort (const wchar_t *Field, bool bAscending=true)
bool Sort (const CSG_String &Field, bool bAscending=true)
bool Sort (int Field, bool bAscending=true)
virtual bool Sort (const CSG_Index &Index)
bool Set_Index (CSG_Index &Index, int Field, bool bAscending=true) const
bool Set_Index (CSG_Index &Index, int Fields[], int nFields, bool bAscending=true) const
bool Set_Index (CSG_Index &Index, const CSG_Array_Int &Fields, bool bAscending=true) const
bool Set_Index (int Field, TSG_Table_Index_Order Order=TABLE_INDEX_Ascending, int Field_2=-1, TSG_Table_Index_Order Order_2=TABLE_INDEX_None, int Field_3=-1, TSG_Table_Index_Order Order_3=TABLE_INDEX_None)
bool Del_Index (void)
bool Toggle_Index (int Field)
bool is_Indexed (void) const
int Get_Index_Field (int i) const
TSG_Table_Index_Order Get_Index_Order (int i) const
int Get_Index_Field (size_t i) const
TSG_Table_Index_Order Get_Index_Order (size_t i) const
Public Member Functions inherited from CSG_Data_Object
 CSG_Data_Object (void)
virtual ~CSG_Data_Object (void)
int Get_RefID (void) const
 Returns the object's reference id (unique).
int Get_Managed (void) const
bool Reload (void)
 If there is an associated file data can be reloaded with this command.
bool Delete (void)
 Deletes all files associated with this data object if possible. Works only with native SAGA files. Returns true on success.
void Set_File_Name (const CSG_String &FileName)
const SG_CharGet_File_Name (bool bNative=true) const
int Get_File_Type (void) const
bool is_File_Native (void) const
void Set_Name (const CSG_String &Name)
void Set_Name (const char *Name)
void Set_Name (const wchar_t *Name)
void Fmt_Name (const char *Format,...)
void Fmt_Name (const wchar_t *Format,...)
const SG_CharGet_Name (void) const
void Set_Description (const CSG_String &Description)
const SG_CharGet_Description (void) const
virtual bool is_Modified (void) const
bool Update (bool bForce=false)
CSG_Data_ObjectGet_Owner (void) const
void Set_Owner (CSG_Data_Object *pOwner)
CSG_MetaDataGet_MetaData (void) const
CSG_MetaDataGet_MetaData_DB (void) const
CSG_MetaDataGet_History (void)
const CSG_MetaDataGet_History (void) const
CSG_ProjectionGet_Projection (void)
const CSG_ProjectionGet_Projection (void) const
class CSG_TableasTable (bool bPolymorph=false) const
class CSG_ShapesasShapes (bool bPolymorph=false) const
class CSG_TINasTIN (bool bPolymorph=false) const
class CSG_PointCloudasPointCloud (bool bPolymorph=false) const
class CSG_GridasGrid (bool bPolymorph=false) const
class CSG_GridsasGrids (bool bPolymorph=false) const
virtual bool Set_NoData_Value (double Value)
virtual bool Set_NoData_Value_Range (double Lower, double Upper)
double Get_NoData_Value (bool bUpper=false) const
bool is_NoData_Value (double Value) const
bool Save_History_to_Model (const CSG_String &File) const
virtual bool Set_Max_Samples (sLong Max_Samples)
sLong Get_Max_Samples (void) const

Protected Member Functions

virtual void _On_Construction (void)
virtual CSG_Table_Record_Get_New_Record (sLong Index)
bool _Add_Selection (sLong Index)
bool _Set_Selection (sLong Index, sLong Selected)
bool _Del_Selection (sLong Index)
bool _Stats_Invalidate (void) const
bool _Stats_Invalidate (int Field) const
virtual bool _Stats_Update (int Field) const
virtual bool _Histogram_Update (int Field, size_t nClasses) const
bool _Save_Text (const CSG_String &File, bool bHeadline, const SG_Char Separator)
bool _Save_DBase (const CSG_String &File)
virtual bool On_NoData_Changed (void)
virtual bool On_Update (void)
virtual bool On_Reload (void)
virtual bool On_Delete (void)
Protected Member Functions inherited from CSG_Data_Object
void Set_File_Name (const CSG_String &FileName, bool bNative)
void Set_File_Type (int Type)
bool Load_MetaData (const CSG_String &FileName)
bool Load_MetaData (CSG_File &Stream)
bool Save_MetaData (const CSG_String &FileName)
bool Save_MetaData (CSG_File &Stream)
void Set_Update_Flag (bool bOn=true)
bool Get_Update_Flag (void)

Protected Attributes

CSG_Field_Info ** m_Field_Info = NULL
int m_nFields = 0
int m_Encoding = SG_FILE_ENCODING_UTF8
sLong m_nRecords = 0
sLong m_nBuffer = 0
CSG_Array m_Selection
CSG_Rect m_Extent
Protected Attributes inherited from CSG_Data_Object
CSG_Data_Objectm_pOwner

Friends

class CSG_Table_Record
class CSG_TIN

Additional Inherited Members

Static Public Member Functions inherited from CSG_Data_Object
static void Track (bool Track=true, bool Offset=false)
 Activate/deactivate lifetime tracking (data object construction/destruction). Needs compiler flag WITH_LIFETIME_TRACKER being defined.

Detailed Description

Definition at line 284 of file table.h.

Constructor & Destructor Documentation

◆ CSG_Table() [1/9]

◆ CSG_Table() [2/9]

CSG_Table::CSG_Table ( const CSG_Table & Table)

◆ CSG_Table() [3/9]

CSG_Table::CSG_Table ( const CSG_Table * pTemplate)

◆ CSG_Table() [4/9]

CSG_Table::CSG_Table ( const CSG_String & File,
TSG_Table_File_Type Format = TABLE_FILETYPE_Undefined,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 173 of file table.cpp.

References _On_Construction(), Create(), and CSG_Data_Object::CSG_Data_Object().

◆ CSG_Table() [5/9]

CSG_Table::CSG_Table ( const char * File,
TSG_Table_File_Type Format = TABLE_FILETYPE_Undefined,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 171 of file table.cpp.

References CSG_Table().

◆ CSG_Table() [6/9]

CSG_Table::CSG_Table ( const wchar_t * File,
TSG_Table_File_Type Format = TABLE_FILETYPE_Undefined,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 172 of file table.cpp.

References CSG_Table().

◆ CSG_Table() [7/9]

CSG_Table::CSG_Table ( const CSG_String & File,
TSG_Table_File_Type Format,
const SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 246 of file table.cpp.

References _On_Construction(), Create(), CSG_Data_Object::CSG_Data_Object(), and SG_Char.

◆ CSG_Table() [8/9]

CSG_Table::CSG_Table ( const char * File,
TSG_Table_File_Type Format,
const SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 244 of file table.cpp.

References CSG_Table(), and SG_Char.

◆ CSG_Table() [9/9]

CSG_Table::CSG_Table ( const wchar_t * File,
TSG_Table_File_Type Format,
const SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 245 of file table.cpp.

References CSG_Table(), and SG_Char.

◆ ~CSG_Table()

CSG_Table::~CSG_Table ( void )
virtual

Definition at line 308 of file table.cpp.

References Destroy().

Member Function Documentation

◆ _Add_Selection()

bool CSG_Table::_Add_Selection ( sLong Index)
protected

Definition at line 63 of file table_selection.cpp.

References _Set_Selection(), and m_Selection.

Referenced by CSG_PointCloud::Select(), and Select().

◆ _Del_Selection()

bool CSG_Table::_Del_Selection ( sLong Index)
protected

Definition at line 87 of file table_selection.cpp.

References Get_Selection_Index(), and m_Selection.

Referenced by Del_Record(), CSG_PointCloud::Select(), and Select().

◆ _Get_New_Record()

CSG_Table_Record * CSG_Table::_Get_New_Record ( sLong Index)
protectedvirtual

Reimplemented in CSG_Shapes, and CSG_TIN.

Definition at line 817 of file table.cpp.

References CSG_Table_Record.

Referenced by Ins_Record().

◆ _Histogram_Update()

bool CSG_Table::_Histogram_Update ( int Field,
size_t nClasses ) const
protectedvirtual

◆ _On_Construction()

void CSG_Table::_On_Construction ( void )
protectedvirtual

◆ _Save_DBase()

bool CSG_Table::_Save_DBase ( const CSG_String & File)
protected

Definition at line 565 of file table_io.cpp.

References m_Encoding, and CSG_Table_DBase::Open_Write().

Referenced by CSG_Shapes::Save(), and Save().

◆ _Save_Text()

◆ _Set_Selection()

bool CSG_Table::_Set_Selection ( sLong Index,
sLong Selected )
protected

Definition at line 74 of file table_selection.cpp.

References m_Selection.

Referenced by _Add_Selection(), and CSG_PointCloud::Inv_Selection().

◆ _Stats_Invalidate() [1/2]

bool CSG_Table::_Stats_Invalidate ( int Field) const
protected

Definition at line 1239 of file table.cpp.

References m_Field_Info, and m_nFields.

◆ _Stats_Invalidate() [2/2]

◆ _Stats_Update()

◆ Add_Field() [1/3]

virtual bool CSG_Table::Add_Field ( const char * Name,
TSG_Data_Type Type,
int Position = -1 )
inlinevirtual

Definition at line 356 of file table.h.

References Add_Field().

Referenced by Add_Field().

◆ Add_Field() [2/3]

◆ Add_Field() [3/3]

virtual bool CSG_Table::Add_Field ( const wchar_t * Name,
TSG_Data_Type Type,
int Position = -1 )
inlinevirtual

Definition at line 357 of file table.h.

References Add_Field().

Referenced by Add_Field().

◆ Add_Record()

◆ Assign()

◆ Assign_Values() [1/3]

◆ Assign_Values() [2/3]

bool CSG_Table::Assign_Values ( const SG_Char * File)

Definition at line 400 of file table.cpp.

References Assign_Values(), Create(), CSG_Table(), and SG_Char.

◆ Assign_Values() [3/3]

bool CSG_Table::Assign_Values ( CSG_Table * pTable)

Definition at line 394 of file table.cpp.

References Assign_Values(), and CSG_Table().

◆ Create() [1/9]

bool CSG_Table::Create ( const char * File,
TSG_Table_File_Type Format,
const SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 252 of file table.cpp.

References Create(), and SG_Char.

◆ Create() [2/9]

bool CSG_Table::Create ( const char * File,
TSG_Table_File_Type Format = TABLE_FILETYPE_Undefined,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 179 of file table.cpp.

References Create().

◆ Create() [3/9]

bool CSG_Table::Create ( const CSG_String & File,
TSG_Table_File_Type Format,
const SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 254 of file table.cpp.

References Load(), and SG_Char.

◆ Create() [4/9]

◆ Create() [5/9]

bool CSG_Table::Create ( const CSG_Table & Table)

Definition at line 165 of file table.cpp.

References Assign(), CSG_Data_Object::CSG_Data_Object(), and CSG_Table().

◆ Create() [6/9]

◆ Create() [7/9]

bool CSG_Table::Create ( const wchar_t * File,
TSG_Table_File_Type Format,
const SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 253 of file table.cpp.

References Create(), and SG_Char.

◆ Create() [8/9]

bool CSG_Table::Create ( const wchar_t * File,
TSG_Table_File_Type Format = TABLE_FILETYPE_Undefined,
int Encoding = SG_FILE_ENCODING_UNDEFINED )

Definition at line 180 of file table.cpp.

References Create().

◆ Create() [9/9]

◆ Del_Field()

bool CSG_Table::Del_Field ( int Field)
virtual

Reimplemented in CSG_PointCloud.

Definition at line 510 of file table.cpp.

References m_Field_Info, m_nFields, m_nRecords, Set_Modified(), and SG_Realloc().

Referenced by Mov_Field().

◆ Del_Index()

bool CSG_Table::Del_Index ( void )

Definition at line 1419 of file table.cpp.

Referenced by Del_Records(), Set_Index(), CSG_PointCloud::Sort(), Sort(), and Toggle_Index().

◆ Del_Record()

◆ Del_Records()

bool CSG_Table::Del_Records ( void )
virtual

Reimplemented in CSG_PointCloud.

Definition at line 936 of file table.cpp.

References Del_Index(), m_nBuffer, m_nRecords, and SG_FREE_SAFE.

Referenced by CSG_TIN::_Destroy_Nodes(), CSG_Shapes::Del_Shapes(), and Destroy().

◆ Del_Selection()

sLong CSG_Table::Del_Selection ( void )
virtual

Reimplemented in CSG_PointCloud.

Definition at line 178 of file table_selection.cpp.

References Del_Record(), Get_Selection_Count(), is_Selected(), m_nRecords, and m_Selection.

◆ Destroy()

bool CSG_Table::Destroy ( void )
virtual

◆ Find_Field() [1/6]

int CSG_Table::Find_Field ( const char * Name) const
inline

Definition at line 374 of file table.h.

References Find_Field().

Referenced by Find_Field().

◆ Find_Field() [2/6]

bool CSG_Table::Find_Field ( const char * Name,
int & Index ) const
inline

Definition at line 377 of file table.h.

References Find_Field().

Referenced by Find_Field().

◆ Find_Field() [3/6]

int CSG_Table::Find_Field ( const CSG_String & Name) const

Returns the index of the field with the requested name or -1 if it does not exists.

Definition at line 741 of file table.cpp.

References CSG_String::Cmp(), Get_Field_Count(), and Get_Field_Name().

Referenced by Find_Field().

◆ Find_Field() [4/6]

bool CSG_Table::Find_Field ( const CSG_String & Name,
int & Index ) const

Returns true if a field with the requested name exists and sets the Index parameter to its position.

Definition at line 759 of file table.cpp.

References Find_Field().

◆ Find_Field() [5/6]

int CSG_Table::Find_Field ( const wchar_t * Name) const
inline

Definition at line 375 of file table.h.

References Find_Field().

Referenced by Find_Field().

◆ Find_Field() [6/6]

bool CSG_Table::Find_Field ( const wchar_t * Name,
int & Index ) const
inline

Definition at line 378 of file table.h.

References Find_Field().

Referenced by Find_Field().

◆ Find_Record() [1/4]

CSG_Table_Record * CSG_Table::Find_Record ( int Field,
const CSG_String & Value,
bool bCreateIndex = false )
virtual

Definition at line 1041 of file table.cpp.

References CSG_Table_Record, Find_Record(), and Get_Record().

◆ Find_Record() [2/4]

CSG_Table_Record * CSG_Table::Find_Record ( int Field,
double Value,
bool bCreateIndex = false )
virtual

Definition at line 1121 of file table.cpp.

References CSG_Table_Record, Find_Record(), and Get_Record().

◆ Find_Record() [3/4]

bool CSG_Table::Find_Record ( sLong & Index,
int Field,
const CSG_String & Value,
bool bCreateIndex = false )
virtual

◆ Find_Record() [4/4]

bool CSG_Table::Find_Record ( sLong & Index,
int Field,
double Value,
bool bCreateIndex = false )
virtual

◆ from_Text()

◆ Get_Count()

◆ Get_Extent()

virtual const CSG_Rect & CSG_Table::Get_Extent ( void )
inlinevirtual

Implements CSG_Data_Object.

Reimplemented in CSG_Shapes, and CSG_TIN.

Definition at line 352 of file table.h.

References m_Extent.

◆ Get_Field() [1/3]

int CSG_Table::Get_Field ( const char * Name) const

Definition at line 721 of file table.cpp.

References Get_Field().

◆ Get_Field() [2/3]

int CSG_Table::Get_Field ( const CSG_String & Name) const

Definition at line 723 of file table.cpp.

References CSG_String::Cmp(), Get_Field_Count(), and Get_Field_Name().

Referenced by Get_Field(), Get_Field(), Sort(), Sort(), and Sort().

◆ Get_Field() [3/3]

int CSG_Table::Get_Field ( const wchar_t * Name) const

Definition at line 722 of file table.cpp.

References Get_Field().

◆ Get_Field_Count()

◆ Get_Field_Length()

int CSG_Table::Get_Field_Length ( int Field,
int Encoding = SG_FILE_ENCODING_UNDEFINED ) const
virtual

◆ Get_Field_Name()

◆ Get_Field_Type()

◆ Get_File_Encoding()

int CSG_Table::Get_File_Encoding ( void ) const
inline

Definition at line 338 of file table.h.

References m_Encoding.

◆ Get_Histogram()

const CSG_Histogram & CSG_Table::Get_Histogram ( int Field,
size_t nClasses = 0 ) const
inline

Definition at line 390 of file table.h.

References _Histogram_Update(), and m_Field_Info.

◆ Get_Index()

sLong CSG_Table::Get_Index ( sLong Index) const
inline

Definition at line 405 of file table.h.

References is_Indexed(), and m_nRecords.

Referenced by CSG_TIN::_Triangulate().

◆ Get_Index_Field() [1/2]

int CSG_Table::Get_Index_Field ( int i) const
inline

Definition at line 455 of file table.h.

Referenced by Find_Record(), Find_Record(), and Toggle_Index().

◆ Get_Index_Field() [2/2]

int CSG_Table::Get_Index_Field ( size_t i) const
inline

Definition at line 457 of file table.h.

References Get_Index_Field().

Referenced by Get_Index_Field().

◆ Get_Index_Order() [1/2]

TSG_Table_Index_Order CSG_Table::Get_Index_Order ( int i) const
inline

Definition at line 456 of file table.h.

References TABLE_INDEX_Ascending, TABLE_INDEX_Descending, and TABLE_INDEX_None.

Referenced by Find_Record(), Find_Record(), and Toggle_Index().

◆ Get_Index_Order() [2/2]

TSG_Table_Index_Order CSG_Table::Get_Index_Order ( size_t i) const
inline

Definition at line 458 of file table.h.

References Get_Index_Order().

Referenced by Get_Index_Order().

◆ Get_Maximum()

double CSG_Table::Get_Maximum ( int Field) const
inline

Definition at line 382 of file table.h.

References _Stats_Update(), and m_Field_Info.

Referenced by CSG_PointCloud::On_Update().

◆ Get_Mean()

double CSG_Table::Get_Mean ( int Field) const
inline

Definition at line 385 of file table.h.

References _Stats_Update(), and m_Field_Info.

◆ Get_Minimum()

double CSG_Table::Get_Minimum ( int Field) const
inline

Definition at line 381 of file table.h.

References _Stats_Update(), and m_Field_Info.

Referenced by CSG_PointCloud::On_Update().

◆ Get_N()

sLong CSG_Table::Get_N ( int Field) const
inline

Definition at line 380 of file table.h.

References _Stats_Update(), and m_Field_Info.

◆ Get_ObjectType()

virtual TSG_Data_Object_Type CSG_Table::Get_ObjectType ( void ) const
inlinevirtual

Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking.

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 318 of file table.h.

References SG_DATAOBJECT_TYPE_Table.

Referenced by CSG_Shape::Assign(), SG_Create_Table(), and SG_Create_Table().

◆ Get_Range()

double CSG_Table::Get_Range ( int Field) const
inline

Definition at line 383 of file table.h.

References _Stats_Update(), and m_Field_Info.

◆ Get_Record()

◆ Get_Record_byIndex()

CSG_Table_Record * CSG_Table::Get_Record_byIndex ( sLong Index) const
inline

◆ Get_Selection()

virtual CSG_Table_Record * CSG_Table::Get_Selection ( sLong Index = 0) const
inlinevirtual

Reimplemented in CSG_PointCloud.

Definition at line 430 of file table.h.

References CSG_Table_Record, Get_Record(), Get_Selection_Index(), and m_Selection.

Referenced by CSG_Shapes::Get_Selection_Extent(), and to_Text().

◆ Get_Selection_Count()

◆ Get_Selection_Index()

sLong CSG_Table::Get_Selection_Index ( sLong Index = 0) const
inline

◆ Get_Statistics()

const CSG_Simple_Statistics & CSG_Table::Get_Statistics ( int Field) const
inline

Definition at line 388 of file table.h.

References _Stats_Update(), and m_Field_Info.

◆ Get_StdDev()

double CSG_Table::Get_StdDev ( int Field) const
inline

Definition at line 386 of file table.h.

References _Stats_Update(), and m_Field_Info.

◆ Get_Sum()

double CSG_Table::Get_Sum ( int Field) const
inline

Definition at line 384 of file table.h.

References _Stats_Update(), and m_Field_Info.

◆ Get_Value() [1/2]

◆ Get_Value() [2/2]

bool CSG_Table::Get_Value ( sLong Index,
int Field,
double & Value ) const
virtual

◆ Get_Variance()

double CSG_Table::Get_Variance ( int Field) const
inline

Definition at line 387 of file table.h.

References _Stats_Update(), and m_Field_Info.

◆ Ins_Record()

◆ Inv_Selection()

sLong CSG_Table::Inv_Selection ( void )
virtual

◆ is_Compatible() [1/2]

bool CSG_Table::is_Compatible ( const CSG_Table & Table,
bool bExactMatch = false ) const

◆ is_Compatible() [2/2]

bool CSG_Table::is_Compatible ( CSG_Table * pTable,
bool bExactMatch = false ) const

Definition at line 435 of file table.cpp.

References CSG_Table(), and is_Compatible().

◆ is_Field_Numeric()

bool CSG_Table::is_Field_Numeric ( int Field) const
inline

Definition at line 364 of file table.h.

References Get_Field_Type(), and SG_Data_Type_is_Numeric().

◆ is_Indexed()

bool CSG_Table::is_Indexed ( void ) const
inline

Definition at line 454 of file table.h.

References m_nRecords.

Referenced by Get_Index(), Get_Record_byIndex(), and Set_Index().

◆ is_Selected()

virtual bool CSG_Table::is_Selected ( sLong Index) const
inlinevirtual

Reimplemented in CSG_PointCloud.

Definition at line 432 of file table.h.

References is_Selected(), and m_nRecords.

Referenced by Del_Record(), Del_Selection(), and is_Selected().

◆ is_Valid()

virtual bool CSG_Table::is_Valid ( void ) const
inlinevirtual

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 346 of file table.h.

References m_nFields.

◆ Load()

◆ Mov_Field()

bool CSG_Table::Mov_Field ( int Field,
int Position )
virtual

Reimplemented in CSG_PointCloud.

Definition at line 542 of file table.cpp.

References Add_Field(), Del_Field(), m_Field_Info, m_nFields, and m_nRecords.

◆ On_Delete()

bool CSG_Table::On_Delete ( void )
protectedvirtual

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 70 of file table_io.cpp.

References CSG_Data_Object::Get_File_Name(), and SG_File_Delete().

◆ On_NoData_Changed()

bool CSG_Table::On_NoData_Changed ( void )
protectedvirtual

Reimplemented from CSG_Data_Object.

Definition at line 1324 of file table.cpp.

References _Stats_Invalidate(), and CSG_Data_Object::On_NoData_Changed().

◆ On_Reload()

bool CSG_Table::On_Reload ( void )
protectedvirtual

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 64 of file table_io.cpp.

References Create(), and CSG_Data_Object::Get_File_Name().

◆ On_Update()

bool CSG_Table::On_Update ( void )
protectedvirtual

Reimplemented from CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 1332 of file table.cpp.

References _Stats_Invalidate(), and CSG_Data_Object::On_Update().

Referenced by CSG_Shapes::On_Update().

◆ operator=()

CSG_Table & CSG_Table::operator= ( const CSG_Table & Table)

Definition at line 345 of file table.cpp.

References Create(), and CSG_Table().

◆ operator[]()

virtual CSG_Table_Record & CSG_Table::operator[] ( sLong Index) const
inlinevirtual

Definition at line 403 of file table.h.

References CSG_Table_Record, and Get_Record_byIndex().

◆ Save() [1/6]

virtual bool CSG_Table::Save ( const char * File,
int Format,
SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )
inlinevirtual

Definition at line 330 of file table.h.

References Save(), SG_Char, and SG_FILE_ENCODING_UNDEFINED.

Referenced by Save().

◆ Save() [2/6]

virtual bool CSG_Table::Save ( const char * File,
int Format = 0 )
inlinevirtual

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 334 of file table.h.

References Save().

Referenced by Save().

◆ Save() [3/6]

◆ Save() [4/6]

bool CSG_Table::Save ( const CSG_String & File,
int Format = 0 )
virtual

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 144 of file table_io.cpp.

References m_Encoding, and Save().

◆ Save() [5/6]

virtual bool CSG_Table::Save ( const wchar_t * File,
int Format,
SG_Char Separator,
int Encoding = SG_FILE_ENCODING_UNDEFINED )
inlinevirtual

Definition at line 331 of file table.h.

References Save(), SG_Char, and SG_FILE_ENCODING_UNDEFINED.

Referenced by Save().

◆ Save() [6/6]

virtual bool CSG_Table::Save ( const wchar_t * File,
int Format = 0 )
inlinevirtual

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 335 of file table.h.

References Save().

Referenced by Save().

◆ Select() [1/2]

bool CSG_Table::Select ( CSG_Table_Record * pRecord = NULL,
bool bInvert = false )
virtual

Reimplemented in CSG_PointCloud, and CSG_Shapes.

Definition at line 167 of file table_selection.cpp.

References CSG_Table_Record, CSG_Table_Record::Get_Index(), and Select().

◆ Select() [2/2]

◆ Serialize()

◆ Set_Count()

bool CSG_Table::Set_Count ( sLong nRecords)
virtual

Definition at line 954 of file table.cpp.

References Add_Record(), Del_Record(), and m_nRecords.

Referenced by Assign_Values().

◆ Set_Field_Name()

bool CSG_Table::Set_Field_Name ( int Field,
const SG_Char * Name )

Definition at line 595 of file table.cpp.

References m_Field_Info, m_nFields, Set_Modified(), and SG_Char.

Referenced by Load().

◆ Set_Field_Type()

◆ Set_File_Encoding()

bool CSG_Table::Set_File_Encoding ( int Encoding)

Definition at line 81 of file table_io.cpp.

References m_Encoding, and SG_FILE_ENCODING_UNDEFINED.

Referenced by Load(), and Save().

◆ Set_Index() [1/4]

bool CSG_Table::Set_Index ( CSG_Index & Index,
const CSG_Array_Int & Fields,
bool bAscending = true ) const

Definition at line 1609 of file table.cpp.

References CSG_Array_Int::Get_Array(), CSG_Array_Int::Get_Size(), and Set_Index().

◆ Set_Index() [2/4]

bool CSG_Table::Set_Index ( CSG_Index & Index,
int Field,
bool bAscending = true ) const

◆ Set_Index() [3/4]

bool CSG_Table::Set_Index ( CSG_Index & Index,
int Fields[],
int nFields,
bool bAscending = true ) const

Definition at line 1601 of file table.cpp.

References CSG_Index::Create(), and Get_Count().

◆ Set_Index() [4/4]

bool CSG_Table::Set_Index ( int Field,
TSG_Table_Index_Order Order = TABLE_INDEX_Ascending,
int Field_2 = -1,
TSG_Table_Index_Order Order_2 = TABLE_INDEX_None,
int Field_3 = -1,
TSG_Table_Index_Order Order_3 = TABLE_INDEX_None )

◆ Set_Modified()

void CSG_Table::Set_Modified ( bool bModified = true)
virtual

◆ Set_Record()

bool CSG_Table::Set_Record ( sLong Index,
CSG_Table_Record * pCopy )
virtual

Definition at line 886 of file table.cpp.

References Assign(), CSG_Table_Record, and m_nRecords.

◆ Set_Value() [1/2]

◆ Set_Value() [2/2]

bool CSG_Table::Set_Value ( sLong Index,
int Field,
double Value )
virtual

Reimplemented in CSG_PointCloud.

Definition at line 1172 of file table.cpp.

References CSG_Table_Record, Get_Record(), m_nFields, and CSG_Table_Record::Set_Value().

◆ Sort() [1/5]

bool CSG_Table::Sort ( const char * Field,
bool bAscending = true )

Definition at line 1352 of file table.cpp.

References Get_Field(), and Sort().

Referenced by Sort(), Sort(), Sort(), and Sort().

◆ Sort() [2/5]

bool CSG_Table::Sort ( const CSG_Index & Index)
virtual

Reimplemented in CSG_PointCloud.

Definition at line 1361 of file table.cpp.

References CSG_Table_Record, Del_Index(), CSG_Index::Get_Count(), Get_Count(), m_nBuffer, SG_Free(), and SG_Malloc().

◆ Sort() [3/5]

bool CSG_Table::Sort ( const CSG_String & Field,
bool bAscending = true )

Definition at line 1354 of file table.cpp.

References Get_Field(), and Sort().

◆ Sort() [4/5]

bool CSG_Table::Sort ( const wchar_t * Field,
bool bAscending = true )

Definition at line 1353 of file table.cpp.

References Get_Field(), and Sort().

◆ Sort() [5/5]

bool CSG_Table::Sort ( int Field,
bool bAscending = true )

Definition at line 1355 of file table.cpp.

References Set_Index(), and Sort().

◆ to_Text()

CSG_String CSG_Table::to_Text ( bool Selection = false) const

◆ Toggle_Index()

bool CSG_Table::Toggle_Index ( int Field)

◆ CSG_Table_Record

◆ CSG_TIN

friend class CSG_TIN ( void )
friend

Definition at line 287 of file table.h.

References Create(), CSG_Table(), CSG_TIN, Destroy(), SG_Char, SG_FILE_ENCODING_UNDEFINED, and TABLE_FILETYPE_Undefined.

Referenced by CSG_TIN.

Member Data Documentation

◆ m_Encoding

int CSG_Table::m_Encoding = SG_FILE_ENCODING_UTF8
protected

◆ m_Extent

CSG_Rect CSG_Table::m_Extent
protected

◆ m_Field_Info

◆ m_nBuffer

sLong CSG_Table::m_nBuffer = 0
protected

Definition at line 489 of file table.h.

Referenced by Del_Records(), CSG_PointCloud::Sort(), and Sort().

◆ m_nFields

◆ m_nRecords

◆ m_Selection


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