|
SAGA API
v9.6
|
Go to the documentation of this file.
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")
401 s +=
CSG_String::Format(
"<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
423 s +=
CSG_String::Format(
"<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
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";
543 s +=
"____________________________\n";
567 s +=
"____________________________\n";
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 )
virtual bool Open(const CSG_String &FileName, int Mode=SG_FILE_R, bool bBinary=true, int Encoding=SG_FILE_ENCODING_ANSI)
CSG_Parameter * Get_Parameter(int i) const
@ PARAMETER_TYPE_FilePath
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path(const CSG_String &full_Path)
CSG_String & Make_Lower(void)
@ PARAMETER_TYPE_Table_Fields
size_t Length(void) const
SAGA_API_DLL_EXPORT CSG_String SG_HTML_Tag_Replacer(const CSG_String &Text)
const SG_Char * Get_Identifier(void) const
CSG_String Get_Type_Name(void) const
CSG_Table * asTable(void) const
double Get_Maximum(void) const
bool has_Minimum(void) const
CSG_String SG_Get_DataObject_Name(TSG_Data_Object_Type Type)
bool is_Input(void) const
const SG_Char * Get_Description(void) const
bool do_UseInCMD(void) const
@ PARAMETER_TYPE_FixedTable
class CSG_Parameter_Value * asValue(void) const
size_t Replace(const CSG_String &sOld, const CSG_String &sNew, bool bReplaceAll=true)
virtual TSG_Parameter_Type Get_Type(void) const =0
@ PARAMETER_TYPE_Data_Type
const SG_Char * Get_Field_Name(int iField) const
SAGA_API_DLL_EXPORT bool SG_Dir_Create(const CSG_String &Directory, bool bFullPath=false)
int Get_Count(void) const
@ PARAMETER_TYPE_Table_Field
class CSG_Parameters * asParameters(void) const
#define PARAMETER_DESCRIPTION_TYPE
sLong Get_Count(void) const
CSG_String SG_Data_Type_Get_Name(TSG_Data_Type Type, bool bShort)
virtual bool Set_Value(sLong Index, int iField, const SG_Char *Value)
bool is_Optional(void) const
bool is_Output(void) const
static CSG_String Format(const char *Format,...)
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
bool has_Maximum(void) const
const CSG_String & Get_Default(void) const
const SG_Char * Get_Item(int Index) const
CSG_Parameter * Get_Parent(void) const
class CSG_Parameter_Choice * asChoice(void) const
bool is_Empty(void) const
@ PARAMETER_TYPE_Grid_System
double Get_Minimum(void) const
bool do_UseInGUI(void) const
@ PARAMETER_TYPE_DataObject_Output
const CSG_String & Get_Item(int i) const
#define PARAMETER_DESCRIPTION_PROPERTIES
SAGA_API_DLL_EXPORT CSG_String SG_File_Make_Path(const CSG_String &Directory, const CSG_String &Name)
const SG_Char * c_str(void) const
size_t Write(void *Buffer, size_t Size, size_t Count=1) const
int Get_Count(void) const
TSG_Data_Object_Type Get_DataObject_Type(void) const
bool Set_Index(CSG_Index &Index, int Field, bool bAscending=true) const
TSG_Data_Type Get_Field_Type(int iField) const
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
const SG_Char * Get_Name(void) const
bool is_Option(void) const
@ PARAMETER_TYPE_Parameters
class CSG_Parameter_Choices * asChoices(void) const