SAGA API  v9.9
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)   { SG_UI_Msg_Add(Text, true, Style); if( has_GUI() ) { SG_UI_Msg_Add_Execution(Text, true, Style); } }
 
#define _TOOL_EXCEPTION
 
#define INIT_STRETCH_OPTIONS(method)
 
#define INIT_CLASSIFY_OPTIONS(method)
 
#define GET_ID1(p)
 
#define GET_ID2(p, s)   CSG_String::Format("%s_%s", GET_ID1(p), s).c_str()
 

Macro Definition Documentation

◆ _TOOL_EXCEPTION

#define _TOOL_EXCEPTION

◆ ADD_MESSAGE_EXECUTION

#define ADD_MESSAGE_EXECUTION (   Text,
  Style 
)    { SG_UI_Msg_Add(Text, true, Style); if( has_GUI() ) { SG_UI_Msg_Add_Execution(Text, true, Style); } }

◆ 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()

◆ GET_ID2

#define GET_ID2 (   p,
 
)    CSG_String::Format("%s_%s", GET_ID1(p), s).c_str()

◆ 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);

Definition at line 1198 of file tool.cpp.

◆ 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 1135 of file tool.cpp.

CSG_String::Format
static CSG_String Format(const char *Format,...)
Definition: api_string.cpp:270