SAGA API  v9.6
CSG_Table Class Reference

#include <table.h>

Inheritance diagram for CSG_Table:
CSG_Data_Object CSG_Shapes CSG_TIN CSG_PointCloud

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. More...
 
CSG_Tableoperator= (const CSG_Table &Table)
 
virtual bool Assign (CSG_Data_Object *pTable)
 
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 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 iField)
 
virtual bool Mov_Field (int iField, int Position)
 
int Get_Field_Count (void) const
 
const SG_CharGet_Field_Name (int iField) const
 
TSG_Data_Type Get_Field_Type (int iField) const
 
int Get_Field_Length (int iField, 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 iField, const SG_Char *Name)
 
virtual bool Set_Field_Type (int iField, 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 iField) const
 
double Get_Minimum (int iField) const
 
double Get_Maximum (int iField) const
 
double Get_Range (int iField) const
 
double Get_Sum (int iField) const
 
double Get_Mean (int iField) const
 
double Get_StdDev (int iField) const
 
double Get_Variance (int iField) const
 
const CSG_Simple_StatisticsGet_Statistics (int iField) 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 iField, const CSG_String &Value, bool bCreateIndex=false)
 
virtual CSG_Table_RecordFind_Record (int iField, const CSG_String &Value, bool bCreateIndex=false)
 
virtual bool Find_Record (sLong &Index, int iField, double Value, bool bCreateIndex=false)
 
virtual CSG_Table_RecordFind_Record (int iField, double Value, bool bCreateIndex=false)
 
virtual bool Set_Value (sLong Index, int iField, const SG_Char *Value)
 
virtual bool Set_Value (sLong Index, int iField, double Value)
 
virtual bool Get_Value (sLong Index, int iField, CSG_String &Value) const
 
virtual bool Get_Value (sLong Index, int iField, 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 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 is_Indexed (void) const
 
bool Set_Index (int Field_1, TSG_Table_Index_Order Order_1=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 iField)
 
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). More...
 
int Get_Managed (void) const
 
bool Reload (void)
 If there is an associated file data can be reloaded with this command. More...
 
bool Delete (void)
 Deletes all files associated with this data object if possible. Works only with native SAGA files. Returns true on success. More...
 
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 iField) const
 
virtual bool _Stats_Update (int iField) 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

int m_nFields
 
int m_Encoding
 
sLong m_nRecords
 
sLong m_nBuffer
 
TSG_Data_Typem_Field_Type
 
CSG_String ** m_Field_Name
 
CSG_Simple_Statistics ** m_Field_Stats
 
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. More...
 

Detailed Description

Definition at line 282 of file table.h.

Constructor & Destructor Documentation

◆ CSG_Table() [1/9]

CSG_Table::CSG_Table ( void  )

Definition at line 133 of file table.cpp.

References _On_Construction().

◆ CSG_Table() [2/9]

CSG_Table::CSG_Table ( const CSG_Table Table)

Definition at line 145 of file table.cpp.

References _On_Construction(), and Create().

◆ CSG_Table() [3/9]

CSG_Table::CSG_Table ( const CSG_Table pTemplate)

Definition at line 267 of file table.cpp.

References _On_Construction(), and Create().

◆ 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 159 of file table.cpp.

References _On_Construction(), and Create().

◆ 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 157 of file table.cpp.

◆ 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 158 of file table.cpp.

◆ 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 253 of file table.cpp.

References _On_Construction(), and Create().

◆ 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 251 of file table.cpp.

◆ 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 252 of file table.cpp.

◆ ~CSG_Table()

CSG_Table::~CSG_Table ( void  )
virtual

Definition at line 326 of file table.cpp.

References Destroy().

Member Function Documentation

◆ _Add_Selection()

bool CSG_Table::_Add_Selection ( sLong  Index)
protected

◆ _Del_Selection()

bool CSG_Table::_Del_Selection ( sLong  Index)
protected

◆ _Get_New_Record()

CSG_Table_Record * CSG_Table::_Get_New_Record ( sLong  Index)
protectedvirtual

Reimplemented in CSG_TIN, and CSG_Shapes.

Definition at line 789 of file table.cpp.

References CSG_Table_Record.

Referenced by Ins_Record().

◆ _On_Construction()

◆ _Save_DBase()

bool CSG_Table::_Save_DBase ( const CSG_String File)
protected

