SAGA API  v9.6
tool_summary.cpp
Go to the documentation of this file.
1 
3 // //
4 // SAGA //
5 // //
6 // System for Automated Geoscientific Analyses //
7 // //
8 // Application Programming Interface //
9 // //
10 // Library: SAGA_API //
11 // //
12 //-------------------------------------------------------//
13 // //
14 // tool_summary.cpp //
15 // //
16 // Copyright (C) 2018 by Olaf Conrad //
17 // //
18 //-------------------------------------------------------//
19 // //
20 // This file is part of 'SAGA - System for Automated //
21 // Geoscientific Analyses'. //
22 // //
23 // This library is free software; you can redistribute //
24 // it and/or modify it under the terms of the GNU Lesser //
25 // General Public License as published by the Free //
26 // Software Foundation, either version 2.1 of the //
27 // License, or (at your option) any later version. //
28 // //
29 // This library is distributed in the hope that it will //
30 // be useful, but WITHOUT ANY WARRANTY; without even the //
31 // implied warranty of MERCHANTABILITY or FITNESS FOR A //
32 // PARTICULAR PURPOSE. See the GNU Lesser General Public //
33 // License for more details. //
34 // //
35 // You should have received a copy of the GNU Lesser //
36 // General Public License along with this program; if //
37 // not, see <http://www.gnu.org/licenses/>. //
38 // //
39 //-------------------------------------------------------//
40 // //
41 // contact: Olaf Conrad //
42 // Institute of Geography //
43 // University of Hamburg //
44 // Germany //
45 // //
46 // e-mail: oconrad@saga-gis.org //
47 // //
49 
50 //---------------------------------------------------------
51 #include "saga_api.h"
52 
53 
55 // //
56 // XML tags for mark-up of tool synopsis //
57 // //
59 
60 //---------------------------------------------------------
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")
96 
97 //---------------------------------------------------------
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)
101 
102 
104 // //
105 // Tool //
106 // //
108 
109 //---------------------------------------------------------
110 void SG_XML_Add_Parameter(CSG_MetaData *pParent, CSG_Parameter *pParameter, CSG_String ID = "")
111 {
112  if( !ID.is_Empty() ) ID += "_"; ID += pParameter->Get_Identifier();
113 
114  CSG_MetaData *pItem = pParent->Add_Child(SG_XML_PARAM);
115 
116  pItem->Add_Property(SG_XML_PARAM_ATT_NAME , pParameter->Get_Name());
117  pItem->Add_Property(SG_XML_PARAM_ATT_CLASS, pParameter->is_Input() ? "input" : pParameter->is_Output() ? "output" : "option");
118 
120 
121  if( pParameter->Get_Type() == PARAMETER_TYPE_DataObject_Output )
122  {
124  pParameter->Get_Type_Name().Make_Lower().c_str(),
126  ));
127  }
128  else
129  {
130  pItem->Add_Child(SG_XML_PARAM_TYPE , pParameter->Get_Type_Name().Make_Lower());
131  }
132 
133  pItem->Add_Child(SG_XML_DESCRIPTION, pParameter->Get_Description());
134 
135  if( !pParameter->is_Option() )
136  {
137  pItem->Add_Child(SG_XML_PARAM_MANDATORY, pParameter->is_Optional() ? "false" : "true");
138  }
139 
140  if( !pParameter->do_UseInGUI() ) pItem->Add_Child(SG_XML_PARAM_WITH_GUI, "false");
141  if( !pParameter->do_UseInCMD() ) pItem->Add_Child(SG_XML_PARAM_WITH_CMD, "false");
142 
143  switch( pParameter->Get_Type() )
144  {
145  //-----------------------------------------------------
146  case PARAMETER_TYPE_Bool:
147  pItem->Add_Child(SG_XML_PARAM_DEFAULT, pParameter->asBool());
148  break;
149 
150  //-----------------------------------------------------
151  case PARAMETER_TYPE_Int:
154  if( pParameter->asValue()->has_Minimum() ) pItem->Add_Child(SG_XML_PARAM_MIN , pParameter->asValue()->Get_Minimum());
155  if( pParameter->asValue()->has_Maximum() ) pItem->Add_Child(SG_XML_PARAM_MAX , pParameter->asValue()->Get_Maximum());
156  if( !pParameter->Get_Default().is_Empty() ) pItem->Add_Child(SG_XML_PARAM_DEFAULT, pParameter ->Get_Default());
157  break;
158 
159  //-----------------------------------------------------
160  case PARAMETER_TYPE_Date:
161  break;
162 
164  break;
165 
166  //-----------------------------------------------------
169  {
170  CSG_MetaData *pChild = pItem->Add_Child(SG_XML_PARAM_LIST);
171 
172  for(int i=0; i<pParameter->asChoice()->Get_Count(); i++)
173  {
174  pChild->Add_Child(SG_XML_PARAM_ITEM, pParameter->asChoice()->Get_Item(i));
175  }
176 
177  if( !pParameter->asChoice()->Get_Default().is_Empty() )
178  {
179  pItem->Add_Child(SG_XML_PARAM_DEFAULT, pParameter->asChoice()->Get_Default());
180  }
181  }
182  break;
183 
184  //-----------------------------------------------------
186  {
187  CSG_MetaData *pChild = pItem->Add_Child(SG_XML_PARAM_LIST);
188 
189  for(int i=0; i<pParameter->asChoices()->Get_Item_Count(); i++)
190  {
191  pChild->Add_Child(SG_XML_PARAM_ITEM, pParameter->asChoices()->Get_Item(i));
192  }
193 
194  if( !pParameter->asChoices()->Get_Default().is_Empty() )
195  {
196  pItem->Add_Child(SG_XML_PARAM_DEFAULT, pParameter->asChoices()->Get_Default());
197  }
198  }
199  break;
200 
201  //-----------------------------------------------------
203  case PARAMETER_TYPE_Text:
205  break;
206 
207  case PARAMETER_TYPE_Font:
208  break;
209 
212  break;
213 
214  //-----------------------------------------------------
216  {
217  CSG_MetaData *pChild = pItem->Add_Child(SG_XML_PARAM_TABLE);
218 
219  for(int i=0; i<pParameter->asTable()->Get_Field_Count(); i++)
220  {
221  CSG_MetaData *pField = pChild->Add_Child(SG_XML_PARAM_FIELD);
222 
225  }
226  }
227  break;
228 
229  //-----------------------------------------------------
231  break;
232 
233  //-----------------------------------------------------
236  if( pParameter->Get_Parent() )
237  {
238  pItem->Add_Child(SG_XML_PARAM_PARENT, pParameter->Get_Parent()->Get_Identifier());
239  }
240  break;
241 
242  //-----------------------------------------------------
244  {
245  for(int i=0; i<pParameter->asParameters()->Get_Count(); i++)
246  {
247  SG_XML_Add_Parameter(pItem, pParameter->asParameters()->Get_Parameter(i), ID);
248  }
249  }
250 
251  //-----------------------------------------------------
252  default:
253  break;
254  }
255 }
256 
257 //---------------------------------------------------------
258 CSG_String CSG_Tool::Get_Summary(bool bParameters, const CSG_String &Menu, const CSG_String &Description, int Format)
259 {
260  CSG_String s;
261 
262  //-----------------------------------------------------
263  switch( Format )
264  {
265  case SG_SUMMARY_FMT_XML:
266  {
267  CSG_MetaData m;
268 
269  m.Set_Name (SG_XML_TOOL);
276  m.Add_Child (SG_XML_SPEC_ATT_GRID , is_Grid () ? "true" : "false");
277  m.Add_Child (SG_XML_SPEC_ATT_INTERA , is_Interactive () ? "true" : "false");
278 
279  // CSG_MetaData *pChild = m.Add_Child(SG_XML_SPECIFICATION);
280  // pChild->Add_Property(SG_XML_SPEC_ATT_GRID , is_Grid () ? "true" : "false");
281  // pChild->Add_Property(SG_XML_SPEC_ATT_INTERA, is_Interactive () ? "true" : "false");
282 
283  if( bParameters )
284  {
285  for(int i=0; i<Parameters.Get_Count(); i++)
286  {
287  if( Parameters(i)->is_Input() )
288  {
290  }
291  }
292 
293  for(int i=0; i<Parameters.Get_Count(); i++)
294  {
295  if( Parameters(i)->is_Output() )
296  {
298  }
299  }
300 
301  for(int i=0; i<Parameters.Get_Count(); i++)
302  {
303  if( Parameters(i)->is_Option()
306  {
308  }
309  }
310  }
311 
312  s = m.asText(1);
313  }
314  break;
315 
316  //-----------------------------------------------------
317  case SG_SUMMARY_FMT_HTML:
318  {
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)
321 
322  s += CSG_String::Format("<h4>%s</h4><table border=\"0\">", _TL("Tool"));
323 
324  s += SUMMARY_ADD_STR(_TL("Name" ), Get_Name ().c_str());
325  s += SUMMARY_ADD_STR(_TL("Author" ), Get_Author ().c_str());
326  s += SUMMARY_ADD_STR(_TL("Version"), Get_Version().c_str());
327  s += SUMMARY_ADD_STR(_TL("Library"), Get_Library().c_str());
328  s += SUMMARY_ADD_STR(_TL("ID" ), Get_ID ().c_str());
329 
330  if( is_Interactive() && is_Grid() )
331  {
332  s += SUMMARY_ADD_STR(_TL("Specification"), CSG_String::Format("%s, %s", _TL("grid"), _TL("interactive")).c_str() );
333  }
334  else if( is_Interactive() )
335  {
336  s += SUMMARY_ADD_STR(_TL("Specification"), _TL("interactive"));
337  }
338  else if( is_Grid() )
339  {
340  s += SUMMARY_ADD_STR(_TL("Specification"), _TL("grid"));
341  }
342 
343  if( Get_Type() == TOOL_TYPE_Chain )
344  {
345  s += SUMMARY_ADD_STR(_TL("File"), Get_File_Name().c_str() );
346  }
347 
348  if( Menu.Length() > 0 )
349  {
350  CSG_String sMenu(Menu);
351 
352  sMenu.Replace("|", " <b>></b> ");
353  sMenu.Replace(";", " <br> ");
354 
355  s += SUMMARY_ADD_STR(_TL("Menu" ), sMenu.c_str());
356  }
357 
358  s += "</table>";
359 
360  #undef SUMMARY_ADD_STR
361  #undef SUMMARY_ADD_INT
362 
363  //---------------------------------------------
364  s += CSG_String::Format("<hr><h4>%s</h4>", _TL("Description"));
365 
366  s += !Description.is_Empty() ? Description : Get_Description();
367 
368  //---------------------------------------------
369  if( Description.is_Empty() && Get_References().Get_Count() > 0 )
370  {
371  s += CSG_String::Format("<hr><h4>%s</h4><ul>", _TL("References"));
372 
373  for(int i=0; i<Get_References().Get_Count(); i++)
374  {
375  s += "<li>" + Get_References()[i] + "</li>";
376  }
377 
378  s += "</ul>";
379  }
380 
381  //---------------------------------------------
382  if( bParameters )
383  {
384  s += CSG_String::Format("<hr><h4>%s</h4>", _TL("Parameters"));
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")
387  );
388 
389  //-----------------------------------------
390  for(int i=0, bFirst=1; i<Parameters.Get_Count(); i++)
391  {
392  CSG_Parameter *pParameter = Parameters(i);
393 
394  if( pParameter->is_Input() )
395  {
396  if( bFirst )
397  {
398  bFirst = 0; s += CSG_String::Format("<tr><th colspan=\"5\">%s</th></tr>", _TL("Input"));
399  }
400 
401  s += CSG_String::Format("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
402  pParameter->Get_Name(),
403  pParameter->Get_Description(PARAMETER_DESCRIPTION_TYPE).c_str(), pParameter->do_UseInCMD() ?
404  pParameter->Get_Identifier () : SG_T(""),
405  pParameter->Get_Description(),
407  );
408  }
409  }
410 
411  //-----------------------------------------
412  for(int i=0, bFirst=1; i<Parameters.Get_Count(); i++)
413  {
414  CSG_Parameter *pParameter = Parameters(i);
415 
416  if( pParameter->is_Output() )
417  {
418  if( bFirst )
419  {
420  bFirst = 0; s += CSG_String::Format("<tr><th colspan=\"5\">%s</th></tr>", _TL("Output"));
421  }
422 
423  s += CSG_String::Format("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
424  pParameter->Get_Name(),
425  pParameter->Get_Description(PARAMETER_DESCRIPTION_TYPE).c_str(), pParameter->do_UseInCMD() ?
426  pParameter->Get_Identifier () : SG_T(""),
427  pParameter->Get_Description(),
429  );
430  }
431  }
432 
433  //-----------------------------------------
434  for(int i=0, bFirst=1; i<Parameters.Get_Count(); i++)
435  {
436  CSG_Parameter *pParameter = Parameters(i);
437 
438  if( pParameter->is_Option() && pParameter->Get_Type() != PARAMETER_TYPE_Grid_System )
439  {
440  if( bFirst )
441  {
442  bFirst = 0; s += CSG_String::Format("<tr><th colspan=\"5\">%s</th></tr>", _TL("Options"));
443  }
444 
445  s += CSG_String::Format("<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>",
446  pParameter->Get_Name(),
447  pParameter->Get_Description(PARAMETER_DESCRIPTION_TYPE).c_str(), pParameter->do_UseInCMD() ?
448  pParameter->Get_Identifier () : SG_T(""),
449  pParameter->Get_Description(),
451  );
452  }
453  }
454 
455  //-----------------------------------------
456  s += "</table>";
457 
458  s.Replace("\n", "<br>");
459  }
460  }
461  break;
462 
463  //-----------------------------------------------------
464  case SG_SUMMARY_FMT_FLAT: default:
465  {
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)
468 
469  s += SUMMARY_ADD_STR(_TL("Name" ), Get_Name ().c_str());
470  s += SUMMARY_ADD_STR(_TL("ID" ), Get_ID ().c_str());
471  s += SUMMARY_ADD_STR(_TL("Author" ), Get_Author ().c_str());
472  s += SUMMARY_ADD_STR(_TL("Version"), Get_Version().c_str());
473 
474  if( is_Interactive() && is_Grid() )
475  {
476  s += SUMMARY_ADD_STR(_TL("Specification"), CSG_String::Format("%s, %s", _TL("grid"), _TL("interactive")).c_str() );
477  }
478  else if( is_Interactive() )
479  {
480  s += SUMMARY_ADD_STR(_TL("Specification"), _TL("interactive"));
481  }
482  else if( is_Grid() )
483  {
484  s += SUMMARY_ADD_STR(_TL("Specification"), _TL("grid"));
485  }
486 
487  if( Get_Type() == TOOL_TYPE_Chain )
488  {
489  s += SUMMARY_ADD_STR(_TL("File"), Get_File_Name().c_str() );
490  }
491 
492  if( Menu.Length() > 0 )
493  {
494  s += SUMMARY_ADD_STR(_TL("Menu"), Menu.c_str());
495  }
496 
497  #undef SUMMARY_ADD_STR
498  #undef SUMMARY_ADD_INT
499 
500  //---------------------------------------------
501  s += "\n____________________________\n";
502 
503  s += CSG_String::Format("%s:\n", _TL("Description"));
504 
505  s += !Description.is_Empty() ? Description : SG_HTML_Tag_Replacer(Get_Description());
506 
507  //---------------------------------------------
508  if( Description.is_Empty() && Get_References().Get_Count() > 0 )
509  {
510  s += "\n____________________________\n";
511 
512  s += CSG_String::Format("\n%s:\n", _TL("References"));
513 
514  for(int i=0; i<Get_References().Get_Count(); i++)
515  {
516  CSG_String Reference(Get_References()[i]);
517 
518  Reference.Replace("<b>" , "");
519  Reference.Replace("</b>" , "");
520  Reference.Replace("<a href=\"", "");
521  Reference.Replace("\">" , " (");
522  Reference.Replace("</a>" , ")");
523 
524  s += " - " + Reference + "\n";
525  }
526  }
527 
528  //---------------------------------------------
529  if( bParameters )
530  {
531  s += "\n";
532 
533  //-----------------------------------------
534  for(int i=0, bFirst=1; i<Parameters.Get_Count(); i++)
535  {
536  CSG_Parameter *pParameter = Parameters(i);
537 
538  if( pParameter->is_Input() && (has_GUI() || pParameter->do_UseInCMD()) )
539  {
540  if( bFirst )
541  {
542  bFirst = 0;
543  s += "____________________________\n";
544  s += CSG_String::Format("%s:\n", _TL("Input"));
545  }
546 
547  s += CSG_String::Format("_\n%s\n%s\n%s\n%s\n%s\n",
548  pParameter->Get_Name (),
549  pParameter->Get_Identifier (),
550  pParameter->Get_Description(PARAMETER_DESCRIPTION_TYPE ).c_str(),
551  pParameter->Get_Description(),
553  );
554  }
555  }
556 
557  //-----------------------------------------
558  for(int i=0, bFirst=1; i<Parameters.Get_Count(); i++)
559  {
560  CSG_Parameter *pParameter = Parameters(i);
561 
562  if( pParameter->is_Output() && (has_GUI() || pParameter->do_UseInCMD()) )
563  {
564  if( bFirst )
565  {
566  bFirst = 0;
567  s += "____________________________\n";
568  s += CSG_String::Format("%s:\n", _TL("Output"));
569  }
570 
571  s += CSG_String::Format("_\n%s\n%s\n%s\n%s\n%s\n",
572  pParameter->Get_Name (),
573  pParameter->Get_Identifier (),
574  pParameter->Get_Description(PARAMETER_DESCRIPTION_TYPE ).c_str(),
575  pParameter->Get_Description(),
577  );
578  }
579  }
580 
581  //-----------------------------------------
582  for(int i=0, bFirst=1; i<Parameters.Get_Count(); i++)
583  {
584  CSG_Parameter *pParameter = Parameters(i);
585 
586  if( pParameter->is_Option() && (has_GUI() || pParameter->do_UseInCMD()) && pParameter->Get_Type() != PARAMETER_TYPE_Grid_System )
587  {
588  if( bFirst )
589  {
590  bFirst = 0;
591  s += "____________________________\n";
592  s += CSG_String::Format("%s:\n", _TL("Options"));
593  }
594 
595  s += CSG_String::Format("_\n%s\n%s\n%s\n%s\n%s\n",
596  pParameter->Get_Name (),
597  pParameter->Get_Identifier (),
598  pParameter->Get_Description(PARAMETER_DESCRIPTION_TYPE ).c_str(),
599  pParameter->Get_Description(),
601  );
602  }
603  }
604  }
605  }
606  break;
607  }
608 
609  //-----------------------------------------------------
610  return( s );
611 }
612 
613 
615 // //
616 // Tool Library //
617 // //
619 
620 //---------------------------------------------------------
621 CSG_String CSG_Tool_Library::Get_Summary(int Format, bool bWithGUINeeded) const
622 {
623  bool bToolChains = Get_File_Name().is_Empty();
624 
625  CSG_String s;
626 
627  switch( Format )
628  {
629  //-----------------------------------------------------
630  case SG_SUMMARY_FMT_XML:
631 
632  s += "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
633  s += CSG_String::Format("<%s>\n" , SG_XML_LIBRARY);
634  s += CSG_String::Format("\t<%s>%s</%s>\n", SG_XML_LIBRARY_PATH, Get_File_Name().c_str(), SG_XML_LIBRARY_PATH);
637 
638  for(int i=0; i<Get_Count(); i++)
639  {
640  if( Get_Tool(i) && (bWithGUINeeded || !Get_Tool(i)->needs_GUI()) )
641  {
642  CSG_String Name(Get_Tool(i)->Get_Name());
643  Name.Replace("&", "&amp;");
644  s += CSG_String::Format("\t<%s %s=\"%s\" %s=\"%s\"/>\n", SG_XML_TOOL,
645  SG_XML_TOOL_ATT_ID , Get_Tool(i)->Get_ID().c_str(),
647  );
648  }
649  }
650 
651  s += CSG_String::Format("</%s>\n", SG_XML_LIBRARY);
652 
653  break;
654 
655  //-----------------------------------------------------
656  case SG_SUMMARY_FMT_HTML: default:
657 
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)
660 
661  s += CSG_String::Format("<h4>%s</h4>", _TL("Tool Library"));
662 
663  s += "<table border=\"0\">";
664 
665  s += SUMMARY_ADD_STR(_TL("Name" ), Get_Info(TLB_INFO_Name ).c_str());
666  s += SUMMARY_ADD_STR(_TL("Author"), Get_Info(TLB_INFO_Author ).c_str());
667  s += SUMMARY_ADD_STR(_TL("ID" ), Get_Library_Name ().c_str());
668  s += SUMMARY_ADD_STR(_TL("File" ), Get_File_Name ().c_str());
669 
670  s += "</table>";
671 
672  //-------------------------------------------------
673  s += CSG_String::Format("<hr><h4>%s</h4>", _TL("Description"));
674 
676 
677  if( Get_References().Get_Count() > 0 )
678  {
679  s += CSG_String::Format("<hr><h4>%s</h4><ul>", _TL("References"));
680 
681  for(int i=0; i<Get_References().Get_Count(); i++)
682  {
683  s += "<li>" + Get_References()[i] + "</li>";
684  }
685 
686  s += "</ul>";
687  }
688 
689  //-------------------------------------------------
690  s += CSG_String::Format("<hr><h4>%s</h4>", _TL("Tools"));
691 
692  s += "<table border=\"0\">";
693 
694  s += CSG_String::Format("<tr align=\"left\"><th>%s</th><th>%s</th></tr>", _TL("ID"), _TL("Name"));
695 
696  for(int i=0; i<Get_Count(); i++)
697  {
698  if( Get_Tool(i) && (bWithGUINeeded || !Get_Tool(i)->needs_GUI()) )
699  {
700  s += SUMMARY_ADD_STR(Get_Tool(i)->Get_ID().c_str(), Get_Tool(i)->Get_Name().c_str());
701  }
702  }
703 
704  s += "</table>";
705 
706  s.Replace("\n", "<br>");
707 
708  #undef SUMMARY_ADD_STR
709  #undef SUMMARY_ADD_INT
710 
711  break;
712 
713  //-----------------------------------------------------
714  case SG_SUMMARY_FMT_FLAT:
715 
716  if( !bToolChains )
717  {
718  s += CSG_String::Format("\n%s%s: ", _TL("Library"), SG_T(" ")) + Get_Info(TLB_INFO_Name );
719  s += CSG_String::Format("\n%s%s: ", _TL("Category"), SG_T(" ")) + Get_Info(TLB_INFO_Category);
720  s += CSG_String::Format("\n%s%s: ", _TL("File"), SG_T(" ")) + Get_File_Name();
721  }
722  else
723  {
724  s += CSG_String::Format("\n%s: ", _TL("Tool Chains")) + Get_Info(TLB_INFO_Name);
725  }
726 
727  s += CSG_String::Format("\n%s: ", _TL("Description")) + SG_HTML_Tag_Replacer(Get_Info(TLB_INFO_Description));
728 
729  if( Get_References().Get_Count() > 0 )
730  {
731  s += CSG_String::Format("\n%s:\n", _TL("References"));
732 
733  for(int i=0; i<Get_References().Get_Count(); i++)
734  {
735  s += " - " + Get_References()[i] + "\n";
736  }
737  }
738 
739  s += CSG_String::Format("\n\n%s:\n", _TL("Tools"));
740 
741  for(int i=0; i<Get_Count(); i++)
742  {
743  if( Get_Tool(i) && (bWithGUINeeded || !Get_Tool(i)->needs_GUI()) )
744  {
745  s += " [" + Get_Tool(i)->Get_ID() + "]\t" + Get_Tool(i)->Get_Name() + "\n";
746  }
747  }
748 
749  break;
750  }
751 
752  return( s );
753 }
754 
755 
757 // //
759 
760 //---------------------------------------------------------
761 // Store tool and tool library description to HTML files.
762 //---------------------------------------------------------
764 {
765  CSG_File File;
766 
767  if( File.Open(SG_File_Make_Path(Path, Get_Library_Name(), "html"), SG_FILE_W) )
768  {
769  File.Write(Get_Summary());
770  }
771 
772  for(int i=0; i<Get_Count(); i++)
773  {
774  if( Get_Tool(i) && File.Open(SG_File_Make_Path(Path, Get_Library_Name() + "_" + Get_Tool(i)->Get_ID(), "html"), SG_FILE_W) )
775  {
776  File.Write(Get_Tool(i)->Get_Summary());
777  }
778  }
779 
780  return( true );
781 }
782 
783 
785 // //
786 // Tool Library Manager //
787 // //
789 
790 //---------------------------------------------------------
792 {
793  int nTools = 0; CSG_Table Libraries;
794 
795  Libraries.Add_Field("LIB" , SG_DATATYPE_String);
796  Libraries.Add_Field("TOOLS", SG_DATATYPE_Int );
797  Libraries.Add_Field("NAME" , SG_DATATYPE_String);
798  Libraries.Add_Field("PATH" , SG_DATATYPE_String);
799  Libraries.Add_Field("CHAIN", SG_DATATYPE_Int );
800 
801  for(int i=0; i<Get_Count(); i++)
802  {
803  if( Get_Library(i)->Get_Count() > 0 )
804  {
805  nTools += Get_Library(i)->Get_Count();
806 
807  Libraries.Add_Record();
808 
809  Libraries[i].Set_Value(0, Get_Library(i)->Get_Library_Name());
810  Libraries[i].Set_Value(1, Get_Library(i)->Get_Count());
811  Libraries[i].Set_Value(2, Get_Library(i)->Get_Name());
812  Libraries[i].Set_Value(3, SG_File_Get_Path(Get_Library(i)->Get_File_Name()));
813  Libraries[i].Set_Value(4, Get_Library(i)->Get_File_Name().is_Empty() ? 1 : 0);
814  }
815  }
816 
818 
819  //-----------------------------------------------------
820  CSG_String s;
821 
822  switch( Format )
823  {
824  //-----------------------------------------------------
825  case SG_SUMMARY_FMT_XML:
826 
827  s += "<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>\n";
828  s += CSG_String::Format("<%s>\n", SG_XML_SYSTEM);
830 
831  for(int i=0; i<Libraries.Get_Count(); i++)
832  {
833  s += CSG_String::Format("\t<%s %s=\"%s\"/>\n", SG_XML_LIBRARY, SG_XML_LIBRARY_NAME, Libraries[i].asString(0));
834  }
835 
836  s += CSG_String::Format("</%s>\n", SG_XML_SYSTEM);
837 
838  break;
839 
840  //-----------------------------------------------------
841  case SG_SUMMARY_FMT_HTML: default:
842 
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)
844 
845  s += CSG_String::Format("<h4>%s</h4>", _TL("Tool Libraries"));
846 
847  s += "<table border=\"0\">";
848 
849  s += SUMMARY_ADD_INT(_TL("Libraries"), Libraries.Get_Count());
850  s += SUMMARY_ADD_INT(_TL("Tools" ), nTools);
851 
852  s += "</table>";
853 
854  s += CSG_String::Format("<hr><h4>%s</h4><table border=\"1\">", _TL("Libraries"));
855 
856  s += CSG_String::Format("<tr align=\"left\"><th>%s</th><th>%s</th><th>%s</th><th>%s</th></tr>",
857  _TL("Library" ),
858  _TL("Tools" ),
859  _TL("Name" ),
860  _TL("Location")
861  );
862 
863  for(int i=0; i<Libraries.Get_Count(); i++)
864  {
865  s += CSG_String::Format("<tr><td>%s</td><td>%d</td><td>%s</td><td>%s</td></tr>",
866  Libraries[i].asString(0),
867  Libraries[i].asInt (1),
868  Libraries[i].asString(2),
869  Libraries[i].asString(3)
870  );
871  }
872 
873  s += "</table>";
874 
875  #undef SUMMARY_ADD_INT
876 
877  break;
878 
879  //-----------------------------------------------------
880  case SG_SUMMARY_FMT_FLAT:
881 
882  s += CSG_String::Format("\n%d %s (%d %s):\n", Libraries.Get_Count(), _TL("loaded tool libraries"), nTools, _TL("tools"));
883 
884  for(int i=0; i<Libraries.Get_Count(); i++)
885  {
886  if( Libraries[i].asInt(4) == 0 )
887  s += CSG_String::Format(" - %s\n" , Libraries[i].asString(0));
888  else
889  s += CSG_String::Format(" - %s *\n", Libraries[i].asString(0));
890  }
891 
892  s += CSG_String::Format("\n\n*) %s\n", _TL("tool chain libraries"));
893 
894  break;
895  }
896 
897  //-----------------------------------------------------
898  return( s );
899 }
900 
901 
903 // //
905 
906 //---------------------------------------------------------
907 // Store tool and tool library description to HTML files.
908 //---------------------------------------------------------
910 {
911  for(int i=0; i<Get_Count(); i++)
912  {
913  CSG_Tool_Library *pLibrary = Get_Library(i);
914 
915  CSG_String Directory = SG_File_Make_Path(Path, pLibrary->Get_Library_Name());
916 
917  if( SG_Dir_Create(Directory) )
918  {
919  pLibrary->Get_Summary(Directory);
920  }
921  }
922 
923  return( true );
924 }
925 
926 
928 // //
929 // //
930 // //
932 
933 //---------------------------------------------------------
SG_XML_SYSTEM
#define SG_XML_SYSTEM
Definition: tool_summary.cpp:61
SG_DATATYPE_Int
@ SG_DATATYPE_Int
Definition: api_core.h:1000
SG_XML_SPEC_ATT_GRID
#define SG_XML_SPEC_ATT_GRID
Definition: tool_summary.cpp:74
CSG_File::Open
virtual bool Open(const CSG_String &FileName, int Mode=SG_FILE_R, bool bBinary=true, int Encoding=SG_FILE_ENCODING_ANSI)
Definition: api_file.cpp:111
PARAMETER_TYPE_Double
@ PARAMETER_TYPE_Double
Definition: parameters.h:127
CSG_Parameters::Get_Parameter
CSG_Parameter * Get_Parameter(int i) const
Definition: parameters.h:1752
PARAMETER_TYPE_FilePath
@ PARAMETER_TYPE_FilePath
Definition: parameters.h:136
SG_File_Get_Path
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path(const CSG_String &full_Path)
Definition: api_file.cpp:891
PARAMETER_TYPE_Degree
@ PARAMETER_TYPE_Degree
Definition: parameters.h:128
CSG_Tool::Parameters
CSG_Parameters Parameters
Definition: tool.h:257
SG_T
#define SG_T(s)
Definition: api_core.h:537
SG_XML_PARAM_FIELD
#define SG_XML_PARAM_FIELD
Definition: tool_summary.cpp:90
TOOL_TYPE_Chain
@ TOOL_TYPE_Chain
Definition: tool.h:106
SG_DATATYPE_String
@ SG_DATATYPE_String
Definition: api_core.h:1005
_TL
#define _TL(s)
Definition: api_core.h:1489
CSG_String::Make_Lower
CSG_String & Make_Lower(void)
Definition: api_string.cpp:543
SG_XML_PARAM_ATT_NAME
#define SG_XML_PARAM_ATT_NAME
Definition: tool_summary.cpp:79
SAGA_VERSION
#define SAGA_VERSION
Definition: saga_api.h:90
PARAMETER_TYPE_Table_Fields
@ PARAMETER_TYPE_Table_Fields
Definition: parameters.h:145
CSG_String::Length
size_t Length(void) const
Definition: api_string.cpp:172
SG_HTML_Tag_Replacer
SAGA_API_DLL_EXPORT CSG_String SG_HTML_Tag_Replacer(const CSG_String &Text)
Definition: api_string.cpp:1389
SG_XML_PARAM_IDENTIFIER
#define SG_XML_PARAM_IDENTIFIER
Definition: tool_summary.cpp:85
SG_XML_PARAM_LIST
#define SG_XML_PARAM_LIST
Definition: tool_summary.cpp:87
CSG_Tool::Get_Summary
CSG_String Get_Summary(bool bParameters=true, const CSG_String &Menu="", const CSG_String &Description="", int Format=SG_SUMMARY_FMT_HTML)
Definition: tool_summary.cpp:258
CSG_Parameter::Get_Identifier
const SG_Char * Get_Identifier(void) const
Definition: parameter.cpp:547
PARAMETER_TYPE_Node
@ PARAMETER_TYPE_Node
Definition: parameters.h:123
CSG_Parameter::Get_Type_Name
CSG_String Get_Type_Name(void) const
Definition: parameter.cpp:129
SG_XML_MENU
#define SG_XML_MENU
Definition: tool_summary.cpp:76
CSG_Parameter::asTable
CSG_Table * asTable(void) const
Definition: parameter.cpp:1063
SG_XML_PARAM_PARENT
#define SG_XML_PARAM_PARENT
Definition: tool_summary.cpp:86
CSG_Tool_Library
Definition: tool_library.h:105
CSG_Parameter_Value::Get_Maximum
double Get_Maximum(void) const
Definition: parameters.h:445
CSG_Parameter_Value::has_Minimum
bool has_Minimum(void) const
Definition: parameters.h:442
PARAMETER_TYPE_String
@ PARAMETER_TYPE_String
Definition: parameters.h:134
SG_Get_DataObject_Name
CSG_String SG_Get_DataObject_Name(TSG_Data_Object_Type Type)
Definition: dataobject.cpp:86
PARAMETER_TYPE_Int
@ PARAMETER_TYPE_Int
Definition: parameters.h:126
SG_XML_TOOL_ATT_VERSION
#define SG_XML_TOOL_ATT_VERSION
Definition: tool_summary.cpp:71
SG_XML_LIBRARY
#define SG_XML_LIBRARY
Definition: tool_summary.cpp:64
CSG_Tool::needs_GUI
virtual bool needs_GUI(void) const
Definition: tool.h:234
CSG_Parameter::is_Input
bool is_Input(void) const
Definition: parameters.h:232
SG_XML_TOOL
#define SG_XML_TOOL
Definition: tool_summary.cpp:68
CSG_Tool_Library::Get_Name
CSG_String Get_Name(void) const
Definition: tool_library.h:118
TLB_INFO_Category
@ TLB_INFO_Category
Definition: tool.h:627
SG_XML_PARAM_ATT_CLASS
#define SG_XML_PARAM_ATT_CLASS
Definition: tool_summary.cpp:80
SG_XML_PARAM_FIELD_ATT_NAME
#define SG_XML_PARAM_FIELD_ATT_NAME
Definition: tool_summary.cpp:91
saga_api.h
SG_XML_TOOL_ATT_NAME
#define SG_XML_TOOL_ATT_NAME
Definition: tool_summary.cpp:69
SG_XML_LIBRARY_CATEGORY
#define SG_XML_LIBRARY_CATEGORY
Definition: tool_summary.cpp:67
CSG_Parameter::Get_Description
const SG_Char * Get_Description(void) const
Definition: parameter.cpp:602
SG_SUMMARY_FMT_HTML
@ SG_SUMMARY_FMT_HTML
Definition: tool.h:94
CSG_Parameter::do_UseInCMD
bool do_UseInCMD(void) const
Definition: parameter.cpp:172
PARAMETER_TYPE_FixedTable
@ PARAMETER_TYPE_FixedTable
Definition: parameters.h:141
CSG_Tool::Get_Name
const CSG_String & Get_Name(void) const
Definition: tool.cpp:132
SG_SUMMARY_FMT_XML
@ SG_SUMMARY_FMT_XML
Definition: tool.h:95
TLB_INFO_Name
@ TLB_INFO_Name
Definition: tool.h:622
CSG_Tool::Get_References
const CSG_Strings & Get_References(void) const
Definition: tool.cpp:181
CSG_Parameter::asValue
class CSG_Parameter_Value * asValue(void) const
Definition: parameter.cpp:1091
CSG_String::Replace
size_t Replace(const CSG_String &sOld, const CSG_String &sNew, bool bReplaceAll=true)
Definition: api_string.cpp:563
CSG_File
Definition: api_core.h:1124
SG_XML_SYSTEM_VER
#define SG_XML_SYSTEM_VER
Definition: tool_summary.cpp:62
CSG_Tool::Get_Version
const CSG_String & Get_Version(void) const
Definition: tool.cpp:154
CSG_Parameter::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const =0
SG_XML_PARAM_TYPE
#define SG_XML_PARAM_TYPE
Definition: tool_summary.cpp:84
CSG_Tool_Library_Manager::Get_Summary
CSG_String Get_Summary(int Format=SG_SUMMARY_FMT_HTML) const
Definition: tool_summary.cpp:791
PARAMETER_TYPE_Choices
@ PARAMETER_TYPE_Choices
Definition: parameters.h:133
TLB_INFO_Description
@ TLB_INFO_Description
Definition: tool.h:623
SUMMARY_ADD_INT
#define SUMMARY_ADD_INT(label, value)
PARAMETER_TYPE_Data_Type
@ PARAMETER_TYPE_Data_Type
Definition: parameters.h:131
PARAMETER_TYPE_Colors
@ PARAMETER_TYPE_Colors
Definition: parameters.h:140
CSG_Parameter
Definition: parameters.h:207
CSG_Table::Get_Field_Name
const SG_Char * Get_Field_Name(int iField) const
Definition: table.h:357
SG_SUMMARY_FMT_FLAT
@ SG_SUMMARY_FMT_FLAT
Definition: tool.h:93
CSG_Tool_Library::Get_File_Name
const CSG_String & Get_File_Name(void) const
Definition: tool_library.h:114
CSG_Tool_Library_Manager::Get_Count
int Get_Count(void) const
Definition: tool_library.h:191
PARAMETER_TYPE_Bool
@ PARAMETER_TYPE_Bool
Definition: parameters.h:125
SG_Dir_Create
SAGA_API_DLL_EXPORT bool SG_Dir_Create(const CSG_String &Directory, bool bFullPath=false)
Definition: api_file.cpp:749
CSG_Parameters::Get_Count
int Get_Count(void) const
Definition: parameters.h:1725
CSG_Tool_Library::Get_Count
virtual int Get_Count(void) const
Definition: tool_library.h:128
PARAMETER_TYPE_Table_Field
@ PARAMETER_TYPE_Table_Field
Definition: parameters.h:144
PARAMETER_TYPE_Choice
@ PARAMETER_TYPE_Choice
Definition: parameters.h:132
CSG_Parameter::asParameters
class CSG_Parameters * asParameters(void) const
Definition: parameter.cpp:1038
CSG_Tool::Get_MenuPath
virtual CSG_String Get_MenuPath(void)
Definition: tool.h:178
SG_XML_SPEC_ATT_INTERA
#define SG_XML_SPEC_ATT_INTERA
Definition: tool_summary.cpp:75
CSG_Tool::Get_Library
const CSG_String & Get_Library(void) const
Definition: tool.cpp:115
CSG_Tool_Library::Get_Library_Name
const CSG_String & Get_Library_Name(void) const
Definition: tool_library.h:115
CSG_MetaData::Add_Property
bool Add_Property(const CSG_String &Name, const CSG_String &Value)
Definition: metadata.cpp:559
CSG_Tool::is_Grid
virtual bool is_Grid(void) const
Definition: tool.h:238
PARAMETER_DESCRIPTION_TYPE
#define PARAMETER_DESCRIPTION_TYPE
Definition: parameters.h:107
CSG_Table::Get_Count
sLong Get_Count(void) const
Definition: table.h:392
SG_XML_DESCRIPTION
#define SG_XML_DESCRIPTION
Definition: tool_summary.cpp:77
PARAMETER_TYPE_Date
@ PARAMETER_TYPE_Date
Definition: parameters.h:129
CSG_Tool::Get_ID
const CSG_String & Get_ID(void) const
Definition: tool.h:166
SG_Data_Type_Get_Name
CSG_String SG_Data_Type_Get_Name(TSG_Data_Type Type, bool bShort)
Definition: api_core.cpp:123
CSG_Tool_Library::Get_Info
virtual CSG_String Get_Info(int Type) const
Definition: tool_library.cpp:133
CSG_Table::Set_Value
virtual bool Set_Value(sLong Index, int iField, const SG_Char *Value)
Definition: table.cpp:1131
SG_FILE_W
@ SG_FILE_W
Definition: api_core.h:1110
SG_XML_PARAM_MIN
#define SG_XML_PARAM_MIN
Definition: tool_summary.cpp:93
SG_XML_PARAM
#define SG_XML_PARAM
Definition: tool_summary.cpp:78
SG_XML_PARAM_FIELD_ATT_TYPE
#define SG_XML_PARAM_FIELD_ATT_TYPE
Definition: tool_summary.cpp:92
CSG_Parameter::is_Optional
bool is_Optional(void) const
Definition: parameters.h:234
CSG_Tool::Get_File_Name
const CSG_String & Get_File_Name(void) const
Definition: tool.cpp:121
CSG_Parameter::is_Output
bool is_Output(void) const
Definition: parameters.h:233
CSG_String::Format
static CSG_String Format(const char *Format,...)
Definition: api_string.cpp:270
TLB_INFO_Author
@ TLB_INFO_Author
Definition: tool.h:624
CSG_Tool::has_GUI
bool has_GUI(void) const
Definition: tool.cpp:239
CSG_Table::Add_Field
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
Definition: table.cpp:481
CSG_Table
Definition: table.h:283
CSG_Parameter_Value::has_Maximum
bool has_Maximum(void) const
Definition: parameters.h:446
CSG_Tool_Library::Get_References
const CSG_Strings & Get_References(void) const
Definition: tool_library.h:149
CSG_Parameter::Get_Default
const CSG_String & Get_Default(void) const
Definition: parameter.cpp:929
CSG_Parameter_Choice::Get_Item
const SG_Char * Get_Item(int Index) const
Definition: parameter_data.cpp:992
SG_XML_PARAM_DEFAULT
#define SG_XML_PARAM_DEFAULT
Definition: tool_summary.cpp:95
CSG_Parameter::Get_Parent
CSG_Parameter * Get_Parent(void) const
Definition: parameter.cpp:106
SG_XML_TOOL_ATT_ID
#define SG_XML_TOOL_ATT_ID
Definition: tool_summary.cpp:70
SG_XML_PARAM_TABLE
#define SG_XML_PARAM_TABLE
Definition: tool_summary.cpp:89
SUMMARY_ADD_STR
#define SUMMARY_ADD_STR(label, value)
CSG_String
Definition: api_core.h:563
CSG_Tool::Get_Author
const CSG_String & Get_Author(void) const
Definition: tool.cpp:143
CSG_Parameter::asChoice
class CSG_Parameter_Choice * asChoice(void) const
Definition: parameter.cpp:1107
SG_XML_PARAM_WITH_GUI
#define SG_XML_PARAM_WITH_GUI
Definition: tool_summary.cpp:82
CSG_Tool_Library::Get_Tool
virtual CSG_Tool * Get_Tool(int Index, TSG_Tool_Type Type=TOOL_TYPE_Base) const
Definition: tool_library.cpp:149
CSG_MetaData
Definition: metadata.h:88
SG_XML_PARAM_MAX
#define SG_XML_PARAM_MAX
Definition: tool_summary.cpp:94
CSG_String::is_Empty
bool is_Empty(void) const
Definition: api_string.cpp:178
PARAMETER_TYPE_Grid_System
@ PARAMETER_TYPE_Grid_System
Definition: parameters.h:143
CSG_Tool::Get_Description
const CSG_String & Get_Description(void) const
Definition: tool.cpp:165
CSG_Tool::is_Interactive
virtual bool is_Interactive(void) const
Definition: tool.h:239
SG_XML_PARAM_WITH_CMD
#define SG_XML_PARAM_WITH_CMD
Definition: tool_summary.cpp:83
SG_XML_LIBRARY_PATH
#define SG_XML_LIBRARY_PATH
Definition: tool_summary.cpp:65
CSG_Parameter_Value::Get_Minimum
double Get_Minimum(void) const
Definition: parameters.h:441
CSG_MetaData::Set_Name
void Set_Name(const CSG_String &Name)
Definition: metadata.h:129
SG_XML_Add_Parameter
void SG_XML_Add_Parameter(CSG_MetaData *pParent, CSG_Parameter *pParameter, CSG_String ID="")
Definition: tool_summary.cpp:110
CSG_Parameter::do_UseInGUI
bool do_UseInGUI(void) const
Definition: parameter.cpp:166
CSG_Tool_Library_Manager::Get_Library
CSG_Tool_Library * Get_Library(int i) const
Definition: tool_library.h:207
PARAMETER_TYPE_DataObject_Output
@ PARAMETER_TYPE_DataObject_Output
Definition: parameters.h:161
TABLE_INDEX_Ascending
@ TABLE_INDEX_Ascending
Definition: table.h:105
SG_XML_TOOL_ATT_AUTHOR
#define SG_XML_TOOL_ATT_AUTHOR
Definition: tool_summary.cpp:72
CSG_Parameter_Choices::Get_Item
const CSG_String & Get_Item(int i) const
Definition: parameters.h:760
PARAMETER_DESCRIPTION_PROPERTIES
#define PARAMETER_DESCRIPTION_PROPERTIES
Definition: parameters.h:109
SG_File_Make_Path
SAGA_API_DLL_EXPORT CSG_String SG_File_Make_Path(const CSG_String &Directory, const CSG_String &Name)
Definition: api_file.cpp:919
SG_XML_LIBRARY_NAME
#define SG_XML_LIBRARY_NAME
Definition: tool_summary.cpp:66
CSG_String::c_str
const SG_Char * c_str(void) const
Definition: api_string.cpp:236
CSG_File::Write
size_t Write(void *Buffer, size_t Size, size_t Count=1) const
Definition: api_file.cpp:360
SG_XML_PARAM_MANDATORY
#define SG_XML_PARAM_MANDATORY
Definition: tool_summary.cpp:81
CSG_Strings::Get_Count
int Get_Count(void) const
Definition: api_core.h:712
CSG_Parameter::Get_DataObject_Type
TSG_Data_Object_Type Get_DataObject_Type(void) const
Definition: parameter.cpp:519
CSG_Table::Set_Index
bool Set_Index(CSG_Index &Index, int Field, bool bAscending=true) const
Definition: table.cpp:1426
CSG_MetaData::Add_Child
CSG_MetaData * Add_Child(void)
Definition: metadata.cpp:166
CSG_MetaData::asText
CSG_String asText(int Flags=0) const
Definition: metadata.cpp:698
CSG_Table::Get_Field_Type
TSG_Data_Type Get_Field_Type(int iField) const
Definition: table.h:358
CSG_Tool::Get_Type
virtual TSG_Tool_Type Get_Type(void) const
Definition: tool.h:164
CSG_Table::Add_Record
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
Definition: table.cpp:795
CSG_Parameter::Get_Name
const SG_Char * Get_Name(void) const
Definition: parameter.cpp:589
PARAMETER_TYPE_Range
@ PARAMETER_TYPE_Range
Definition: parameters.h:130
CSG_Parameter::is_Option
bool is_Option(void) const
Definition: parameter.cpp:239
PARAMETER_TYPE_Parameters
@ PARAMETER_TYPE_Parameters
Definition: parameters.h:163
PARAMETER_TYPE_Font
@ PARAMETER_TYPE_Font
Definition: parameters.h:138
PARAMETER_TYPE_Color
@ PARAMETER_TYPE_Color
Definition: parameters.h:139
SG_XML_PARAM_ITEM
#define SG_XML_PARAM_ITEM
Definition: tool_summary.cpp:88
CSG_Parameter::asChoices
class CSG_Parameter_Choices * asChoices(void) const
Definition: parameter.cpp:1109
CSG_Parameter::asBool
bool asBool(void) const
Definition: parameters.h:281
CSG_Tool_Library::Get_Summary
CSG_String Get_Summary(int Format=SG_SUMMARY_FMT_HTML, bool bInteractive=true) const
Definition: tool_summary.cpp:621
PARAMETER_TYPE_Text
@ PARAMETER_TYPE_Text
Definition: parameters.h:135