SAGA API  v9.5
CSG_Tool_Grid Class Reference

#include <tool.h>

Inheritance diagram for CSG_Tool_Grid:
CSG_Tool CSG_Tool_Grid_Interactive

Public Member Functions

 CSG_Tool_Grid (void)
 
virtual ~CSG_Tool_Grid (void)
 
virtual TSG_Tool_Type Get_Type (void) const
 
const CSG_Grid_SystemGet_System (void) const
 
bool Set_System (const CSG_Grid_System &System)
 
virtual bool is_Grid (void) const
 
- Public Member Functions inherited from CSG_Tool
 CSG_Tool (void)
 
virtual ~CSG_Tool (void)
 
virtual void Destroy (void)
 
const CSG_StringGet_ID (void) const
 
const CSG_StringGet_Library (void) const
 
const CSG_StringGet_File_Name (void) const
 
const CSG_StringGet_Name (void) const
 
const CSG_StringGet_Author (void) const
 
const CSG_StringGet_Version (void) const
 
const CSG_StringGet_Description (void) const
 
const CSG_StringsGet_References (void) const
 
const SG_CharGet_Icon (void)
 
CSG_String Get_Summary (bool bParameters=true, const CSG_String &Menu="", const CSG_String &Description="", int Format=SG_SUMMARY_FMT_HTML)
 
virtual CSG_String Get_MenuPath (void)
 
virtual CSG_String Get_MenuPath (bool bSolved)
 
CSG_ParametersGet_Parameters (void)
 
int Get_Parameters_Count (void) const
 
CSG_ParametersGet_Parameters (int i) const
 
CSG_ParametersGet_Parameters (int i)
 
CSG_ParametersGet_Parameters (const CSG_String &Identifier) const
 
CSG_ParameterGet_Parameter (const CSG_String &ID) const
 
CSG_ParameterGet_Parameter (const char *ID) const
 
CSG_ParameterGet_Parameter (const wchar_t *ID) const
 
bool Set_Parameter (const CSG_String &ID, CSG_Parameter *pValue)
 
bool Set_Parameter (const char *ID, CSG_Parameter *pValue)
 
bool Set_Parameter (const wchar_t *ID, CSG_Parameter *pValue)
 
