SAGA API  v9.2
CSG_Data_Object Class Referenceabstract

#include <dataobject.h>

Inheritance diagram for CSG_Data_Object:
CSG_Grid CSG_Grids CSG_Table CSG_Shapes CSG_TIN CSG_PointCloud

Public Member Functions

 CSG_Data_Object (void)
 
virtual ~CSG_Data_Object (void)
 
virtual bool Destroy (void)
 
virtual TSG_Data_Object_Type Get_ObjectType (void) const =0
 Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking. More...
 
virtual bool is_Valid (void) const =0
 
virtual bool Save (const CSG_String &File, int Format=0)=0
 
virtual bool Save (const char *File, int Format=0)=0
 
virtual bool Save (const wchar_t *File, int Format=0)=0
 
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
 
virtual bool Assign (CSG_Data_Object *pObject)
 
void Set_Name (const CSG_String &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 void Set_Modified (bool bOn=true)
 
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
 
virtual const CSG_RectGet_Extent (void)=0
 
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

void Set_File_Name (const CSG_String &FileName, bool bNative)
 
void Set_File_Type (int Type)
 
virtual bool On_Reload (void)=0
 
virtual bool On_Delete (void)=0
 
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)
 
virtual bool On_Update (void)
 
virtual bool On_NoData_Changed (void)
 

Protected Attributes

CSG_Data_Objectm_pOwner
 

Detailed Description

CSG_Data_Object is the base class for all types of data sets, which are provided by the SAGA API.

See also
CSG_Table
CSG_Shapes
CSG_TIN
CSG_PointCloud
CSG_Grid
CSG_Grids

Definition at line 179 of file dataobject.h.

Constructor & Destructor Documentation

◆ CSG_Data_Object()

◆ ~CSG_Data_Object()

CSG_Data_Object::~CSG_Data_Object ( void  )
virtual

Definition at line 212 of file dataobject.cpp.

References Destroy().

Member Function Documentation

◆ asGrid()

CSG_Grid * CSG_Data_Object::asGrid ( bool  bPolymorph = false) const

Definition at line 491 of file dataobject.cpp.

References Get_ObjectType(), and SG_DATAOBJECT_TYPE_Grid.

◆ asGrids()

CSG_Grids * CSG_Data_Object::asGrids ( bool  bPolymorph = false) const

Definition at line 502 of file dataobject.cpp.

References Get_ObjectType(), and SG_DATAOBJECT_TYPE_Grids.

Referenced by CSG_Parameter_Data_Object::_Serialize().

◆ asPointCloud()

CSG_PointCloud * CSG_Data_Object::asPointCloud ( bool  bPolymorph = false) const

Definition at line 480 of file dataobject.cpp.

References Get_ObjectType(), and SG_DATAOBJECT_TYPE_PointCloud.

◆ asShapes()

CSG_Shapes * CSG_Data_Object::asShapes ( bool  bPolymorph = false) const

◆ Assign()

bool CSG_Data_Object::Assign ( CSG_Data_Object pObject)
virtual

Reimplemented in CSG_Table, CSG_PointCloud, CSG_TIN, CSG_Shapes, CSG_Grids, and CSG_Grid.

Definition at line 734 of file dataobject.cpp.

◆ asTable()

CSG_Table * CSG_Data_Object::asTable ( bool  bPolymorph = false) const

◆ asTIN()

CSG_TIN * CSG_Data_Object::asTIN ( bool  bPolymorph = false) const

Definition at line 469 of file dataobject.cpp.

References Get_ObjectType(), and SG_DATAOBJECT_TYPE_TIN.

◆ Delete()

bool CSG_Data_Object::Delete ( void  )

Deletes all files associated with this data object if possible. Works only with native SAGA files. Returns true on success.

Definition at line 378 of file dataobject.cpp.

