61#define SG_XML_SYSTEM SG_T("system")
62#define SG_XML_SYSTEM_VER SG_T("version")
63#define SG_XML_SYSTEM_MLP SG_T("library-path")
64#define SG_XML_LIBRARY SG_T("library")
65#define SG_XML_LIBRARY_PATH SG_T("path")
66#define SG_XML_LIBRARY_NAME SG_T("name")
67#define SG_XML_LIBRARY_CATEGORY SG_T("category")
68#define SG_XML_TOOL SG_T("module")
69#define SG_XML_TOOL_ATT_NAME SG_T("name")
70#define SG_XML_TOOL_ATT_ID SG_T("id")
71#define SG_XML_TOOL_ATT_VERSION SG_T("version")
72#define SG_XML_TOOL_ATT_AUTHOR SG_T("author")
73#define SG_XML_SPECIFICATION SG_T("specification")
74#define SG_XML_SPEC_ATT_GRID SG_T("grid")
75#define SG_XML_SPEC_ATT_INTERA SG_T("interactive")
76#define SG_XML_MENU SG_T("menu")
77#define SG_XML_DESCRIPTION SG_T("description")
78#define SG_XML_PARAM SG_T("parameter")
79#define SG_XML_PARAM_ATT_NAME SG_T("name")
80#define SG_XML_PARAM_ATT_CLASS SG_T("class")
81#define SG_XML_PARAM_MANDATORY SG_T("mandatory")
82#define SG_XML_PARAM_WITH_GUI SG_T("with_gui")
83#define SG_XML_PARAM_WITH_CMD SG_T("with_cmd")
84#define SG_XML_PARAM_TYPE SG_T("type")
85#define SG_XML_PARAM_IDENTIFIER SG_T("identifier")
86#define SG_XML_PARAM_PARENT SG_T("parent")
87#define SG_XML_PARAM_LIST SG_T("list")
88#define SG_XML_PARAM_ITEM SG_T("item")
89#define SG_XML_PARAM_TABLE SG_T("table")
90#define SG_XML_PARAM_FIELD SG_T("field")
91#define SG_XML_PARAM_FIELD_ATT_NAME SG_T("name")
92#define SG_XML_PARAM_FIELD_ATT_TYPE SG_T("type")
93#define SG_XML_PARAM_MIN SG_T("min")
94#define SG_XML_PARAM_MAX SG_T("max")
95#define SG_XML_PARAM_DEFAULT SG_T("default")
98#define SG_GET_XML_TAGGED_STR(value, tag) CSG_String::Format("<%s>%s</%s>", tag, value, tag)
99#define SG_GET_XML_TAGGED_INT(value, tag) CSG_String::Format("<%s>%d</%s>", tag, value, tag)
100#define SG_GET_XML_TAGGED_FLT(value, tag) CSG_String::Format("<%s>%f</%s>", tag, value, tag)
112 if( !ID.is_Empty() ) { ID +=
"_"; } ID += pParameter->
Get_Identifier();
172 for(
int i=0; i<pParameter->
asChoice()->Get_Count(); i++)
189 for(
int i=0; i<pParameter->
asChoices()->Get_Item_Count(); i++)
219 for(
int i=0; i<pParameter->
asTable()->Get_Field_Count(); i++)
245 for(
int i=0; i<pParameter->
asParameters()->Get_Count(); i++)
319 #define SUMMARY_ADD_STR(label, value) CSG_String::Format("<tr><td valign=\"top\"><b>%s</b></td><td valign=\"top\">%s</td></tr>", label, value)
320 #define SUMMARY_ADD_INT(label, value) CSG_String::Format("<tr><td valign=\"top\"><b>%s</b></td><td valign=\"top\">%d</td></tr>", label, value)
352 sMenu.
Replace(
"|",
" <b>></b> ");
360 #undef SUMMARY_ADD_STR
361 #undef SUMMARY_ADD_INT
385 s +=
CSG_String::Format(
"<table border=\"1\" width=\"100%%\" valign=\"top\" cellpadding=\"5\" rules=\"all\"><tr><th>%s</th><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>\n",
386 _TL(
"Name"),
_TL(
"Type"),
_TL(
"Identifier"),
_TL(
"Description"),
_TL(
"Constraints")
390 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
401 s +=
CSG_String::Format(
"<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
412 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
423 s +=
CSG_String::Format(
"<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
434 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
445 s +=
CSG_String::Format(
"<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
466 #define SUMMARY_ADD_STR(label, value) CSG_String::Format("%s:\t%s\n", label, value)
467 #define SUMMARY_ADD_INT(label, value) CSG_String::Format("%s:\t%d\n", label, value)
497 #undef SUMMARY_ADD_STR
498 #undef SUMMARY_ADD_INT
501 s +=
"\n____________________________\n";
510 s +=
"\n____________________________\n";
519 Reference.
Replace(
"</b>" ,
"");
520 Reference.
Replace(
"<a href=\"",
"");
521 Reference.
Replace(
"\">" ,
" (");
522 Reference.
Replace(
"</a>" ,
")");
524 s +=
" - " + Reference +
"\n";
534 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
543 s +=
"____________________________\n";
558 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
567 s +=
"____________________________\n";
582 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
591 s +=
"____________________________\n";
632 s +=
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
658 #define SUMMARY_ADD_STR(label, value) CSG_String::Format("<tr><td valign=\"top\"><b>%s</b></td><td valign=\"top\">%s</td></tr>", label, value)
659 #define SUMMARY_ADD_INT(label, value) CSG_String::Format("<tr><td valign=\"top\"><b>%s</b></td><td valign=\"top\">%d</td></tr>", label, value)
663 s +=
"<table border=\"0\">";
692 s +=
"<table border=\"0\">";
708 #undef SUMMARY_ADD_STR
709 #undef SUMMARY_ADD_INT
827 s +=
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
831 for(
int i=0; i<Libraries.
Get_Count(); i++)
843 #define SUMMARY_ADD_INT(label, value) CSG_String::Format("<tr><td valign=\"top\"><b>%s</b></td><td valign=\"top\">%d</td></tr>", label, value)
847 s +=
"<table border=\"0\">";
856 s +=
CSG_String::Format(
"<tr align=\"left\"><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>",
863 for(
int i=0; i<Libraries.
Get_Count(); i++)
866 Libraries[i].asString(0),
867 Libraries[i].asInt (1),
868 Libraries[i].asString(2),
869 Libraries[i].asString(3)
875 #undef SUMMARY_ADD_INT
884 for(
int i=0; i<Libraries.
Get_Count(); i++)
886 if( Libraries[i].asInt(4) == 0 )
CSG_String SG_Data_Type_Get_Name(TSG_Data_Type Type, bool bShort)
SAGA_API_DLL_EXPORT CSG_String SG_HTML_Tag_Replacer(const CSG_String &Text)
SAGA_API_DLL_EXPORT bool SG_Dir_Create(const CSG_String &Directory, bool bFullPath=false)
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path(const CSG_String &full_Path)
SAGA_API_DLL_EXPORT CSG_String SG_File_Make_Path(const CSG_String &Directory, const CSG_String &Name)
virtual bool Open(const SG_Char *FileName, int Mode=SG_FILE_R, bool bBinary=true, int Encoding=SG_FILE_ENCODING_ANSI)
size_t Write(void *Buffer, size_t Size, size_t Count=1) const
const SG_Char * Get_Item(int Index) const
const CSG_String & Get_Item(int i) const
double Get_Minimum(void) const
double Get_Maximum(void) const
bool has_Maximum(void) const
bool has_Minimum(void) const
const SG_Char * Get_Identifier(void) const
class CSG_Parameters * asParameters(void) const
CSG_String Get_Type_Name(void) const
bool is_Optional(void) const
TSG_Data_Object_Type Get_DataObject_Type(void) const
class CSG_Parameter_Choice * asChoice(void) const
class CSG_Parameter_Value * asValue(void) const
CSG_Parameter * Get_Parent(void) const
virtual TSG_Parameter_Type Get_Type(void) const =0
bool is_Input(void) const
const SG_Char * Get_Name(void) const
class CSG_Parameter_Choices * asChoices(void) const
bool is_Option(void) const
bool is_Output(void) const
bool do_UseInCMD(void) const
const CSG_String & Get_Default(void) const
CSG_Table * asTable(void) const
const SG_Char * Get_Description(void) const
bool do_UseInGUI(void) const
CSG_Parameter * Get_Parameter(int i) const
size_t Length(void) const
size_t Replace(const CSG_String &Old, const CSG_String &New, bool bReplaceAll=true)
static CSG_String Format(const char *Format,...)
const SG_Char * c_str(void) const
CSG_String & Make_Lower(void)
bool is_Empty(void) const
int Get_Count(void) const
const SG_Char * Get_Field_Name(int Field) const
sLong Get_Count(void) const
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
bool Set_Index(CSG_Index &Index, int Field, bool bAscending=true) const
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
virtual bool Set_Value(sLong Index, int Field, const SG_Char *Value)
TSG_Data_Type Get_Field_Type(int Field) const
CSG_String SG_Get_DataObject_Name(TSG_Data_Object_Type Type)
#define PARAMETER_DESCRIPTION_PROPERTIES
#define PARAMETER_DESCRIPTION_TYPE
@ PARAMETER_TYPE_FixedTable
@ PARAMETER_TYPE_Table_Fields
@ PARAMETER_TYPE_DataObject_Output
@ PARAMETER_TYPE_Grid_System
@ PARAMETER_TYPE_Data_Type
@ PARAMETER_TYPE_Table_Field
@ PARAMETER_TYPE_Parameters
@ PARAMETER_TYPE_FilePath