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
380 for(
int i=Full.Get_Count()-1; i>=0; i--)
382 if( Full[i].Find(
"<a href") == 0 )
384 Link.
Ins(Full[i], 0); Full.Del(i);
388 if( Full.Get_Count() ) {
for(
int i=0; i<Full.Get_Count(); i++) { s +=
"<p>" + Full[i] +
"</p>"; } }
389 if( Link.
Get_Count() ) {
for(
int i=0; i<Link.
Get_Count(); i++) { s +=
"<p>" + Link[i] +
"</p>"; } }
396 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",
397 _TL(
"Name"),
_TL(
"Type"),
_TL(
"Identifier"),
_TL(
"Description"),
_TL(
"Constraints")
401 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
412 s +=
CSG_String::Format(
"<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
423 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
434 s +=
CSG_String::Format(
"<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
445 #define ADD_PARAMETER_DESC(p) if( bFirst ) { bFirst = 0; s += CSG_String::Format("<tr><th colspan=\"5\">%s</th></tr>", _TL("Options")); }\
446 s += CSG_String::Format("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",\
448 p->Get_Description(PARAMETER_DESCRIPTION_TYPE).c_str(), p->do_UseInCMD() ?\
449 (PrefixID + p->Get_Identifier()).c_str() : SG_T(""),\
450 p->Get_Description(),\
451 p->asParameters() ? SG_T("") : p->Get_Description(PARAMETER_DESCRIPTION_PROPERTIES).c_str()\
454 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
468 for(
int i=0; i<pParameter->
asParameters()->Get_Count(); i++)
493 #define SUMMARY_ADD_STR(label, value) CSG_String::Format("%s:\t%s\n", label, value)
494 #define SUMMARY_ADD_INT(label, value) CSG_String::Format("%s:\t%d\n", label, value)
524 #undef SUMMARY_ADD_STR
525 #undef SUMMARY_ADD_INT
528 s +=
"\n____________________________\n";
549 s +=
"\n____________________________\n";
555 for(
int i=0; i<References.
Get_Count(); i++)
557 s +=
"\n" + References[i] +
"\n";
567 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
576 s +=
"____________________________\n";
591 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
600 s +=
"____________________________\n";
615 for(
int i=0, bFirst=1; i<
Parameters.Get_Count(); i++)
624 s +=
"____________________________\n";
668 s +=
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
694 #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)
695 #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)
699 s +=
"<table border=\"0\">";
719 for(
int i=0; i<References.
Get_Count(); i++)
721 s +=
"<p>" + References[i] +
"</p>";
728 s +=
"<table border=\"0\">";
744 #undef SUMMARY_ADD_STR
745 #undef SUMMARY_ADD_INT
863 s +=
"<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
867 for(
int i=0; i<Libraries.
Get_Count(); i++)
879 #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)
883 s +=
"<table border=\"0\">";
892 s +=
CSG_String::Format(
"<tr align=\"left\"><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>",
899 for(
int i=0; i<Libraries.
Get_Count(); i++)
902 Libraries[i].asString(0),
903 Libraries[i].asInt (1),
904 Libraries[i].asString(2),
905 Libraries[i].asString(3)
911 #undef SUMMARY_ADD_INT
920 for(
int i=0; i<Libraries.
Get_Count(); i++)
922 if( Libraries[i].asInt(4) == 0 )
CSG_String SG_Data_Type_Get_Name(TSG_Data_Type Type, bool bShort)
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)
int Printf(const char *Format,...)
bool is_Empty(void) const
int Get_Count(void) const
bool Ins(const CSG_String &String, int Index)
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
static CSG_String Html_to_SimpleText(const CSG_String &Text)
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