References CSG_MetaData::Destroy(), Get_ObjectType(), On_Delete(), SG_DATAOBJECT_TYPE_Grid, SG_DATAOBJECT_TYPE_Grids, SG_DATAOBJECT_TYPE_PointCloud, SG_DATAOBJECT_TYPE_Shapes, SG_DATAOBJECT_TYPE_Table, SG_DATAOBJECT_TYPE_TIN, SG_File_Delete(), SG_File_Exists(), and SG_File_Set_Extension().

◆ Destroy()

bool CSG_Data_Object::Destroy ( void  )
virtual

◆ Fmt_Name() [1/2]

void CSG_Data_Object::Fmt_Name ( const char *  Format,
  ... 
)

Definition at line 248 of file dataobject.cpp.

References Set_Name().

◆ Fmt_Name() [2/2]

void CSG_Data_Object::Fmt_Name ( const wchar_t *  Format,
  ... 
)

Definition at line 267 of file dataobject.cpp.

References Set_Name().

◆ Get_Description()

const SG_Char * CSG_Data_Object::Get_Description ( void  ) const

◆ Get_Extent()

virtual const CSG_Rect& CSG_Data_Object::Get_Extent ( void  )
pure virtual

◆ Get_File_Name()

◆ Get_File_Type()

int CSG_Data_Object::Get_File_Type ( void  ) const

Definition at line 350 of file dataobject.cpp.

◆ Get_History() [1/2]

◆ Get_History() [2/2]

const CSG_MetaData& CSG_Data_Object::Get_History ( void  ) const
inline

Definition at line 228 of file dataobject.h.

◆ Get_Max_Samples()

◆ Get_MetaData()

CSG_MetaData& CSG_Data_Object::Get_MetaData ( void  ) const
inline

Definition at line 225 of file dataobject.h.

Referenced by CSG_Table::Assign(), and CSG_Grid::Create().

◆ Get_MetaData_DB()

CSG_MetaData& CSG_Data_Object::Get_MetaData_DB ( void  ) const
inline

Definition at line 226 of file dataobject.h.

Referenced by CSG_Grids::Create(), CSG_Table::Load(), and CSG_Table::Save().

◆ Get_Name()

◆ Get_NoData_Value()

◆ Get_ObjectType()

◆ Get_Owner()

CSG_Data_Object* CSG_Data_Object::Get_Owner ( void  ) const
inline

◆ Get_Projection() [1/2]

◆ Get_Projection() [2/2]

const CSG_Projection & CSG_Data_Object::Get_Projection ( void  ) const

Definition at line 584 of file dataobject.cpp.

References m_pOwner.

◆ Get_Update_Flag()

bool CSG_Data_Object::Get_Update_Flag ( void  )
inlineprotected

Definition at line 274 of file dataobject.h.

Referenced by On_NoData_Changed().

◆ is_File_Native()

bool CSG_Data_Object::is_File_Native ( void  ) const
inline

Definition at line 206 of file dataobject.h.

◆ is_Modified()

virtual bool CSG_Data_Object::is_Modified ( void  ) const
inlinevirtual

Reimplemented in CSG_Grids.

Definition at line 219 of file dataobject.h.

Referenced by CSG_Grids::is_Modified(), and CSG_Table::Set_Modified().

◆ is_NoData_Value()

◆ is_Valid()

◆ Load_MetaData() [1/2]

◆ Load_MetaData() [2/2]

◆ On_Delete()

virtual bool CSG_Data_Object::On_Delete ( void  )
protectedpure virtual

Implemented in CSG_TIN, CSG_Table, CSG_Shapes, CSG_PointCloud, CSG_Grids, and CSG_Grid.

Referenced by Delete().

◆ On_NoData_Changed()

bool CSG_Data_Object::On_NoData_Changed ( void  )
protectedvirtual

Reimplemented in CSG_Table.

Definition at line 542 of file dataobject.cpp.

References Get_Update_Flag(), and Set_Update_Flag().

Referenced by CSG_Table::On_NoData_Changed(), and Set_NoData_Value_Range().

