SAGA API  v9.6
tool_interactive_base.cpp File Reference
#include "tool.h"

Go to the source code of this file.

Macros

#define ADD_MESSAGE_EXECUTION(Text, Style)   { SG_UI_Msg_Add(Text, true, Style); if( m_pTool->has_GUI() ) { SG_UI_Msg_Add_Execution(Text, true, Style); } }
 
#define ADD_MESSAGE_TIME(Start)
 

Macro Definition Documentation

◆ ADD_MESSAGE_EXECUTION

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

Definition at line 63 of file tool_interactive_base.cpp.

◆ ADD_MESSAGE_TIME

#define ADD_MESSAGE_TIME (   Start)
Value:
{ CSG_TimeSpan Time = CSG_DateTime::Now() - Start; CSG_String s;\
if( Time.Get_Hours () >= 1 ) { s = Time.Format("%Hh %Mm %Ss"); } else\
if( Time.Get_Minutes () >= 1 ) { s = Time.Format( "%Mm %Ss"); } else\
if( Time.Get_Seconds () >= 1 ) { s = Time.Format( "%Ss"); } else\
if( Time.Get_Milliseconds() >= 1 ) { s = Time.Format("%l ") + _TL("milliseconds"); } else { s = _TL("less than 1 millisecond"); }\
SG_UI_Msg_Add_Execution(CSG_String::Format("\n[%s] %s %s", m_pTool->Get_Name().c_str(), _TL("finished in"), s.c_str()), false);\
}

Definition at line 65 of file tool_interactive_base.cpp.

_TL
#define _TL(s)
Definition: api_core.h:1489
CSG_DateTime::Now
static CSG_DateTime Now(void)
Definition: datetime.cpp:581
CSG_TimeSpan::Get_Hours
int Get_Hours(void) const
Definition: datetime.h:161
CSG_TimeSpan::Get_Milliseconds
sLong Get_Milliseconds(void) const
Definition: datetime.h:164
CSG_TimeSpan
Definition: datetime.h:91
CSG_TimeSpan::Format
CSG_String Format(const CSG_String &format="") const
Definition: datetime.cpp:65
CSG_String::Format
static CSG_String Format(const char *Format,...)
Definition: api_string.cpp:270
CSG_TimeSpan::Get_Minutes
int Get_Minutes(void) const
Definition: datetime.h:162
CSG_TimeSpan::Get_Seconds
sLong Get_Seconds(void) const
Definition: datetime.h:163
CSG_String
Definition: api_core.h:563
CSG_String::c_str
const SG_Char * c_str(void) const
Definition: api_string.cpp:236