bool Set_Parameter (const CSG_String &ID, int Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const char *ID, int Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const wchar_t *ID, int Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const CSG_String &ID, double Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const char *ID, double Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const wchar_t *ID, double Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const CSG_String &ID, void *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const char *ID, void *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const wchar_t *ID, void *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const CSG_String &ID, const CSG_String &Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const char *ID, const CSG_String &Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const wchar_t *ID, const CSG_String &Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const CSG_String &ID, const char *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const char *ID, const char *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const wchar_t *ID, const char *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const CSG_String &ID, const wchar_t *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const char *ID, const wchar_t *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Set_Parameter (const wchar_t *ID, const wchar_t *Value, int Type=PARAMETER_TYPE_Undefined)
 
bool Reset (bool bManager=true)
 
bool Reset_Manager (void)
 
bool Reset_Grid_System (void)
 
bool Update_Parameter_States (void)
 
void Set_Callback (bool bActive=true)
 
bool Set_Manager (class CSG_Data_Manager *pManager)
 
class CSG_Data_ManagerGet_Manager (void) const
 
class CSG_Data_ManagerCreate_Manager (void)
 
bool Delete_Manager (bool bDetachData=false, bool bReset=true)
 
bool Set_Grid_System (const CSG_Grid_System &System)
 
CSG_Grid_SystemGet_Grid_System (void) const
 
bool Settings_Push (class CSG_Data_Manager *pManager=NULL)
 
bool Settings_Pop (void)
 
virtual bool do_Sync_Projections (void) const
 
virtual bool needs_GUI (void) const
 
bool has_GUI (void) const
 
bool has_CMD (void) const
 
virtual bool is_Interactive (void) const
 
bool is_Progress (void) const
 
bool is_Executing (void) const
 
void Set_Show_Progress (bool bOn=true)
 
virtual bool On_Before_Execution (void)
 
virtual bool On_After_Execution (void)
 
bool Execute (bool bAddHistory=false)
 
const SG_CharGet_Execution_Info (void) const
 
CSG_String Get_Script (TSG_Tool_Script_Type Type, bool bHeader=true, bool bAllParameters=false)
 

Protected Member Functions

virtual bool Set_Progress_Cells (sLong Cell) const
 
virtual bool Set_Progress_Rows (int Row) const
 
int Get_NX (void) const
 
int Get_NY (void) const
 
sLong Get_NCells (void) const
 
double Get_XMin (void) const
 
double Get_YMin (void) const
 
double Get_XMax (void) const
 
double Get_YMax (void) const
 
double Get_Cellsize (void) const
 
double Get_Cellarea (void) const
 
double Get_Length (int i) const
 
double Get_UnitLength (int i) const
 
bool is_InGrid (int x, int y) const
 
bool is_InGrid (int x, int y, int Rand) const
 
void Lock_Create (void)
 
void Lock_Destroy (void)
 
bool is_Locked (int x, int y)
 
char Lock_Get (int x, int y)
 
void Lock_Set (int x, int y, char Value=1)
 
- Protected Member Functions inherited from CSG_Tool
void Set_Name (const CSG_String &String)
 
void Set_Author (const CSG_String &String)
 
void Set_Version (const CSG_String &String)
 
void Set_Description (const CSG_String &String)
 
void Add_Reference (const CSG_String &Authors, const CSG_String &Year, const CSG_String &Title, const CSG_String &Where, const SG_Char *Link=NULL, const SG_Char *Link_Text=NULL)
 
void Add_Reference (const CSG_String &Link, const SG_Char *Link_Text=NULL)
 
virtual bool On_Execute (void)=0
 
virtual int On_Parameter_Changed (CSG_Parameters *pParameters, CSG_Parameter *pParameter)
 
virtual int On_Parameters_Enable (CSG_Parameters *pParameters, CSG_Parameter *pParameter)
 
TSG_PFNC_Parameter_Changed Get_Parameter_Changed (void)
 
CSG_ParametersAdd_Parameters (const CSG_String &Identifier, const CSG_String &Name, const CSG_String &Description)
 
bool Dlg_Parameters (const CSG_String &Identifier)
 
bool Dlg_Parameters (CSG_Parameters *pParameters, const CSG_String &Caption="")
 
bool Dlg_Parameters (CSG_Parameters &Parameters, const CSG_String &Caption="")
 
virtual bool Set_Progress (int Position, int Range) const
 
virtual bool Set_Progress (sLong Position, sLong Range) const
 
virtual bool Set_Progress (double Position, double Range=1.) const
 
bool Stop_Execution (bool bDialog=true)
 
void Message_Dlg (const CSG_String &Text, const SG_Char *Caption=NULL)
 
bool Message_Dlg_Confirm (const CSG_String &Text, const SG_Char *Caption=NULL)
 
void Message_Add (const CSG_String &Text, bool bNewLine=true)
 
void Message_Fmt (const char *Format,...)
 
void Message_Fmt (const wchar_t *Format,...)
 
bool Error_Set (TSG_Tool_Error Error_ID=TOOL_ERROR_Unknown)
 
bool Error_Set (const CSG_String &Text)
 
bool Error_Fmt (const char *Format,...)
 
bool Error_Fmt (const wchar_t *Format,...)
 
bool DataObject_Add (CSG_Data_Object *pDataObject, bool bUpdate=false)
 
void DataObject_Update_All (void)
 
bool DataObject_Set_History (CSG_Parameter *pParameter, CSG_MetaData *pHistory=NULL)
 
bool Get_Projection (CSG_Projection &Projection) const
 

Static Protected Member Functions

static int Get_xTo (int i, int x=0)
 
static int Get_yTo (int i, int y=0)
 
static int Get_xFrom (int i, int x=0)
 
static int Get_yFrom (int i, int y=0)
 

Additional Inherited Members

- Static Public Member Functions inherited from CSG_Tool
static bool Process_Get_Okay (bool bBlink=false)
 
static void Process_Set_Text (const CSG_String &Text)
 
static void Process_Set_Text (const char *Format,...)
 
static void Process_Set_Text (const wchar_t *Format,...)
 
static bool DataObject_Update (CSG_Data_Object *pDataObject, int Show=SG_UI_DATAOBJECT_UPDATE)
 
static bool DataObject_Update (CSG_Data_Object *pDataObject, double Minimum, double Maximum, int Show=SG_UI_DATAOBJECT_UPDATE)
 
static bool DataObject_Get_Colors (CSG_Data_Object *pDataObject, CSG_Colors &Colors)
 
static bool DataObject_Set_Colors (CSG_Data_Object *pDataObject, const CSG_Colors &Colors)
 
static bool DataObject_Set_Colors (CSG_Data_Object *pDataObject, int nColors, int Palette=SG_COLORS_DEFAULT, bool bRevert=false)
 
static bool DataObject_Get_Parameters (CSG_Data_Object *pDataObject, CSG_Parameters &Parameters)
 
static bool DataObject_Set_Parameters (CSG_Data_Object *pDataObject, CSG_Parameters &Parameters)
 
static bool DataObject_Set_Parameters (CSG_Data_Object *pDataObject, CSG_Data_Object *pCopy)
 
static CSG_ParameterDataObject_Get_Parameter (CSG_Data_Object *pDataObject, const CSG_String &ID)
 
static bool DataObject_Set_Parameter (CSG_Data_Object *pDataObject, CSG_Parameter *pParameter)
 
static bool DataObject_Set_Parameter (CSG_Data_Object *pDataObject, CSG_Data_Object *pCopy, const CSG_String &ID)
 
static bool DataObject_Set_Parameter (CSG_Data_Object *pDataObject, const CSG_String &ID, int Value)
 
static bool DataObject_Set_Parameter (CSG_Data_Object *pDataObject, const CSG_String &ID, double Value)
 
static bool DataObject_Set_Parameter (CSG_Data_Object *pDataObject, const CSG_String &ID, void *Value)
 
static bool DataObject_Set_Parameter (CSG_Data_Object *pDataObject, const CSG_String &ID, const SG_Char *Value)
 
static bool DataObject_Set_Parameter (CSG_Data_Object *pDataObject, const CSG_String &ID, double loVal, double hiVal)
 
static int _On_Parameter_Changed (CSG_Parameter *pParameter, int Flags)
 
- Protected Attributes inherited from CSG_Tool
CSG_Parameters Parameters
 
CSG_MetaData History_Supplement
 

Detailed Description

CSG_Tool_Grid.

Definition at line 386 of file tool.h.

Constructor & Destructor Documentation

◆ CSG_Tool_Grid()

CSG_Tool_Grid::CSG_Tool_Grid ( void  )

Definition at line 63 of file tool_grid.cpp.

References CSG_Tool::Parameters, and CSG_Parameters::Use_Grid_System().

◆ ~CSG_Tool_Grid()

CSG_Tool_Grid::~CSG_Tool_Grid ( void  )
virtual

Definition at line 72 of file tool_grid.cpp.

References Lock_Destroy().

Member Function Documentation

◆ Get_Cellarea()

double CSG_Tool_Grid::Get_Cellarea ( void  ) const
inlineprotected

Definition at line 414 of file tool.h.

References Get_Cellarea().

Referenced by Get_Cellarea().

◆ Get_Cellsize()

double CSG_Tool_Grid::Get_Cellsize ( void  ) const
inlineprotected

◆ Get_Length()

double CSG_Tool_Grid::Get_Length ( int  i) const
inlineprotected

Definition at line 416 of file tool.h.

◆ Get_NCells()

sLong CSG_Tool_Grid::Get_NCells ( void  ) const
inlineprotected

Definition at line 408 of file tool.h.

Referenced by Set_Progress_Cells().

◆ Get_NX()

int CSG_Tool_Grid::Get_NX ( void  ) const
inlineprotected

◆ Get_NY()

int CSG_Tool_Grid::Get_NY ( void  ) const
inlineprotected

◆ Get_System()

const CSG_Grid_System& CSG_Tool_Grid::Get_System ( void  ) const
inline

◆ Get_Type()

virtual TSG_Tool_Type CSG_Tool_Grid::Get_Type ( void  ) const
inlinevirtual

Reimplemented from CSG_Tool.

Reimplemented in CSG_Tool_Grid_Interactive.

Definition at line 392 of file tool.h.

References TOOL_TYPE_Grid.

◆ Get_UnitLength()

double CSG_Tool_Grid::Get_UnitLength ( int  i) const
inlineprotected

Definition at line 417 of file tool.h.

References Get_UnitLength().

Referenced by Get_UnitLength().

◆ Get_xFrom()

static int CSG_Tool_Grid::Get_xFrom ( int  i,
int  x = 0 
)
inlinestaticprotected

Definition at line 423 of file tool.h.

References CSG_Grid_System::Get_xFrom().

◆ Get_XMax()

double CSG_Tool_Grid::Get_XMax ( void  ) const
inlineprotected

Definition at line 411 of file tool.h.

◆ Get_XMin()

double CSG_Tool_Grid::Get_XMin ( void  ) const
inlineprotected

◆ Get_xTo()

static int CSG_Tool_Grid::Get_xTo ( int  i,
int  x = 0 
)
inlinestaticprotected

Definition at line 421 of file tool.h.

References CSG_Grid_System::Get_xTo().

◆ Get_yFrom()

static int CSG_Tool_Grid::Get_yFrom ( int  i,
int  y = 0 
)
inlinestaticprotected

Definition at line 424 of file tool.h.

References CSG_Grid_System::Get_yFrom().

◆ Get_YMax()

double CSG_Tool_Grid::Get_YMax ( void  ) const
inlineprotected

Definition at line 412 of file tool.h.

◆ Get_YMin()

double CSG_Tool_Grid::Get_YMin ( void  ) const
inlineprotected

◆ Get_yTo()

static int CSG_Tool_Grid::Get_yTo ( int  i,
int  y = 0 
)
inlinestaticprotected

Definition at line 422 of file tool.h.

References CSG_Grid_System::Get_yTo().

◆ is_Grid()

virtual bool CSG_Tool_Grid::is_Grid ( void  ) const
inlinevirtual

Reimplemented from CSG_Tool.

Definition at line 397 of file tool.h.

◆ is_InGrid() [1/2]

bool CSG_Tool_Grid::is_InGrid ( int  x,
int  y 
) const
inlineprotected

Definition at line 418 of file tool.h.

References is_InGrid().

Referenced by is_InGrid().

◆ is_InGrid() [2/2]

bool CSG_Tool_Grid::is_InGrid ( int  x,
int  y,
int  Rand 
) const
inlineprotected

Definition at line 419 of file tool.h.

References is_InGrid().

Referenced by is_InGrid().

◆ is_Locked()

bool CSG_Tool_Grid::is_Locked ( int  x,
int  y 
)
inlineprotected

Definition at line 430 of file tool.h.

◆ Lock_Create()

void CSG_Tool_Grid::Lock_Create ( void  )
protected

◆ Lock_Destroy()

void CSG_Tool_Grid::Lock_Destroy ( void  )
protected

Definition at line 141 of file tool_grid.cpp.

Referenced by Lock_Create(), and ~CSG_Tool_Grid().

◆ Lock_Get()

char CSG_Tool_Grid::Lock_Get ( int  x,
int  y 
)
inlineprotected

Definition at line 431 of file tool.h.

◆ Lock_Set()

void CSG_Tool_Grid::Lock_Set ( int  x,
int  y,
char  Value = 1 
)
inlineprotected

Definition at line 433 of file tool.h.

◆ Set_Progress_Cells()

bool CSG_Tool_Grid::Set_Progress_Cells ( sLong  Cell) const
protectedvirtual

◆ Set_Progress_Rows()

bool CSG_Tool_Grid::Set_Progress_Rows ( int  Row) const
protectedvirtual

Definition at line 110 of file tool_grid.cpp.

References Get_NY(), and CSG_Tool::Set_Progress().

◆ Set_System()

bool CSG_Tool_Grid::Set_System ( const CSG_Grid_System System)

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