|
SAGA API
v9.6
|
Go to the documentation of this file.
53 #ifndef HEADER_INCLUDED__SAGA_API__dataobject_H
54 #define HEADER_INCLUDED__SAGA_API__dataobject_H
89 #define SG_META_SOURCE "SOURCE"
90 #define SG_META_FILEPATH "FILE"
91 #define SG_META_DATABASE "DATABASE"
92 #define SG_META_PROJECTION "PROJECTION"
93 #define SG_META_HISTORY "HISTORY"
129 #define DATAOBJECT_NOTSET ((void *)NULL)
130 #define DATAOBJECT_CREATE ((void *)1)
187 virtual bool Destroy (
void);
200 virtual bool Save (
const char *File,
int Format = 0) = 0;
201 virtual bool Save (
const wchar_t *File,
int Format = 0) = 0;
209 void Set_File_Name (
const CSG_String &FileName);
210 const SG_Char * Get_File_Name (
bool bNative =
true)
const;
211 int Get_File_Type (
void)
const;
218 void Set_Name (
const char *Name);
219 void Set_Name (
const wchar_t *Name);
220 void Fmt_Name (
const char *Format, ...);
221 void Fmt_Name (
const wchar_t *Format, ...);
222 const SG_Char * Get_Name (
void)
const;
224 void Set_Description (
const CSG_String &Description);
225 const SG_Char * Get_Description (
void)
const;
227 virtual void Set_Modified (
bool bOn =
true) { m_bModified = bOn;
if( bOn && m_pOwner ) m_pOwner->Set_Modified(bOn); }
229 bool Update (
bool bForce =
false);
253 double Get_NoData_Value (
bool bUpper =
false)
const {
return( m_NoData_Value[bUpper ? 1 : 0] ); }
257 return(
SG_is_NaN(Value) || (m_NoData_Value[0] < m_NoData_Value[1] ? m_NoData_Value[0] <= Value && Value <= m_NoData_Value[1] : Value == m_NoData_Value[0]) );
266 static void Track (
bool Track =
true,
bool Offset =
false);
294 static int m_Track_nObjects;
295 static int m_Track_Offset;
297 bool m_bModified, m_bUpdate, m_File_bNative;
299 int m_RefID, m_File_Type, m_Managed{0};
303 double m_NoData_Value[2];
308 CSG_MetaData m_MetaData, *m_pMD_Source, *m_pMD_History, *m_pMD_Database;
331 #endif // #ifndef HEADER_INCLUDED__SAGA_API__dataobject_H
SAGA_API_DLL_EXPORT CSG_String SG_Get_DataObject_Identifier(TSG_Data_Object_Type Type)
SAGA_API_DLL_EXPORT int SG_Get_History_Ignore_Lists(void)
sLong Get_Max_Samples(void) const
CSG_Data_Object * m_pOwner
SAGA_API_DLL_EXPORT bool SG_DataObject_Set_Max_Samples(sLong Max_Samples)
virtual bool On_Reload(void)=0
void Set_File_Name(const CSG_String &FileName)
virtual bool On_Delete(void)=0
CSG_MetaData & Get_History(void)
int Get_Managed(void) const
double Get_NoData_Value(bool bUpper=false) const
bool Save_MetaData(const CSG_String &FileName)
virtual bool Save(const wchar_t *File, int Format=0)=0
bool is_NoData_Value(double Value) const
SAGA_API_DLL_EXPORT CSG_String SG_Get_DataObject_Class_Name(TSG_Data_Object_Type Type)
virtual bool Save(const CSG_String &File, int Format=0)=0
@ SG_DATAOBJECT_TYPE_Grids
class CSG_TIN * asTIN(bool bPolymorph=false) const
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.
SAGA_API_DLL_EXPORT void * SG_Get_Create_Pointer(void)
SAGA_API_DLL_EXPORT bool SG_Data_Object_Delete(CSG_Data_Object *pObject)
void Set_Update_Flag(bool bOn=true)
SAGA_API_DLL_EXPORT void SG_Set_History_Depth(int Depth)
CSG_Data_Object * Get_Owner(void) const
virtual bool Set_Max_Samples(sLong Max_Samples)
class CSG_Shapes * asShapes(bool bPolymorph=false) const
SAGA_API_DLL_EXPORT int SG_Get_History_Depth(void)
virtual bool On_NoData_Changed(void)
class CSG_Grids * asGrids(bool bPolymorph=false) const
virtual const CSG_Rect & Get_Extent(void)=0
virtual bool On_Update(void)
virtual bool is_Modified(void) const
void Set_File_Type(int Type)
#define SAGA_API_DLL_EXPORT
virtual void Set_Modified(bool bOn=true)
class CSG_Table * asTable(bool bPolymorph=false) const
@ SG_DATAOBJECT_TYPE_Grid
int Get_RefID(void) const
Returns the object's reference id (unique).
@ SG_DATAOBJECT_TYPE_Shapes
bool is_File_Native(void) const
bool Get_Update_Flag(void)
const CSG_MetaData & Get_History(void) const
@ SG_DATAOBJECT_TYPE_Undefined
class CSG_Grid * asGrid(bool bPolymorph=false) const
@ SG_DATAOBJECT_TYPE_Table
virtual bool Save(const char *File, int Format=0)=0
bool Save_History_to_Model(const CSG_String &File) const
CSG_MetaData & Get_MetaData_DB(void) const
CSG_MetaData & Get_MetaData(void) const
SAGA_API_DLL_EXPORT CSG_String SG_Get_DataObject_Name(TSG_Data_Object_Type Type)
bool Load_MetaData(const CSG_String &FileName)
class CSG_PointCloud * asPointCloud(bool bPolymorph=false) const
void Set_Owner(CSG_Data_Object *pOwner)
static void Track(bool Track=true, bool Offset=false)
Activate/deactivate lifetime tracking (data object construction/destruction). Needs compiler flag WIT...
virtual bool Set_NoData_Value(double Value)
virtual bool Set_NoData_Value_Range(double loValue, double hiValue)
SAGA_API_DLL_EXPORT sLong SG_DataObject_Get_Max_Samples(void)
bool Delete(CSG_Data_Object *pObject, bool bDetach=false)
SAGA_API_DLL_EXPORT void SG_Set_History_Ignore_Lists(int Ignore)
@ SG_DATAOBJECT_TYPE_PointCloud
virtual bool is_Valid(void) const =0