Definition at line 523 of file table_io.cpp.

References m_Encoding, and CSG_Table_DBase::Open_Write().

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

◆ _Save_Text()

◆ _Set_Selection()

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

◆ _Stats_Invalidate() [1/2]

bool CSG_Table::_Stats_Invalidate ( int  iField) const
protected

Definition at line 1211 of file table.cpp.

References CSG_Simple_Statistics::Invalidate(), m_Field_Stats, 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 351 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 352 of file table.h.

References Add_Field().

Referenced by Add_Field().

◆ Add_Record()

◆ Assign()

bool CSG_Table::Assign ( CSG_Data_Object pTable)
virtual

◆ Assign_Values() [1/3]

◆ Assign_Values() [2/3]

bool CSG_Table::Assign_Values ( const SG_Char File)

Definition at line 417 of file table.cpp.

References Assign_Values(), and Create().

◆ Assign_Values() [3/3]

bool CSG_Table::Assign_Values ( CSG_Table pTable)

Definition at line 411 of file table.cpp.

References Assign_Values().

◆ 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 259 of file table.cpp.

References Create().

◆ 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 165 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 261 of file table.cpp.

References Load().

◆ Create() [4/9]

◆ Create() [5/9]

bool CSG_Table::Create ( const CSG_Table Table)

Definition at line 151 of file table.cpp.

References Assign().

◆ 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 260 of file table.cpp.

References Create().

◆ 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 166 of file table.cpp.

References Create().

◆ Create() [9/9]

◆ Del_Field()

bool CSG_Table::Del_Field ( int  iField)
virtual

◆ Del_Index()

bool CSG_Table::Del_Index ( void  )

Definition at line 1337 of file table.cpp.

References CSG_Array_Int::Destroy(), and CSG_Index::Destroy().

Referenced by Del_Records(), Set_Index(), and Toggle_Index().

◆ Del_Record()

◆ Del_Records()

◆ Del_Selection()

sLong CSG_Table::Del_Selection ( void  )
virtual

◆ Destroy()

◆ Find_Field() [1/6]

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

Definition at line 368 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 371 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 713 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 731 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 369 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 372 of file table.h.

References Find_Field().

Referenced by Find_Field().

◆ Find_Record() [1/4]

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

Definition at line 1013 of file table.cpp.

References Find_Record(), and Get_Record().

◆ Find_Record() [2/4]

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

Definition at line 1093 of file table.cpp.

References Find_Record(), and Get_Record().

◆ Find_Record() [3/4]

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

◆ Find_Record() [4/4]

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

◆ Get_Count()

sLong CSG_Table::Get_Count ( void  ) const
inline

Definition at line 392 of file table.h.

References m_nRecords.

Referenced by CSG_Regression_Multiple::_Initialize(), CSG_PointCloud::_On_Construction(), _Save_Text(), CSG_Parameter_Fixed_Table::_Serialize(), CSG_Regression_Multiple::_Set_Step_Info(), CSG_Parameter_Fixed_Table::_Set_String(), _Stats_Update(), CSG_Projections::Add(), CSG_Category_Statistics::Add_Value(), CSG_Shapes::Assign(), Assign(), Assign_Values(), CSG_Natural_Breaks::Create(), CSG_Translator::Create(), CSG_Grids::Create(), CSG_Shapes::Create(), Create(), CSG_KDTree_2D::Create(), CSG_KDTree_3D::Create(), CSG_TIN::Create(), CSG_PRQuadTree::Create(), CSG_Histogram::Create(), CSG_Regression_Multiple::Destroy(), CSG_Category_Statistics::Get_Category(), CSG_Projections::Get_Count(), CSG_Category_Statistics::Get_Count(), CSG_Regression_Multiple::Get_Info(), CSG_Category_Statistics::Get_Majority(), CSG_Category_Statistics::Get_Minority(), Get_N(), CSG_Projections::Get_Names_List(), CSG_TIN::Get_Node_Count(), CSG_Parameters_Point_Search_KDTree_2D::Get_Points(), CSG_Projections::Get_Preference(), CSG_Projections::Get_Projection(), CSG_Regression_Multiple::Get_RConst(), Get_Selection_Index(), CSG_Shapes::Get_Shape(), CSG_Tool_Library_Manager::Get_Summary(), CSG_Data_Manager::Get_Summary(), CSG_Grids::Get_Value(), CSG_Parameters_Point_Search_KDTree_2D::Initialize(), Inv_Selection(), CSG_Shape_Line::is_Valid(), CSG_Shape_Polygon::is_Valid(), CSG_Shapes::is_Valid(), CSG_TIN::is_Valid(), CSG_Parameter::is_Value_Equal(), CSG_Shapes::Make_Clean(), CSG_Parameters_Point_Search::On_Parameter_Changed(), CSG_Shapes::On_Update(), CSG_Table_DBase::Open_Write(), CSG_Shapes::Select(), CSG_Grids::Set_Attribute(), Set_Index(), CSG_Parameters_Point_Search_KDTree_2D::Set_Location(), and CSG_Parameters_Grid_Target::Set_User_Defined().

