SAGA API v2.0.8
CSG_Table Class Reference

#include <table.h>

Inheritance diagram for CSG_Table:
CSG_Data_Object CSG_Shapes CSG_TIN CSG_PointCloud

List of all members.

Public Member Functions

 CSG_Table (void)
 CSG_Table (const CSG_Table &Table)
bool Create (const CSG_Table &Table)
 CSG_Table (const CSG_String &File_Name, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined)
bool Create (const CSG_String &File_Name, TSG_Table_File_Type Format=TABLE_FILETYPE_Undefined)
 CSG_Table (const CSG_String &File_Name, TSG_Table_File_Type Format, const SG_Char *Separator)
bool Create (const CSG_String &File_Name, TSG_Table_File_Type Format, const SG_Char *Separator)
 CSG_Table (CSG_Table *pTemplate)
bool Create (CSG_Table *pTemplate)
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.
virtual bool Assign (CSG_Data_Object *pSource)
bool Assign_Values (CSG_Table *pTable)
virtual bool Save (const CSG_String &File_Name, int Format=0)
virtual bool Save (const CSG_String &File_Name, int Format, const SG_Char *Separator)
bool Serialize (CSG_File &Stream, bool bSave)
CSG_Data_ObjectGet_Owner (void)
bool is_Private (void) const
virtual bool is_Valid (void) const
bool is_Compatible (CSG_Table *pTable, bool bExactMatch=false) const
virtual bool Add_Field (const SG_Char *Name, TSG_Data_Type Type, int iField=-1)
virtual bool Del_Field (int iField)
int Get_Field_Count (void) const
const SG_Char * Get_Field_Name (int iField) const
TSG_Data_Type Get_Field_Type (int iField) const
int Get_Field_Length (int iField) const
bool Set_Field_Name (int iField, const SG_Char *Name)
bool Set_Field_Type (int iField, TSG_Data_Type Type)
double Get_Minimum (int iField) const
double Get_Maximum (int iField) const
double Get_Range (int iField) const
double Get_Mean (int iField) const
double Get_StdDev (int iField) const
double Get_Variance (int iField) const
virtual CSG_Table_RecordAdd_Record (CSG_Table_Record *pCopy=NULL)
virtual CSG_Table_RecordIns_Record (int iRecord, CSG_Table_Record *pCopy=NULL)
virtual bool Del_Record (int iRecord)
virtual bool Del_Records (void)
int Get_Count (void) const
int Get_Record_Count (void) const
virtual CSG_Table_RecordGet_Record (int iRecord) const
virtual CSG_Table_Recordoperator[] (int iRecord) const
int Get_Index (int Index) const
CSG_Table_RecordGet_Record_byIndex (int Index) const
virtual bool Set_Value (int iRecord, int iField, const SG_Char *Value)
virtual bool Set_Value (int iRecord, int iField, double Value)
virtual bool Get_Value (int iRecord, int iField, CSG_String &Value) const
virtual bool Get_Value (int iRecord, int iField, double &Value) const
virtual void Set_Modified (bool bModified=true)
int Get_Selection_Count (void) const
virtual CSG_Table_RecordGet_Selection (int Index=0) const
virtual bool is_Selected (int iRecord) const
virtual bool Select (int iRecord, bool bInvert=false)
virtual bool Select (CSG_Table_Record *pRecord=NULL, bool bInvert=false)
virtual int Del_Selection (void)
virtual int Inv_Selection (void)
bool Set_Index (int Field_1, TSG_Table_Index_Order Order_1, 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)
bool is_Indexed (void) const
int Get_Index_Field (int i) const
TSG_Table_Index_Order Get_Index_Order (int i) const

Protected Member Functions

virtual void _On_Construction (void)
virtual CSG_Table_Record_Get_New_Record (int Index)
bool _Create (const CSG_Table &Table)
bool _Create (const CSG_String &File_Name, TSG_Table_File_Type Format, const SG_Char *Separator)
bool _Create (CSG_Table *pTemplate)
bool _Stats_Invalidate (void) const
bool _Stats_Invalidate (int iField) const
virtual bool _Stats_Update (int iField) const

Protected Attributes

int m_nFields
int m_nRecords
int m_nBuffer
int m_nSelected
TSG_Data_Typem_Field_Type
CSG_String ** m_Field_Name
CSG_Simple_Statistics ** m_Field_Stats

Friends

class CSG_Table_Record
class CSG_TIN

Detailed Description

Definition at line 210 of file table.h.


Constructor & Destructor Documentation

CSG_Table::CSG_Table ( void  )

Definition at line 135 of file table.cpp.

References _On_Construction().

CSG_Table::CSG_Table ( const CSG_Table Table)

Definition at line 142 of file table.cpp.

References _On_Construction(), and Create().