◆ On_Reload()

virtual bool CSG_Data_Object::On_Reload ( void  )
protectedpure virtual

Implemented in CSG_TIN, CSG_Table, CSG_Shapes, CSG_PointCloud, CSG_Grids, and CSG_Grid.

Referenced by Reload().

◆ On_Update()

virtual bool CSG_Data_Object::On_Update ( void  )
inlineprotectedvirtual

Reimplemented in CSG_TIN, CSG_Table, CSG_Shapes, CSG_PointCloud, CSG_Grids, and CSG_Grid.

Definition at line 275 of file dataobject.h.

Referenced by CSG_Table::On_Update(), and Update().

◆ Reload()

bool CSG_Data_Object::Reload ( void  )

If there is an associated file data can be reloaded with this command.

Definition at line 366 of file dataobject.cpp.

References On_Reload(), and SG_File_Exists().

◆ Save() [1/3]

virtual bool CSG_Data_Object::Save ( const char *  File,
int  Format = 0 
)
pure virtual

◆ Save() [2/3]

virtual bool CSG_Data_Object::Save ( const CSG_String File,
int  Format = 0 
)
pure virtual

◆ Save() [3/3]

virtual bool CSG_Data_Object::Save ( const wchar_t *  File,
int  Format = 0 
)
pure virtual

◆ Save_History_to_Model()

bool CSG_Data_Object::Save_History_to_Model ( const CSG_String File) const

Definition at line 748 of file dataobject.cpp.

References Get_History(), and CSG_Tool_Chain::Save_History_to_Model().

◆ Save_MetaData() [1/2]

◆ Save_MetaData() [2/2]

◆ Set_Description()

void CSG_Data_Object::Set_Description ( const CSG_String Description)

Definition at line 296 of file dataobject.cpp.

Referenced by CSG_Grid::Create(), CSG_Table::Create(), and Load_MetaData().

◆ Set_File_Name() [1/2]

void CSG_Data_Object::Set_File_Name ( const CSG_String FileName)

◆ Set_File_Name() [2/2]

void CSG_Data_Object::Set_File_Name ( const CSG_String FileName,
bool  bNative 
)
protected

Definition at line 313 of file dataobject.cpp.

References CSG_String::Clear(), CSG_String::is_Empty(), and SG_File_Get_Name().

◆ Set_File_Type()

void CSG_Data_Object::Set_File_Type ( int  Type)
inlineprotected

Definition at line 263 of file dataobject.h.

Referenced by CSG_Table::Save().

◆ Set_Max_Samples()

bool CSG_Data_Object::Set_Max_Samples ( sLong  Max_Samples)
virtual

Reimplemented in CSG_Grids.

Definition at line 558 of file dataobject.cpp.

References Min_Samples, and Update().

Referenced by CSG_Grid::Create(), and CSG_Grids::Set_Max_Samples().

◆ Set_Modified()

virtual void CSG_Data_Object::Set_Modified ( bool  bOn = true)
inlinevirtual

◆ Set_Name()

◆ Set_NoData_Value()

bool CSG_Data_Object::Set_NoData_Value ( double  Value)
virtual

◆ Set_NoData_Value_Range()

bool CSG_Data_Object::Set_NoData_Value_Range ( double  Lower,
double  Upper 
)
virtual

◆ Set_Owner()

void CSG_Data_Object::Set_Owner ( CSG_Data_Object pOwner)
inline

Definition at line 223 of file dataobject.h.

Referenced by CSG_Grids::Del_Grid(), and CSG_Grids::Del_Grids().

◆ Set_Update_Flag()

◆ Update()

Member Data Documentation

◆ m_pOwner

CSG_Data_Object* CSG_Data_Object::m_pOwner
protected

Definition at line 259 of file dataobject.h.

Referenced by CSG_Data_Object(), Get_Description(), Get_File_Name(), and Get_Projection().


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