◆ Get_Extent()

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

Implements CSG_Data_Object.

Reimplemented in CSG_TIN, and CSG_Shapes.

Definition at line 347 of file table.h.

References CSG_TIN::m_Extent.

◆ Get_Field() [1/3]

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

Definition at line 693 of file table.cpp.

References Get_Field().

◆ Get_Field() [2/3]

int CSG_Table::Get_Field ( const CSG_String Name) const

Definition at line 695 of file table.cpp.

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

Referenced by Get_Field(), and CSG_Grids::Set_Attribute().

◆ Get_Field() [3/3]

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

Definition at line 694 of file table.cpp.

References Get_Field().

◆ Get_Field_Count()

◆ Get_Field_Length()

◆ Get_Field_Name()

◆ Get_Field_Type()

◆ Get_File_Encoding()

int CSG_Table::Get_File_Encoding ( void  ) const
inline

Definition at line 336 of file table.h.

References m_Encoding.

◆ Get_Index()

sLong CSG_Table::Get_Index ( sLong  Index) const
inline

Definition at line 397 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 441 of file table.h.

Referenced by Find_Record(), and Toggle_Index().

◆ Get_Index_Field() [2/2]

int CSG_Table::Get_Index_Field ( size_t  i) const
inline

Definition at line 443 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 442 of file table.h.

References TABLE_INDEX_Ascending, TABLE_INDEX_Descending, and TABLE_INDEX_None.

Referenced by 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 444 of file table.h.

References Get_Index_Order().

Referenced by Get_Index_Order().

◆ Get_Maximum()

double CSG_Table::Get_Maximum ( int  iField) const
inline

Definition at line 376 of file table.h.

References _Stats_Update(), and m_Field_Stats.

Referenced by CSG_PointCloud::On_Update().

◆ Get_Mean()

double CSG_Table::Get_Mean ( int  iField) const
inline

Definition at line 379 of file table.h.

References _Stats_Update(), and m_Field_Stats.

◆ Get_Minimum()

double CSG_Table::Get_Minimum ( int  iField) const
inline

Definition at line 375 of file table.h.

References _Stats_Update(), and m_Field_Stats.

Referenced by CSG_PointCloud::On_Update().

◆ Get_N()

sLong CSG_Table::Get_N ( int  iField) const
inline

Definition at line 374 of file table.h.

References _Stats_Update(), Get_Count(), and m_Field_Stats.

◆ 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_TIN, CSG_Shapes, and CSG_PointCloud.

Definition at line 316 of file table.h.

References SG_DATAOBJECT_TYPE_Table.

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

◆ Get_Range()

double CSG_Table::Get_Range ( int  iField) const
inline

Definition at line 377 of file table.h.

References _Stats_Update(), and m_Field_Stats.

◆ Get_Record()

◆ Get_Record_byIndex()

◆ Get_Selection()

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

Definition at line 422 of file table.h.

References Get_Record(), Get_Selection_Index(), CSG_Array::Get_Size(), and m_Selection.

Referenced by CSG_Shapes::Get_Selection().

◆ 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  iField) const
inline

Definition at line 382 of file table.h.

References _Stats_Update(), and m_Field_Stats.

◆ Get_StdDev()

double CSG_Table::Get_StdDev ( int  iField) const
inline

Definition at line 380 of file table.h.

References _Stats_Update(), and m_Field_Stats.

◆ Get_Sum()

double CSG_Table::Get_Sum ( int  iField) const
inline

Definition at line 378 of file table.h.

References _Stats_Update(), and m_Field_Stats.

◆ Get_Value() [1/2]