CSG_Table::CSG_Table ( const CSG_String File_Name,
TSG_Table_File_Type  Format = TABLE_FILETYPE_Undefined 
)

Definition at line 168 of file table.cpp.

References _On_Construction(), and Create().

CSG_Table::CSG_Table ( const CSG_String File_Name,
TSG_Table_File_Type  Format,
const SG_Char *  Separator 
)

Definition at line 181 of file table.cpp.

References _On_Construction(), and Create().

CSG_Table::CSG_Table ( CSG_Table pTemplate)

Definition at line 200 of file table.cpp.

References _On_Construction(), and Create().

CSG_Table::~CSG_Table ( void  ) [virtual]

Definition at line 267 of file table.cpp.


Member Function Documentation

bool CSG_Table::_Create ( const CSG_Table Table) [protected]
bool CSG_Table::_Create ( const CSG_String File_Name,
TSG_Table_File_Type  Format,
const SG_Char *  Separator 
) [protected]

Definition at line 194 of file table.cpp.

bool CSG_Table::_Create ( CSG_Table pTemplate) [protected]

Definition at line 213 of file table.cpp.

References Add_Field(), Get_Field_Count(), Get_Field_Name(), and Get_Field_Type().

CSG_Table_Record * CSG_Table::_Get_New_Record ( int  Index) [protected, virtual]

Reimplemented in CSG_Shapes, and CSG_TIN.

Definition at line 701 of file table.cpp.

References CSG_Table_Record.

void CSG_Table::_On_Construction ( void  ) [protected, virtual]
bool CSG_Table::_Stats_Invalidate ( int  iField) const [protected]

Definition at line 998 of file table.cpp.

References CSG_Simple_Statistics::Invalidate(), m_Field_Stats, and m_nFields.

bool CSG_Table::_Stats_Invalidate ( void  ) const [protected]
bool CSG_Table::_Stats_Update ( int  iField) const [protected, virtual]
bool CSG_Table::Assign ( CSG_Data_Object pSource) [virtual]

Reimplemented from CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 316 of file table.cpp.

References is_Private().

Referenced by _Create(), CSG_Regression_Multiple::_Set_Step_Info(), and CSG_Parameter_Fixed_Table::On_Assign().

bool CSG_Table::Create ( const CSG_String File_Name,
TSG_Table_File_Type  Format = TABLE_FILETYPE_Undefined 
)

Definition at line 175 of file table.cpp.

References _Create(), and is_Private().

bool CSG_Table::Create ( const CSG_Table Table)
bool CSG_Table::Create ( const CSG_String File_Name,
TSG_Table_File_Type  Format,
const SG_Char *  Separator 
)

Definition at line 189 of file table.cpp.

References _Create(), and is_Private().

bool CSG_Table::Create ( CSG_Table pTemplate)

Definition at line 208 of file table.cpp.

References _Create(), and is_Private().

bool CSG_Table::Del_Field ( int  iField) [virtual]
bool CSG_Table::Del_Index ( void  )

Definition at line 1075 of file table.cpp.

References is_Indexed().

bool CSG_Table::Del_Record ( int  iRecord) [virtual]

Reimplemented in CSG_PointCloud.

Definition at line 809 of file table.cpp.

References is_Private().

Referenced by CSG_TIN::Del_Node(), and CSG_Shapes::Del_Shape().

bool CSG_Table::Del_Records ( void  ) [virtual]
int CSG_Table::Del_Selection ( void  ) [virtual]
bool CSG_Table::Destroy ( void  ) [virtual]

Reimplemented from CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 273 of file table.cpp.

References is_Private().

Referenced by CSG_Shapes::Destroy().

int CSG_Table::Get_Field_Length ( int  iField) const
const SG_Char* CSG_Table::Get_Field_Name ( int  iField) const [inline]
int CSG_Table::Get_Index ( int  Index) const [inline]

Definition at line 284 of file table.h.

References m_nRecords.

Referenced by CSG_TIN::_Triangulate().

int CSG_Table::Get_Index_Field ( int  i) const [inline]

Definition at line 329 of file table.h.

TSG_Table_Index_Order CSG_Table::Get_Index_Order ( int  i) const [inline]

Definition at line 330 of file table.h.

References TABLE_INDEX_None.

double CSG_Table::Get_Maximum ( int  iField) const [inline]

Definition at line 267 of file table.h.

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

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

double CSG_Table::Get_Mean ( int  iField) const [inline]

Definition at line 269 of file table.h.

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

Referenced by Get_Mean().

double CSG_Table::Get_Minimum ( int  iField) const [inline]

Definition at line 266 of file table.h.

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

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

virtual TSG_Data_Object_Type CSG_Table::Get_ObjectType ( void  ) const [inline, virtual]

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

References DATAOBJECT_TYPE_Table.

