SAGA API v9.10
Loading...
Searching...
No Matches
tool.cpp File Reference
#include "saga_api.h"
#include "data_manager.h"
#include "tool.h"
#include "tool_chain.h"
#include <wx/string.h>
#include <wx/cmdline.h>

Go to the source code of this file.

Macros

#define ADD_MESSAGE_EXECUTION(Text, Style)
#define _TOOL_EXCEPTION
#define INIT_STRETCH_OPTIONS(method)
#define INIT_CLASSIFY_OPTIONS(method)
#define GET_ID1(p)
#define GET_ID2(p, s)

Macro Definition Documentation

◆ _TOOL_EXCEPTION

#define _TOOL_EXCEPTION

◆ ADD_MESSAGE_EXECUTION

#define ADD_MESSAGE_EXECUTION ( Text,
Style )
Value:
{ SG_UI_Msg_Add(Text, true, Style); if( has_GUI() ) { SG_UI_Msg_Add_Execution(Text, true, Style); } }
void SG_UI_Msg_Add(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
void SG_UI_Msg_Add_Execution(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)

Referenced by CSG_Tool::Execute(), and CSG_Tool_Interactive_Base::Execute_Finish().

◆ GET_ID1

#define GET_ID1 ( p)
Value:
(p->Get_Parameters()->Get_Identifier().Length() > 0 \
? CSG_String::Format("%s_%s", p->Get_Parameters()->Get_Identifier().c_str(), p->Get_Identifier()) \
: CSG_String::Format(p->Get_Identifier())).c_str()
static CSG_String Format(const char *Format,...)

◆ GET_ID2

#define GET_ID2 ( p,
s )
Value:
CSG_String::Format("%s_%s", GET_ID1(p), s).c_str()
const SG_Char * c_str(void) const
#define GET_ID1(p)

◆ INIT_CLASSIFY_OPTIONS

#define INIT_CLASSIFY_OPTIONS ( method)
Value:
if( !pDataObject || (pDataObject->asTable(true) && (Field < 0 || Field >= pDataObject->asTable(true)->Get_Field_Count())) ) { return( false ); }\
CSG_MetaData Options; Options.Add_Child("METHOD", method); Options.Add_Child("COLORS", Colors); Options.Add_Child("FIELD", Field);
CSG_MetaData * Add_Child(void)
Definition metadata.cpp:166

Definition at line 1199 of file tool.cpp.

Referenced by CSG_Tool::DataObject_Classify_Defined(), CSG_Tool::DataObject_Classify_Equal(), CSG_Tool::DataObject_Classify_Geometric(), CSG_Tool::DataObject_Classify_Natural(), CSG_Tool::DataObject_Classify_Quantile(), CSG_Tool::DataObject_Classify_StdDev(), and CSG_Tool::DataObject_Classify_Unique().

◆ INIT_STRETCH_OPTIONS

#define INIT_STRETCH_OPTIONS ( method)
Value:
{ if( !pDataObject || (pDataObject->asTable(true) && (Field < 0 || Field >= pDataObject->asTable(true)->Get_Field_Count())) ) { return( false ); }\
if( Colors >= 0 ) { DataObject_Set_Colors(pDataObject, -1, Colors); }\
DataObject_Set_Parameter(pDataObject, "COLORS_TYPE" , 3); /* graduated colors */\
DataObject_Set_Parameter(pDataObject, "STRETCH_DEFAULT" , method);\
DataObject_Set_Parameter(pDataObject, "METRIC_SCALE_MODE", Interval_Mode);\
DataObject_Set_Parameter(pDataObject, "METRIC_SCALE_LOG" , Interval_Log );\
if( pDataObject->asTable(true) )\
{ DataObject_Set_Parameter(pDataObject, "METRIC_FIELD" , Field);\
DataObject_Set_Parameter(pDataObject, "METRIC_MORMAL", pDataObject->asTable(true)->Get_Field_Count());\
}\
}

Definition at line 1136 of file tool.cpp.

Referenced by CSG_Tool::DataObject_Set_Stretch(), CSG_Tool::DataObject_Set_Stretch_Linear(), CSG_Tool::DataObject_Set_Stretch_Percentile(), and CSG_Tool::DataObject_Set_Stretch_StdDev().