bool CSG_Table::Get_Value ( sLong  Index,
int  iField,
CSG_String Value 
) const
virtual

Reimplemented in CSG_PointCloud.

Definition at line 1157 of file table.cpp.

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

Referenced by CSG_PointCloud::Get_Attribute(), and CSG_PointCloud::is_NoData().

◆ Get_Value() [2/2]

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

Definition at line 1175 of file table.cpp.

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

◆ Get_Variance()

double CSG_Table::Get_Variance ( int  iField) const
inline

Definition at line 381 of file table.h.

References _Stats_Update(), Get_Variance(), and m_Field_Stats.

Referenced by Get_Variance().

◆ Ins_Record()

◆ Inv_Selection()

◆ 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 468 of file table.cpp.

References is_Compatible().

◆ is_Indexed()

bool CSG_Table::is_Indexed ( void  ) const
inline

Definition at line 437 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 424 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_TIN, CSG_Shapes, and CSG_PointCloud.

Definition at line 341 of file table.h.

References m_nFields.

◆ Load()

◆ Mov_Field()

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

◆ On_Delete()

bool CSG_Table::On_Delete ( void  )
protectedvirtual

Implements CSG_Data_Object.

Reimplemented in CSG_TIN, CSG_Shapes, and CSG_PointCloud.

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 1280 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_TIN, CSG_Shapes, and CSG_PointCloud.

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_TIN, CSG_Shapes, and CSG_PointCloud.

Definition at line 1288 of file table.cpp.

References _Stats_Invalidate(), CSG_Index::is_Okay(), 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 369 of file table.cpp.

References Create().

◆ operator[]()

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

Definition at line 395 of file table.h.

References 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 328 of file table.h.

References Save().

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_TIN, CSG_Shapes, and CSG_PointCloud.

Definition at line 332 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_TIN, CSG_Shapes, and CSG_PointCloud.

Definition at line 149 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 329 of file table.h.

References Save().

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_TIN, CSG_Shapes, and CSG_PointCloud.

Definition at line 333 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_Shapes, and CSG_PointCloud.

Definition at line 167 of file table_selection.cpp.

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

◆ Select() [2/2]

bool CSG_Table::Select ( sLong  Index,
bool  bInvert = false 
)
virtual

◆ Serialize()

◆ Set_Count()

bool CSG_Table::Set_Count ( sLong  nRecords)
virtual

◆ Set_Field_Name()

bool CSG_Table::Set_Field_Name ( int  iField,
const SG_Char Name 
)

Definition at line 611 of file table.cpp.

References m_Field_Name, m_nFields, and Set_Modified().

Referenced by Load().

◆ Set_Field_Type()

bool CSG_Table::Set_Field_Type ( int  iField,
TSG_Data_Type  Type 
)
virtual

◆ 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 1526 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 1518 of file table.cpp.

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

◆ Set_Index() [4/4]

bool CSG_Table::Set_Index ( int  Field_1,
TSG_Table_Index_Order  Order_1 = 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()

◆ Set_Record()

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

Definition at line 858 of file table.cpp.

References Assign(), and m_nRecords.

◆ Set_Value() [1/2]

bool CSG_Table::Set_Value ( sLong  Index,
int  iField,
const SG_Char Value 
)
virtual

◆ Set_Value() [2/2]

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

Reimplemented in CSG_PointCloud.

Definition at line 1144 of file table.cpp.

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

◆ Toggle_Index()

bool CSG_Table::Toggle_Index ( int  iField)

Friends And Related Function Documentation

◆ CSG_Table_Record

friend class CSG_Table_Record
friend

Definition at line 284 of file table.h.

Referenced by _Get_New_Record().

◆ CSG_TIN

friend class CSG_TIN ( void  )
friend

Definition at line 285 of file table.h.

Member Data Documentation

◆ m_Encoding

◆ m_Extent

CSG_Rect CSG_Table::m_Extent
protected

Definition at line 461 of file table.h.

Referenced by CSG_PointCloud::On_Update(), and CSG_Shapes::On_Update().

◆ m_Field_Name

◆ m_Field_Stats

◆ m_Field_Type

◆ m_nBuffer

sLong CSG_Table::m_nBuffer
protected

Definition at line 451 of file table.h.

Referenced by _On_Construction(), and Del_Records().

◆ m_nFields

◆ m_nRecords

◆ m_Selection


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