Referenced by CSG_Shapes::Add_Shape(), CSG_Data_Object::asTable(), and SG_Create_Table().

CSG_Data_Object* CSG_Table::Get_Owner ( void  ) [inline]

Definition at line 245 of file table.h.

double CSG_Table::Get_Range ( int  iField) const [inline]

Definition at line 268 of file table.h.

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

Referenced by Get_Range().

CSG_Table_Record* CSG_Table::Get_Record_byIndex ( int  Index) const [inline]
int CSG_Table::Get_Record_Count ( void  ) const [inline]
virtual CSG_Table_Record* CSG_Table::Get_Selection ( int  Index = 0) const [inline, virtual]

Definition at line 312 of file table.h.

References m_nSelected.

Referenced by CSG_Shapes::Get_Selection().

int CSG_Table::Get_Selection_Count ( void  ) const [inline]

Definition at line 311 of file table.h.

References m_nSelected.

Referenced by CSG_Shapes::Get_Selection_Extent(), Inv_Selection(), and CSG_Shapes::Select().

double CSG_Table::Get_StdDev ( int  iField) const [inline]

Definition at line 270 of file table.h.

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

Referenced by Get_StdDev().

bool CSG_Table::Get_Value ( int  iRecord,
int  iField,
double &  Value 
) const [virtual]

Definition at line 965 of file table.cpp.

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

bool CSG_Table::Get_Value ( int  iRecord,
int  iField,
CSG_String Value 
) const [virtual]

Reimplemented in CSG_PointCloud.

Definition at line 950 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().

double CSG_Table::Get_Variance ( int  iField) const [inline]

Definition at line 271 of file table.h.

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

Referenced by Get_Variance().

CSG_Table_Record * CSG_Table::Ins_Record ( int  iRecord,
CSG_Table_Record pCopy = NULL 
) [virtual]

Reimplemented in CSG_PointCloud.

Definition at line 751 of file table.cpp.

References is_Private().

int CSG_Table::Inv_Selection ( void  ) [virtual]

Reimplemented in CSG_PointCloud.

Definition at line 186 of file table_selection.cpp.

References Get_Record_Count(), Get_Selection_Count(), m_nRecords, m_nSelected, and SG_Realloc().

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

Definition at line 399 of file table.cpp.

References Get_Field_Count(), Get_Field_Type(), and SG_DATATYPE_String.

Referenced by Assign_Values().

bool CSG_Table::is_Indexed ( void  ) const [inline]

Definition at line 327 of file table.h.

Referenced by Del_Index(), and Set_Index().

bool CSG_Table::is_Private ( void  ) const [inline]
virtual bool CSG_Table::is_Selected ( int  iRecord) const [inline, virtual]

Reimplemented in CSG_PointCloud.

Definition at line 314 of file table.h.

References is_Selected(), and m_nRecords.

Referenced by is_Selected().

virtual bool CSG_Table::is_Valid ( void  ) const [inline, virtual]

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 248 of file table.h.

References m_nFields.

virtual CSG_Table_Record& CSG_Table::operator[] ( int  iRecord) const [inline, virtual]

Definition at line 282 of file table.h.

References Get_Record().

bool CSG_Table::Save ( const CSG_String File_Name,
int  Format = 0 
) [virtual]

Implements CSG_Data_Object.

Reimplemented in CSG_PointCloud, CSG_Shapes, and CSG_TIN.

Definition at line 156 of file table_io.cpp.

Referenced by CSG_Projections::Save_DB(), and CSG_Projections::Save_Dictionary().

bool CSG_Table::Select ( int  iRecord,
bool  bInvert = false 
) [virtual]
bool CSG_Table::Select ( CSG_Table_Record pRecord = NULL,
bool  bInvert = false 
) [virtual]

Definition at line 146 of file table_selection.cpp.

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

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

Definition at line 532 of file table.cpp.

References m_Field_Name, m_nFields, and Set_Modified().

bool CSG_Table::Set_Index ( int  Field_1,
TSG_Table_Index_Order  Order_1,
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 CSG_Table::Set_Value ( int  iRecord,
int  iField,
const SG_Char *  Value 
) [virtual]
bool CSG_Table::Set_Value ( int  iRecord,
int  iField,
double  Value 
) [virtual]

Reimplemented in CSG_PointCloud.

Definition at line 937 of file table.cpp.

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

bool CSG_Table::Toggle_Index ( int  iField)

Friends And Related Function Documentation

friend class CSG_Table_Record [friend]

Definition at line 212 of file table.h.

Referenced by _Get_New_Record().

friend class CSG_TIN [friend]

Definition at line 213 of file table.h.


Member Data Documentation

int CSG_Table::m_nBuffer [protected]

Definition at line 335 of file table.h.

Referenced by _On_Construction().


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