SAGA API  v9.2
parameters.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 // parameters.cpp //
15 // //
16 // Copyright (C) 2005 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 Goettingen //
44 // Goldschmidtstr. 5 //
45 // 37077 Goettingen //
46 // Germany //
47 // //
48 // e-mail: oconrad@saga-gis.org //
49 // //
51 
52 //---------------------------------------------------------
53 #include "parameters.h"
54 #include "data_manager.h"
55 #include "tool.h"
56 
57 
59 // //
60 // //
61 // //
63 
64 //---------------------------------------------------------
66 {
67  _On_Construction();
68 }
69 
70 //---------------------------------------------------------
72 {
73  _On_Construction();
74 
75  Create(Parameters);
76 }
77 
78 //---------------------------------------------------------
79 CSG_Parameters::CSG_Parameters(const SG_Char *Name, const SG_Char *Description, const SG_Char *Identifier, bool bGrid_System)
80 {
81  _On_Construction();
82 
83  Create(Name, Description, Identifier, bGrid_System);
84 }
85 
86 //---------------------------------------------------------
87 CSG_Parameters::CSG_Parameters(void *pOwner, const SG_Char *Name, const SG_Char *Description, const SG_Char *Identifier, bool bGrid_System)
88 {
89  _On_Construction();
90 
91  Create(pOwner, Name, Description, Identifier, bGrid_System);
92 }
93 
94 //---------------------------------------------------------
96 {
97  Destroy();
98 }
99 
100 
102 // //
104 
105 //---------------------------------------------------------
106 void CSG_Parameters::_On_Construction(void)
107 {
108  m_pOwner = NULL;
109  m_pTool = NULL;
110  m_pManager = &SG_Get_Data_Manager();
111 
112  m_Parameters = NULL;
113  m_nParameters = 0;
114 
115  m_Callback = NULL;
116  m_bCallback = true;
117 
118  m_pGrid_System = NULL;
119 }
120 
121 //---------------------------------------------------------
122 bool CSG_Parameters::Create(const CSG_Parameters &Parameters)
123 {
124  Destroy();
125 
126  m_pOwner = Parameters.m_pOwner;
127  m_pTool = Parameters.m_pTool;
128  m_pManager = Parameters.m_pManager;
129 
130  m_Callback = Parameters.m_Callback;
131  m_bCallback = Parameters.m_bCallback;
132 
133  Set_Identifier (Parameters.Get_Identifier ());
134  Set_Name (Parameters.Get_Name ());
135  Set_Description (Parameters.Get_Description());
136 
137  //-----------------------------------------------------
138  for(int i=0; i<Parameters.m_nParameters; i++)
139  {
140  _Add(Parameters.m_Parameters[i]);
141  }
142 
143  if( Parameters.m_pGrid_System )
144  {
145  m_pGrid_System = Get_Parameter(Parameters.m_pGrid_System->Get_Identifier());
146  }
147 
148  return( m_nParameters == Parameters.m_nParameters );
149 }
150 
151 //---------------------------------------------------------
152 bool CSG_Parameters::Create(const SG_Char *Name, const SG_Char *Description, const SG_Char *Identifier, bool bGrid_System)
153 {
154  Destroy();
155 
156  Set_Identifier (Identifier);
157  Set_Name (Name);
158  Set_Description(Description ? Description : SG_T(""));
159 
160  if( bGrid_System )
161  {
162  Use_Grid_System();
163  }
164 
165  return( true );
166 }
167 
168 //---------------------------------------------------------
169 bool CSG_Parameters::Create(void *pOwner, const SG_Char *Name, const SG_Char *Description, const SG_Char *Identifier, bool bGrid_System)
170 {
171  if( Create(Name, Description, Identifier, bGrid_System) )
172  {
173  m_pOwner = pOwner;
174 
175  return( true );
176  }
177 
178  return( false );
179 }
180 
181 //---------------------------------------------------------
183 {
184  m_pOwner = NULL;
185  m_pTool = NULL;
186  m_pGrid_System = NULL;
187 
188  Del_Parameters();
189 
190  m_References.Clear();
191 }
192 
193 
195 // //
197 
198 //---------------------------------------------------------
205 //---------------------------------------------------------
207 {
208  m_pManager = pManager;
209 
210  for(int i=0; i<Get_Count(); i++)
211  {
212  if( m_Parameters[i]->Get_Type() == PARAMETER_TYPE_Parameters )
213  {
214  m_Parameters[i]->asParameters()->Set_Manager(pManager);
215  }
216  }
217 }
218 
219 //---------------------------------------------------------
223 //---------------------------------------------------------
225 {
226  if( !m_pGrid_System )
227  {
228  m_pGrid_System = Add_Grid_System("", "PARAMETERS_GRID_SYSTEM", _TL("Grid System"), _TL(""));
229 
230  return( true );
231  }
232 
233  return( false );
234 }
235 
236 //---------------------------------------------------------
241 //---------------------------------------------------------
242 bool CSG_Parameters::has_GUI(void) const
243 {
244  return( Get_Tool() ? Get_Tool()->has_GUI() : (Get_Owner() && SG_UI_Get_Window_Main()) );
245 }
246 
247 //---------------------------------------------------------
251 //---------------------------------------------------------
253 {
254  m_Identifier = Identifier;
255 }
256 
257 //---------------------------------------------------------
261 //---------------------------------------------------------
262 bool CSG_Parameters::Cmp_Identifier(const CSG_String &Identifier) const
263 {
264  return( m_Identifier.Cmp(Identifier) == 0 );
265 }
266 
267 //---------------------------------------------------------
271 //---------------------------------------------------------
273 {
274  m_Name = Name;
275 }
276 
277 //---------------------------------------------------------
281 //---------------------------------------------------------
283 {
284  m_Description = Description;
285 }
286 
287 //---------------------------------------------------------
291 //---------------------------------------------------------
292 void CSG_Parameters::Add_Reference(const CSG_String &Authors, const CSG_String &Year, const CSG_String &Title, const CSG_String &Where, const SG_Char *Link, const SG_Char *Link_Text)
293 {
294  CSG_String Reference("<b>" + Authors + " (" + Year + "):</b> " + Title + ". " + Where);
295 
296  if( Link && *Link )
297  {
298  Reference += CSG_String::Format(" <a href=\"%s\">%s</a>.", Link, Link_Text && *Link_Text ? Link_Text : Link);
299  }
300 
301  if( !Reference.is_Empty() )
302  {
303  m_References += Reference;
304  }
305 
306  m_References.Sort();
307 }
308 
309 //---------------------------------------------------------
313 //---------------------------------------------------------
314 void CSG_Parameters::Add_Reference(const CSG_String &Link, const SG_Char *Link_Text)
315 {
316  m_References += CSG_String::Format("<a href=\"%s\">%s</a>", Link.c_str(), Link_Text && *Link_Text ? Link_Text : Link.c_str());
317 
318  m_References.Sort();
319 }
320 
321 //---------------------------------------------------------
325 //---------------------------------------------------------
327 {
328  m_References.Clear();
329 }
330 
331 //---------------------------------------------------------
335 //---------------------------------------------------------
336 void CSG_Parameters::Set_Enabled(bool bEnabled)
337 {
338  for(int i=0; i<m_nParameters; i++)
339  {
340  m_Parameters[i]->Set_Enabled(bEnabled);
341  }
342 }
343 
344 //---------------------------------------------------------
348 //---------------------------------------------------------
349 void CSG_Parameters::Set_Enabled(const CSG_String &Identifier, bool bEnabled)
350 {
351  CSG_Parameter *pParameter = Get_Parameter(Identifier);
352 
353  if( pParameter )
354  {
355  pParameter->Set_Enabled(bEnabled);
356  }
357 }
358 
359 
361 // //
363 
364 //---------------------------------------------------------
366 {
367  return( _Add(pParameter) );
368 }
369 
370 //---------------------------------------------------------
371 CSG_Parameter * CSG_Parameters::Add_Node(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
372 {
373  return( _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Node, PARAMETER_INFORMATION) );
374 }
375 
376 //---------------------------------------------------------
385 CSG_Parameter * CSG_Parameters::Add_Value(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, TSG_Parameter_Type Type, double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
386 {
387  return( _Add_Value(ParentID, ID, Name, Description, false, Type, Value, Minimum, bMinimum, Maximum, bMaximum) );
388 }
389 
390 CSG_Parameter * CSG_Parameters::Add_Info_Value(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, TSG_Parameter_Type Type, double Value)
391 {
392  return( _Add_Value(ParentID, ID, Name, Description, true, Type, Value, 0.0, false, 0.0, false) );
393 }
394 
395 //---------------------------------------------------------
396 CSG_Parameter * CSG_Parameters::Add_Bool (const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool Value)
397 {
398  return( Add_Value(ParentID, ID, Name, Description, PARAMETER_TYPE_Bool , Value ? 1.0 : 0.0) );
399 }
400 
401 CSG_Parameter * CSG_Parameters::Add_Int (const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value, int Minimum, bool bMinimum, int Maximum, bool bMaximum)
402 {
403  return( Add_Value(ParentID, ID, Name, Description, PARAMETER_TYPE_Int , Value, Minimum, bMinimum, Maximum, bMaximum) );
404 }
405 
406 CSG_Parameter * CSG_Parameters::Add_Double(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
407 {
408  return( Add_Value(ParentID, ID, Name, Description, PARAMETER_TYPE_Double, Value, Minimum, bMinimum, Maximum, bMaximum) );
409 }
410 
411 CSG_Parameter * CSG_Parameters::Add_Degree(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
412 {
413  return( Add_Value(ParentID, ID, Name, Description, PARAMETER_TYPE_Degree, Value, Minimum, bMinimum, Maximum, bMaximum) );
414 }
415 
416 CSG_Parameter * CSG_Parameters::Add_Date (const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value) // Julian Day Number
417 {
418  if( !Value )
419  {
420  Value = CSG_DateTime::Now().Get_JDN();
421  }
422 
423  return( Add_Value(ParentID, ID, Name, Description, PARAMETER_TYPE_Date , Value) );
424 }
425 
426 CSG_Parameter * CSG_Parameters::Add_Color (const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value)
427 {
428  return( Add_Value(ParentID, ID, Name, Description, PARAMETER_TYPE_Color , Value) );
429 }
430 
431 //---------------------------------------------------------
432 CSG_Parameter * CSG_Parameters::Add_Range (const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Range_Min, double Range_Max, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
433 {
434  return( _Add_Range(ParentID, ID, Name, Description, false, Range_Min, Range_Max, Minimum, bMinimum, Maximum, bMaximum) );
435 }
436 
437 CSG_Parameter * CSG_Parameters::Add_Info_Range(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Range_Min, double Range_Max)
438 {
439  return( _Add_Range(ParentID, ID, Name, Description, true, Range_Min, Range_Max, 0.0, false, 0.0, false) );
440 }
441 
442 //---------------------------------------------------------
451 //---------------------------------------------------------
452 CSG_Parameter * CSG_Parameters::Add_Data_Type(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Data_Types, TSG_Data_Type Default, const CSG_String &User)
453 {
454  CSG_Parameter *pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Data_Type, 0);
455 
456  bool bCallback = Set_Callback(false);
457  pParameter->asDataType()->Set_Data_Types(Data_Types, Default, User);
458  Set_Callback(bCallback);
459 
460  return( pParameter );
461 }
462 
463 //---------------------------------------------------------
464 CSG_Parameter * CSG_Parameters::Add_Choice(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items, int Default)
465 {
466  CSG_Parameter *pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Choice, 0);
467 
468  pParameter->asChoice()->Set_Items(Items);
469 
470  bool bCallback = Set_Callback(false);
471  pParameter->Set_Value (Default);
472  pParameter->Set_Default(Default);
473  Set_Callback(bCallback);
474 
475  return( pParameter );
476 }
477 
478 //---------------------------------------------------------
479 CSG_Parameter * CSG_Parameters::Add_Choices(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items)
480 {
481  CSG_Parameter *pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Choices, 0);
482 
483  pParameter->asChoices()->Set_Items(Items);
484 
485  return( pParameter );
486 }
487 
488 //---------------------------------------------------------
489 CSG_Parameter * CSG_Parameters::Add_String(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &String, bool bLongText, bool bPassword)
490 {
491  return( _Add_String(ParentID, ID, Name, Description, false, String, bLongText, bPassword) );
492 }
493 
494 CSG_Parameter * CSG_Parameters::Add_Info_String(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &String, bool bLongText)
495 {
496  return( _Add_String(ParentID, ID, Name, Description, true, String, bLongText, false) );
497 }
498 
499 //---------------------------------------------------------
500 CSG_Parameter * CSG_Parameters::Add_FilePath(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const SG_Char *Filter, const SG_Char *Default, bool bSave, bool bDirectory, bool bMultiple)
501 {
502  CSG_Parameter *pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_FilePath, 0);
503 
504  pParameter->asFilePath()->Set_Filter (Filter );
505  pParameter->asFilePath()->Set_Flag_Save (bSave );
506  pParameter->asFilePath()->Set_Flag_Multiple (bMultiple );
507  pParameter->asFilePath()->Set_Flag_Directory(bDirectory);
508 
509  bool bCallback = Set_Callback(false);
510  pParameter->Set_Value (Default);
511  pParameter->Set_Default(Default);
512  Set_Callback(bCallback);
513 
514  return( pParameter );
515 }
516 
517 //---------------------------------------------------------
518 CSG_Parameter * CSG_Parameters::Add_Font(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const SG_Char *pInit)
519 {
520  CSG_Parameter *pParameter;
521 
522  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Font, 0);
523 
524  if( pInit && *pInit )
525  {
526  bool bCallback = Set_Callback(false);
527  pParameter->Set_Value (pInit);
528  pParameter->Set_Default(pInit);
529  Set_Callback(bCallback);
530  }
531 
532  return( pParameter );
533 }
534 
535 //---------------------------------------------------------
536 CSG_Parameter * CSG_Parameters::Add_Colors(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, CSG_Colors *pInit)
537 {
538  CSG_Parameter *pParameter;
539 
540  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Colors, 0);
541 
542  pParameter->asColors()->Assign(pInit);
543 
544  return( pParameter );
545 }
546 
547 //---------------------------------------------------------
548 CSG_Parameter * CSG_Parameters::Add_FixedTable(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, CSG_Table *pTemplate)
549 {
550  CSG_Parameter *pParameter;
551 
552  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_FixedTable, 0);
553 
554  pParameter->asTable()->Create(pTemplate);
555  pParameter->asTable()->Set_Name(Name);
556  pParameter->asTable()->Assign_Values(pTemplate);
557 
558  return( pParameter );
559 }
560 
561 
563 // //
565 
566 //---------------------------------------------------------
567 CSG_Parameter * CSG_Parameters::Add_Grid_System(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, CSG_Grid_System *pInit)
568 {
569  CSG_Parameter *pParameter;
570 
571  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Grid_System, 0);
572 
573  if( pInit )
574  {
575  pParameter->asGrid_System()->Assign(*pInit);
576  }
577 
578  return( pParameter );
579 }
580 
581 //---------------------------------------------------------
582 CSG_Parameter * CSG_Parameters::Add_Grid(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent, TSG_Data_Type Preferred_Type)
583 {
584  CSG_Parameter *pParameter, *pParent = Get_Parameter(ParentID);
585 
586  CSG_String SystemID;
587 
588  if( pParent && pParent->Get_Type() == PARAMETER_TYPE_Grid_System )
589  {
590  SystemID = pParent->Get_Identifier();
591  }
592  else if( bSystem_Dependent && m_pGrid_System )
593  {
594  SystemID = m_pGrid_System->Get_Identifier();
595  }
596  else
597  {
598  pParent = Add_Grid_System(pParent ? pParent->Get_Identifier() : SG_T(""), ID + "_GRIDSYSTEM", _TL("Grid system"), "");
599  SystemID = pParent->Get_Identifier();
600  }
601 
602  pParameter = _Add(SystemID, ID, Name, Description, PARAMETER_TYPE_Grid, Constraint);
603 
604  ((CSG_Parameter_Grid *)pParameter)->Set_Preferred_Type(Preferred_Type);
605 
606  return( pParameter );
607 }
608 
609 //---------------------------------------------------------
610 CSG_Parameter * CSG_Parameters::Add_Grid_or_Const(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum, bool bSystem_Dependent)
611 {
612  CSG_Parameter *pParameter = Add_Grid(ParentID, ID, Name, Description, PARAMETER_INPUT_OPTIONAL, bSystem_Dependent);
613 
614  ((CSG_Parameter_Grid *)pParameter)->Add_Default(Value, Minimum, bMinimum, Maximum, bMaximum);
615 
616  return( pParameter );
617 }
618 
619 //---------------------------------------------------------
620 CSG_Parameter * CSG_Parameters::Add_Grid_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
621 {
622  CSG_Parameter *pParameter;
623 
624  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_DataObject_Output, PARAMETER_OUTPUT_OPTIONAL);
625 
626  ((CSG_Parameter_Data_Object_Output *)pParameter)->Set_DataObject_Type(SG_DATAOBJECT_TYPE_Grid);
627 
628  return( pParameter );
629 }
630 
631 //---------------------------------------------------------
632 CSG_Parameter * CSG_Parameters::Add_Grid_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent)
633 {
634  CSG_Parameter *pParameter, *pParent = Get_Parameter(ParentID);
635 
636  CSG_String SystemID;
637 
638  if( pParent && pParent->Get_Type() == PARAMETER_TYPE_Grid_System )
639  {
640  SystemID = pParent->Get_Identifier();
641  }
642  else if( bSystem_Dependent && m_pGrid_System && !((Constraint & PARAMETER_OUTPUT) && (Constraint & PARAMETER_OPTIONAL)) )
643  {
644  SystemID = m_pGrid_System->Get_Identifier();
645  }
646 
647  pParameter = _Add(SystemID, ID, Name, Description, PARAMETER_TYPE_Grid_List, Constraint);
648 
649  return( pParameter );
650 }
651 
652 
654 // //
656 
657 //---------------------------------------------------------
658 CSG_Parameter * CSG_Parameters::Add_Grids(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent, TSG_Data_Type Preferred_Type)
659 {
660  CSG_Parameter *pParameter, *pParent = Get_Parameter(ParentID);
661 
662  CSG_String SystemID;
663 
664  if( pParent && pParent->Get_Type() == PARAMETER_TYPE_Grid_System )
665  {
666  SystemID = pParent->Get_Identifier();
667  }
668  else if( bSystem_Dependent && m_pGrid_System )
669  {
670  SystemID = m_pGrid_System->Get_Identifier();
671  }
672  else
673  {
674  pParent = Add_Grid_System(pParent ? pParent->Get_Identifier() : SG_T(""), ID + "_GRIDSYSTEM", _TL("Grid system"), "");
675  SystemID = pParent->Get_Identifier();
676  }
677 
678  pParameter = _Add(SystemID, ID, Name, Description, PARAMETER_TYPE_Grids, Constraint);
679 
680  ((CSG_Parameter_Grids *)pParameter)->Set_Preferred_Type(Preferred_Type);
681 
682  return( pParameter );
683 }
684 
685 //---------------------------------------------------------
686 CSG_Parameter * CSG_Parameters::Add_Grids_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
687 {
688  CSG_Parameter *pParameter;
689 
690  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_DataObject_Output, PARAMETER_OUTPUT_OPTIONAL);
691 
692  ((CSG_Parameter_Data_Object_Output *)pParameter)->Set_DataObject_Type(SG_DATAOBJECT_TYPE_Grids);
693 
694  return( pParameter );
695 }
696 
697 //---------------------------------------------------------
698 CSG_Parameter * CSG_Parameters::Add_Grids_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent)
699 {
700  CSG_Parameter *pParameter, *pParent = Get_Parameter(ParentID);
701 
702  CSG_String SystemID;
703 
704  if( pParent && pParent->Get_Type() == PARAMETER_TYPE_Grid_System )
705  {
706  SystemID = pParent->Get_Identifier();
707  }
708  else if( bSystem_Dependent && m_pGrid_System && !((Constraint & PARAMETER_OUTPUT) && (Constraint & PARAMETER_OPTIONAL)) )
709  {
710  SystemID = m_pGrid_System->Get_Identifier();
711  }
712 
713  pParameter = _Add(SystemID, ID, Name, Description, PARAMETER_TYPE_Grids_List, Constraint);
714 
715  return( pParameter );
716 }
717 
718 
720 // //
722 
723 //---------------------------------------------------------
724 CSG_Parameter * CSG_Parameters::Add_Table_Field(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool bAllowNone)
725 {
726  CSG_Parameter *pParent = Get_Parameter(ParentID);
727 
728  if( pParent && (
729  pParent->Get_Type() == PARAMETER_TYPE_Table
730  || pParent->Get_Type() == PARAMETER_TYPE_Shapes
731  || pParent->Get_Type() == PARAMETER_TYPE_TIN
732  || pParent->Get_Type() == PARAMETER_TYPE_PointCloud) )
733  {
734  return( _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Table_Field, bAllowNone ? PARAMETER_OPTIONAL : 0) );
735  }
736 
737  return( NULL );
738 }
739 
740 //---------------------------------------------------------
741 CSG_Parameter * CSG_Parameters::Add_Table_Field_or_Const(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
742 {
743  CSG_Parameter *pParameter = Add_Table_Field(ParentID, ID, Name, Description, true);
744 
745  if( pParameter )
746  {
747  ((CSG_Parameter_Table_Field *)pParameter)->Add_Default(Value, Minimum, bMinimum, Maximum, bMaximum);
748  }
749 
750  return( pParameter );
751 }
752 
753 //---------------------------------------------------------
754 CSG_Parameter * CSG_Parameters::Add_Table_Fields(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
755 {
756  CSG_Parameter *pParent = Get_Parameter(ParentID);
757 
758  if( pParent && (
759  pParent->Get_Type() == PARAMETER_TYPE_Table
760  || pParent->Get_Type() == PARAMETER_TYPE_Shapes
761  || pParent->Get_Type() == PARAMETER_TYPE_TIN
762  || pParent->Get_Type() == PARAMETER_TYPE_PointCloud) )
763  {
764  return( _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Table_Fields, 0) );
765  }
766 
767  return( NULL );
768 }
769 
770 //---------------------------------------------------------
771 CSG_Parameter * CSG_Parameters::Add_Table(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
772 {
773  CSG_Parameter *pParameter;
774 
775  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Table, Constraint);
776 
777  return( pParameter );
778 }
779 
780 //---------------------------------------------------------
781 CSG_Parameter * CSG_Parameters::Add_Table_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
782 {
783  CSG_Parameter *pParameter;
784 
785  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_DataObject_Output, PARAMETER_OUTPUT_OPTIONAL);
786 
787  ((CSG_Parameter_Data_Object_Output *)pParameter)->Set_DataObject_Type(SG_DATAOBJECT_TYPE_Table);
788 
789  return( pParameter );
790 }
791 
792 //---------------------------------------------------------
793 CSG_Parameter * CSG_Parameters::Add_Table_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
794 {
795  CSG_Parameter *pParameter;
796 
797  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Table_List, Constraint);
798 
799  return( pParameter );
800 }
801 
802 
804 // //
806 
807 //---------------------------------------------------------
808 CSG_Parameter * CSG_Parameters::Add_Shapes(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, TSG_Shape_Type Shape_Type)
809 {
810  CSG_Parameter *pParameter;
811 
812  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Shapes, Constraint);
813 
814  ((CSG_Parameter_Shapes *)pParameter)->Set_Shape_Type(Shape_Type);
815 
816  return( pParameter );
817 }
818 
819 //---------------------------------------------------------
820 CSG_Parameter * CSG_Parameters::Add_Shapes_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
821 {
822  CSG_Parameter *pParameter;
823 
824  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_DataObject_Output, PARAMETER_OUTPUT_OPTIONAL);
825 
826  ((CSG_Parameter_Data_Object_Output *)pParameter)->Set_DataObject_Type(SG_DATAOBJECT_TYPE_Shapes);
827 
828  return( pParameter );
829 }
830 
831 //---------------------------------------------------------
832 CSG_Parameter * CSG_Parameters::Add_Shapes_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, TSG_Shape_Type Type)
833 {
834  CSG_Parameter *pParameter;
835 
836  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Shapes_List, Constraint);
837 
838  ((CSG_Parameter_Shapes_List *)pParameter)->Set_Shape_Type(Type);
839 
840  return( pParameter );
841 }
842 
843 
845 // //
847 
848 //---------------------------------------------------------
849 CSG_Parameter * CSG_Parameters::Add_TIN(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
850 {
851  CSG_Parameter *pParameter;
852 
853  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_TIN, Constraint);
854 
855  return( pParameter );
856 }
857 
858 //---------------------------------------------------------
859 CSG_Parameter * CSG_Parameters::Add_TIN_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
860 {
861  CSG_Parameter *pParameter;
862 
863  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_DataObject_Output, PARAMETER_OUTPUT_OPTIONAL);
864 
865  ((CSG_Parameter_Data_Object_Output *)pParameter)->Set_DataObject_Type(SG_DATAOBJECT_TYPE_TIN);
866 
867  return( pParameter );
868 }
869 
870 //---------------------------------------------------------
871 CSG_Parameter * CSG_Parameters::Add_TIN_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
872 {
873  CSG_Parameter *pParameter;
874 
875  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_TIN_List, Constraint);
876 
877  return( pParameter );
878 }
879 
880 
882 // //
884 
885 //---------------------------------------------------------
886 CSG_Parameter * CSG_Parameters::Add_PointCloud(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
887 {
888  CSG_Parameter *pParameter;
889 
890  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_PointCloud, Constraint);
891 
892  return( pParameter );
893 }
894 
895 //---------------------------------------------------------
896 CSG_Parameter * CSG_Parameters::Add_PointCloud_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
897 {
898  CSG_Parameter *pParameter;
899 
900  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_DataObject_Output, PARAMETER_OUTPUT_OPTIONAL);
901 
902  ((CSG_Parameter_Data_Object_Output *)pParameter)->Set_DataObject_Type(SG_DATAOBJECT_TYPE_PointCloud);
903 
904  return( pParameter );
905 }
906 
907 //---------------------------------------------------------
908 CSG_Parameter * CSG_Parameters::Add_PointCloud_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
909 {
910  CSG_Parameter *pParameter;
911 
912  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_PointCloud_List, Constraint);
913 
914  return( pParameter );
915 }
916 
917 
919 // //
921 
922 //---------------------------------------------------------
923 CSG_Parameter * CSG_Parameters::Add_Parameters(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
924 {
925  CSG_Parameter *pParameter;
926 
927  pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Parameters, 0);
928 
929  pParameter->asParameters()->m_Callback = m_Callback;
930  pParameter->asParameters()->m_pTool = m_pTool;
931 
932  return( pParameter );
933 }
934 
935 
937 // //
939 
940 //---------------------------------------------------------
941 CSG_Parameter * CSG_Parameters::_Add_Value(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool bInformation, TSG_Parameter_Type Type, double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
942 {
943  switch( Type ) // Check if Type is valid...
944  {
945  case PARAMETER_TYPE_Bool :
946  case PARAMETER_TYPE_Int :
949  case PARAMETER_TYPE_Date :
950  case PARAMETER_TYPE_Color :
951  break;
952 
953  default: // if not valid set Type to [double]...
954  Type = PARAMETER_TYPE_Double;
955  }
956 
957  CSG_Parameter *pParameter = _Add(ParentID, ID, Name, Description, Type, bInformation ? PARAMETER_INFORMATION : 0);
958 
959  bool bCallback = Set_Callback(false);
960 
961  if( !bInformation )
962  {
963  if( Type == PARAMETER_TYPE_Int
964  || Type == PARAMETER_TYPE_Double
965  || Type == PARAMETER_TYPE_Degree )
966  {
967  pParameter->asValue()->Set_Minimum(Minimum, bMinimum);
968  pParameter->asValue()->Set_Maximum(Maximum, bMaximum);
969  }
970  }
971 
972  pParameter->Set_Value(Value);
973 
974  Set_Callback(bCallback);
975 
976  if( !bInformation )
977  {
978  switch( Type )
979  {
980  case PARAMETER_TYPE_Bool :
981  case PARAMETER_TYPE_Int :
982  case PARAMETER_TYPE_Color :
983  pParameter->Set_Default((int)Value);
984  break;
985 
986  case PARAMETER_TYPE_Date :
987  pParameter->Set_Default(pParameter->asString());
988  break;
989 
990  default:
991  pParameter->Set_Default( Value);
992  }
993  }
994 
995  return( pParameter );
996 }
997 
998 //---------------------------------------------------------
999 CSG_Parameter * CSG_Parameters::_Add_Range(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool bInformation, double Default_Min, double Default_Max, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
1000 {
1001  //-----------------------------------------------------
1002  if( Default_Min > Default_Max )
1003  {
1004  double d = Default_Min;
1005  Default_Min = Default_Max;
1006  Default_Max = d;
1007  }
1008 
1009  //-----------------------------------------------------
1010  CSG_Parameter *pParameter = _Add(ParentID, ID, Name, Description, PARAMETER_TYPE_Range, bInformation ? PARAMETER_INFORMATION : 0);
1011 
1012  pParameter->asRange()->Get_Min_Parameter()->Set_Minimum(Minimum, bMinimum);
1013  pParameter->asRange()->Get_Min_Parameter()->Set_Maximum(Maximum, bMaximum);
1014  pParameter->asRange()->Get_Min_Parameter()->Set_Default(Default_Min);
1015  pParameter->asRange()->Set_Min(Default_Min);
1016 
1017  pParameter->asRange()->Get_Max_Parameter()->Set_Minimum(Minimum, bMinimum);
1018  pParameter->asRange()->Get_Max_Parameter()->Set_Maximum(Maximum, bMaximum);
1019  pParameter->asRange()->Get_Max_Parameter()->Set_Default(Default_Max);
1020  pParameter->asRange()->Set_Max(Default_Max);
1021 
1022  return( pParameter );
1023 }
1024 
1025 //---------------------------------------------------------
1026 CSG_Parameter * CSG_Parameters::_Add_String(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool bInformation, const SG_Char *String, bool bLongText, bool bPassword)
1027 {
1028  CSG_Parameter *pParameter;
1029 
1030  pParameter = _Add(ParentID, ID, Name, Description, bLongText ? PARAMETER_TYPE_Text : PARAMETER_TYPE_String, bInformation ? PARAMETER_INFORMATION : 0);
1031 
1032  bool bCallback = Set_Callback(false);
1033  pParameter->Set_Value (String);
1034  pParameter->Set_Default(String);
1035  Set_Callback(bCallback);
1036 
1037  ((CSG_Parameter_String *)pParameter)->Set_Password(bPassword);
1038 
1039  return( pParameter );
1040 }
1041 
1042 
1044 // //
1046 
1047 //---------------------------------------------------------
1048 #ifdef _DEBUG
1049 #include <wx/debug.h>
1050 #include <wx/string.h>
1051 #endif
1052 
1053 //---------------------------------------------------------
1054 CSG_Parameter * CSG_Parameters::_Add(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, TSG_Parameter_Type Type, int Constraint)
1055 {
1056 #ifdef _DEBUG
1057  wxASSERT_MSG(!ID.is_Empty() , wxString::Format("CSG_Parameter::_Add(): Parameter ID is empty!"));
1058  wxASSERT_MSG(!Get_Parameter(ID), wxString::Format("CSG_Parameter::_Add(): Parameter ID \"%s\" is already in use!", ID.c_str()));
1059 #endif
1060 
1061  CSG_Parameter *pParameter;
1062 
1063  switch( Type )
1064  {
1065  default:
1066  return( NULL );
1067 
1068  case PARAMETER_TYPE_Node : pParameter = new CSG_Parameter_Node (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1069 
1070  case PARAMETER_TYPE_Bool : pParameter = new CSG_Parameter_Bool (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1071  case PARAMETER_TYPE_Int : pParameter = new CSG_Parameter_Int (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1072  case PARAMETER_TYPE_Double : pParameter = new CSG_Parameter_Double (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1073  case PARAMETER_TYPE_Degree : pParameter = new CSG_Parameter_Degree (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1074  case PARAMETER_TYPE_Date : pParameter = new CSG_Parameter_Date (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1075  case PARAMETER_TYPE_Range : pParameter = new CSG_Parameter_Range (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1076  case PARAMETER_TYPE_Data_Type : pParameter = new CSG_Parameter_Data_Type (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1077  case PARAMETER_TYPE_Choice : pParameter = new CSG_Parameter_Choice (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1078  case PARAMETER_TYPE_Choices : pParameter = new CSG_Parameter_Choices (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1079 
1080  case PARAMETER_TYPE_String : pParameter = new CSG_Parameter_String (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1081  case PARAMETER_TYPE_Text : pParameter = new CSG_Parameter_Text (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1082  case PARAMETER_TYPE_FilePath : pParameter = new CSG_Parameter_File_Name (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1083 
1084  case PARAMETER_TYPE_Font : pParameter = new CSG_Parameter_Font (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1085  case PARAMETER_TYPE_Color : pParameter = new CSG_Parameter_Color (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1086  case PARAMETER_TYPE_Colors : pParameter = new CSG_Parameter_Colors (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1087  case PARAMETER_TYPE_FixedTable : pParameter = new CSG_Parameter_Fixed_Table (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1088  case PARAMETER_TYPE_Grid_System : pParameter = new CSG_Parameter_Grid_System (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1089  case PARAMETER_TYPE_Table_Field : pParameter = new CSG_Parameter_Table_Field (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1090  case PARAMETER_TYPE_Table_Fields : pParameter = new CSG_Parameter_Table_Fields (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1091 
1092  case PARAMETER_TYPE_DataObject_Output: pParameter = new CSG_Parameter_Data_Object_Output(this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1093  case PARAMETER_TYPE_Grid : pParameter = new CSG_Parameter_Grid (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1094  case PARAMETER_TYPE_Grids : pParameter = new CSG_Parameter_Grids (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1095  case PARAMETER_TYPE_Table : pParameter = new CSG_Parameter_Table (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1096  case PARAMETER_TYPE_Shapes : pParameter = new CSG_Parameter_Shapes (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1097  case PARAMETER_TYPE_TIN : pParameter = new CSG_Parameter_TIN (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1098  case PARAMETER_TYPE_PointCloud : pParameter = new CSG_Parameter_PointCloud (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1099 
1100  case PARAMETER_TYPE_Grid_List : pParameter = new CSG_Parameter_Grid_List (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1101  case PARAMETER_TYPE_Grids_List : pParameter = new CSG_Parameter_Grids_List (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1102  case PARAMETER_TYPE_Table_List : pParameter = new CSG_Parameter_Table_List (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1103  case PARAMETER_TYPE_Shapes_List : pParameter = new CSG_Parameter_Shapes_List (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1104  case PARAMETER_TYPE_TIN_List : pParameter = new CSG_Parameter_TIN_List (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1105  case PARAMETER_TYPE_PointCloud_List : pParameter = new CSG_Parameter_PointCloud_List (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1106 
1107  case PARAMETER_TYPE_Parameters : pParameter = new CSG_Parameter_Parameters (this, Get_Parameter(ParentID), ID, Name, Description, Constraint); break;
1108  }
1109 
1110  m_Parameters = (CSG_Parameter **)SG_Realloc(m_Parameters, (m_nParameters + 1) * sizeof(CSG_Parameter *));
1111  m_Parameters[m_nParameters++] = pParameter;
1112 
1113  pParameter->_Set_String();
1114 
1115  return( pParameter );
1116 }
1117 
1118 //---------------------------------------------------------
1119 CSG_Parameter * CSG_Parameters::_Add(CSG_Parameter *pSource)
1120 {
1121  CSG_Parameter *pParameter = !pSource ? NULL : _Add(
1122  pSource->Get_Parent() ? pSource->Get_Parent()->Get_Identifier() : SG_T(""),
1123  pSource->Get_Identifier (),
1124  pSource->Get_Name (),
1125  pSource->Get_Description(),
1126  pSource->Get_Type (),
1127  pSource->m_Constraint
1128  );
1129 
1130  if( pParameter )
1131  {
1132  pParameter->Assign(pSource);
1133  }
1134 
1135  return( pParameter );
1136 }
1137 
1138 
1140 // //
1142 
1143 //---------------------------------------------------------
1145 {
1146  if( m_Parameters && !ID.is_Empty() )
1147  {
1148  for(int i=0; i<m_nParameters; i++)
1149  {
1150  if( m_Parameters[i]->Cmp_Identifier(ID) )
1151  {
1152  return( m_Parameters[i] );
1153  }
1154  }
1155 
1156  //-------------------------------------------------
1157  if( ID.Find('.') > 0 ) // id not found? check for sub-parameter ('id.id')!
1158  {
1159  CSG_Parameter *pParameter = Get_Parameter(ID.BeforeFirst('.'));
1160 
1161  if( pParameter )
1162  {
1163  switch( pParameter->Get_Type() )
1164  {
1166  return( pParameter->asParameters()->Get_Parameter(ID.AfterFirst('.')) );
1167 
1168  case PARAMETER_TYPE_Range :
1169  if( !ID.AfterFirst('.').CmpNoCase("min") || !ID.AfterFirst('.').CmpNoCase("minimum") )
1170  {
1171  return( pParameter->asRange()->Get_Min_Parameter() );
1172  }
1173 
1174  if( !ID.AfterFirst('.').CmpNoCase("max") || !ID.AfterFirst('.').CmpNoCase("maximum") )
1175  {
1176  return( pParameter->asRange()->Get_Max_Parameter() );
1177  }
1178  break;
1179 
1180  default:
1181  break;
1182  }
1183  }
1184  }
1185  }
1186 
1187  return( NULL );
1188 }
1189 
1190 //---------------------------------------------------------
1191 bool CSG_Parameters::Del_Parameter(int iParameter)
1192 {
1193  if( m_Parameters && iParameter >= 0 && iParameter < m_nParameters )
1194  {
1195  CSG_Parameter *pParameter = m_Parameters[iParameter];
1196 
1197  for(m_nParameters--; iParameter<m_nParameters; iParameter++)
1198  {
1199  m_Parameters[iParameter] = m_Parameters[iParameter + 1];
1200  }
1201 
1202  m_Parameters = (CSG_Parameter **)SG_Realloc(m_Parameters, m_nParameters * sizeof(CSG_Parameter *));
1203 
1204  for(iParameter=pParameter->Get_Children_Count()-1; iParameter>=0; iParameter--)
1205  {
1206  Del_Parameter(pParameter->Get_Child(iParameter)->Get_Identifier());
1207  }
1208 
1209  CSG_Parameter *pParent = pParameter->Get_Parent();
1210 
1211  if( pParent )
1212  {
1213  for(iParameter=0; iParameter<pParent->m_nChildren; iParameter++)
1214  {
1215  if( pParent->m_Children[iParameter] == pParameter )
1216  {
1217  pParent->m_nChildren--;
1218 
1219  for( ; iParameter<pParent->m_nChildren; iParameter++)
1220  {
1221  pParent->m_Children[iParameter] = pParent->m_Children[iParameter + 1];
1222  }
1223  }
1224  }
1225 
1226  pParent->m_Children = (CSG_Parameter **)SG_Realloc(pParent->m_Children, pParent->m_nChildren * sizeof(CSG_Parameter *));
1227  }
1228 
1229  delete(pParameter);
1230 
1231  return( true );
1232  }
1233 
1234  return( false );
1235 }
1236 
1237 //---------------------------------------------------------
1239 {
1240  if( m_Parameters && Identifier.Length() )
1241  {
1242  for(int i=0; i<m_nParameters; i++)
1243  {
1244  if( !m_Parameters[i]->m_Identifier.Cmp(Identifier) )
1245  {
1246  return( Del_Parameter(i) );
1247  }
1248  }
1249  }
1250 
1251  return( false );
1252 }
1253 
1254 //---------------------------------------------------------
1256 {
1257  if( m_nParameters > 0 )
1258  {
1259  m_pGrid_System = NULL;
1260 
1261  for(int i=0; i<m_nParameters; i++)
1262  {
1263  delete(m_Parameters[i]);
1264  }
1265 
1266  SG_Free(m_Parameters);
1267 
1268  m_Parameters = NULL;
1269  m_nParameters = 0;
1270  }
1271 
1272  return( true );
1273 }
1274 
1275 
1277 // //
1278 // Callback //
1279 // //
1281 
1282 //---------------------------------------------------------
1283 // Callback function used to react on parameter changes.
1284 // Return value is the previously set callback function.
1286 {
1287  TSG_PFNC_Parameter_Changed Previous = m_Callback;
1288 
1289  m_Callback = Callback;
1290 
1291  for(int i=0; i<m_nParameters; i++)
1292  {
1293  if( m_Parameters[i]->Get_Type() == PARAMETER_TYPE_Parameters)
1294  {
1295  m_Parameters[i]->asParameters()->Set_Callback_On_Parameter_Changed(Callback);
1296  }
1297  }
1298 
1299  return( Previous );
1300 }
1301 
1302 //---------------------------------------------------------
1303 // If switched off parameter changes will not invoke a
1304 // consecutive call to the On_Parameter_Changed function.
1305 // Return value is the previous state.
1307 {
1308  bool bPrevious = m_bCallback;
1309 
1310  m_bCallback = bActive;
1311 
1312  for(int i=0; i<m_nParameters; i++)
1313  {
1314  if( m_Parameters[i]->Get_Type() == PARAMETER_TYPE_Parameters)
1315  {
1316  m_Parameters[i]->asParameters()->Set_Callback(bActive);
1317  }
1318  }
1319 
1320  return( bPrevious );
1321 }
1322 
1323 //---------------------------------------------------------
1324 bool CSG_Parameters::_On_Parameter_Changed(CSG_Parameter *pParameter, int Flags)
1325 {
1326  if( m_Callback && m_bCallback )
1327  {
1328  bool bCallback = Set_Callback(false);
1329 
1330  m_Callback(pParameter, Flags);
1331 
1332  Set_Callback(bCallback);
1333 
1334  return( true );
1335  }
1336 
1337  return( false );
1338 }
1339 
1340 
1342 // //
1344 
1345 //---------------------------------------------------------
1346 bool CSG_Parameters::Set_Parameter(const char *ID, CSG_Parameter *pValue) { return( Set_Parameter(CSG_String(ID), pValue) ); }
1347 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, CSG_Parameter *pValue) { return( Set_Parameter(CSG_String(ID), pValue) ); }
1349 {
1350  CSG_Parameter *pTarget = Get_Parameter(ID);
1351 
1352  return( pTarget && pValue && pTarget->Get_Type() == pValue->Get_Type() && pTarget->Assign(pValue) );
1353 }
1354 
1355 //---------------------------------------------------------
1356 bool CSG_Parameters::Set_Parameter(const char *ID, void *Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1357 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, void *Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1358 bool CSG_Parameters::Set_Parameter(const CSG_String &ID, void *Value, int Type)
1359 {
1360  CSG_Parameter *pTarget = Get_Parameter(ID);
1361 
1362  return( pTarget && (Type == PARAMETER_TYPE_Undefined || Type == pTarget->Get_Type()) && pTarget->Set_Value(Value) );
1363 }
1364 
1365 //---------------------------------------------------------
1366 bool CSG_Parameters::Set_Parameter(const char *ID, CSG_Data_Object *Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1367 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, CSG_Data_Object *Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1369 {
1370  CSG_Parameter *pTarget = Get_Parameter(ID);
1371 
1372  return( pTarget && (Type == PARAMETER_TYPE_Undefined || Type == pTarget->Get_Type()) && pTarget->Set_Value(Value) );
1373 }
1374 
1375 //---------------------------------------------------------
1376 bool CSG_Parameters::Set_Parameter(const char *ID, int Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1377 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, int Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1378 bool CSG_Parameters::Set_Parameter(const CSG_String &ID, int Value, int Type)
1379 {
1380  CSG_Parameter *pTarget = Get_Parameter(ID);
1381 
1382  return( pTarget && (Type == PARAMETER_TYPE_Undefined || Type == pTarget->Get_Type()) && pTarget->Set_Value(Value) );
1383 }
1384 
1385 //---------------------------------------------------------
1386 bool CSG_Parameters::Set_Parameter(const char *ID, double Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1387 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, double Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1388 bool CSG_Parameters::Set_Parameter(const CSG_String &ID, double Value, int Type)
1389 {
1390  CSG_Parameter *pTarget = Get_Parameter(ID);
1391 
1392  return( pTarget && (Type == PARAMETER_TYPE_Undefined || Type == pTarget->Get_Type()) && pTarget->Set_Value(Value) );
1393 }
1394 
1395 //---------------------------------------------------------
1396 bool CSG_Parameters::Set_Parameter(const char *ID, const CSG_String &Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1397 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, const CSG_String &Value, int Type) { return( Set_Parameter(CSG_String(ID), Value, Type) ); }
1398 bool CSG_Parameters::Set_Parameter(const CSG_String &ID, const CSG_String &Value, int Type)
1399 {
1400  CSG_Parameter *pTarget = Get_Parameter(ID);
1401 
1402  return( pTarget && (Type == PARAMETER_TYPE_Undefined || Type == pTarget->Get_Type()) && pTarget->Set_Value(Value) );
1403 }
1404 
1405 //---------------------------------------------------------
1406 bool CSG_Parameters::Set_Parameter(const CSG_String &ID, const char *Value, int Type) { return( Set_Parameter(ID, CSG_String(Value)) ); }
1407 bool CSG_Parameters::Set_Parameter(const char *ID, const char *Value, int Type) { return( Set_Parameter(ID, CSG_String(Value)) ); }
1408 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, const char *Value, int Type) { return( Set_Parameter(ID, CSG_String(Value)) ); }
1409 
1410 //---------------------------------------------------------
1411 bool CSG_Parameters::Set_Parameter(const CSG_String &ID, const wchar_t *Value, int Type) { return( Set_Parameter(ID, CSG_String(Value)) ); }
1412 bool CSG_Parameters::Set_Parameter(const char *ID, const wchar_t *Value, int Type) { return( Set_Parameter(ID, CSG_String(Value)) ); }
1413 bool CSG_Parameters::Set_Parameter(const wchar_t *ID, const wchar_t *Value, int Type) { return( Set_Parameter(ID, CSG_String(Value)) ); }
1414 
1415 
1417 // //
1419 
1420 //---------------------------------------------------------
1422 {
1423  Set_Callback(false);
1424 
1425  for(int i=0; i<Get_Count(); i++)
1426  {
1427  m_Parameters[i]->Restore_Default();
1428 
1429  if( bClearData )
1430  {
1431  if( m_Parameters[i]->is_DataObject() )
1432  {
1433  m_Parameters[i]->Set_Value(DATAOBJECT_NOTSET);
1434  }
1435  else if( m_Parameters[i]->is_DataObject_List() )
1436  {
1437  m_Parameters[i]->asList()->Del_Items();
1438  }
1439  }
1440  }
1441 
1442  Set_Callback(true);
1443 
1444  return( true );
1445 }
1446 
1447 
1449 // //
1451 
1452 //---------------------------------------------------------
1454 {
1455  return( pSource && pSource != this && Create(*pSource) );
1456 }
1457 
1458 //---------------------------------------------------------
1460 {
1461  if( !pSource || pSource == this )
1462  {
1463  return( false );
1464  }
1465 
1466  //-----------------------------------------------------
1467  int n = 0;
1468 
1469  for(int i=0; i<pSource->Get_Count(); i++)
1470  {
1471  CSG_Parameter *pParameter = Get_Parameter(pSource->Get_Parameter(i)->Get_Identifier());
1472 
1473  if( pParameter && pParameter->Get_Type() == pSource->Get_Parameter(i)->Get_Type() )
1474  {
1475  n++; pParameter->Assign(pSource->Get_Parameter(i));
1476  }
1477  }
1478 
1479  return( n > 0 );
1480 }
1481 
1482 //---------------------------------------------------------
1484 {
1485  if( !pSource || pSource == this )
1486  {
1487  return( false );
1488  }
1489 
1490  Del_Parameters();
1491 
1492  //-----------------------------------------------------
1493  for(int i=0; i<pSource->m_nParameters; i++)
1494  {
1495  _Add(pSource->m_Parameters[i]);
1496  }
1497 
1498  if( pSource->m_pGrid_System )
1499  {
1500  m_pGrid_System = Get_Parameter(pSource->m_pGrid_System->Get_Identifier());
1501  }
1502 
1503  return( m_nParameters == pSource->m_nParameters );
1504 }
1505 
1506 
1508 // //
1510 
1511 //---------------------------------------------------------
1513 {
1514  bool bResult = true;
1515 
1516  CSG_String sError;
1517 
1518  //-----------------------------------------------------
1519  for(int i=0; i<Get_Count(); i++)
1520  {
1521  if( m_Parameters[i]->Check(bSilent) == false )
1522  {
1523  bResult = false;
1524 
1525  sError.Append(CSG_String::Format("\n%s: %s", m_Parameters[i]->Get_Type_Name().c_str(), m_Parameters[i]->Get_Name()));
1526  }
1527  }
1528 
1529  //-----------------------------------------------------
1530  if( !bResult && !bSilent )
1531  {
1532  SG_UI_Dlg_Message(CSG_String::Format("%s\n%s", _TL("invalid input!"), sError.c_str()), Get_Name() );
1533  }
1534 
1535  return( bResult );
1536 }
1537 
1538 //---------------------------------------------------------
1539 bool CSG_Parameters::DataObjects_Create(void)
1540 {
1541  bool bResult = true;
1542 
1543  for(int i=0; bResult && i<Get_Count(); i++)
1544  {
1545  CSG_Parameter &P = *m_Parameters[i];
1546 
1547  //-------------------------------------------------
1548  if( P.Get_Type() == PARAMETER_TYPE_Parameters )
1549  {
1550  if( !P.asParameters()->DataObjects_Create() )
1551  {
1552  bResult = false;
1553  }
1554  }
1555  else if( P.Get_Type() == PARAMETER_TYPE_DataObject_Output )
1556  {
1557  if( m_pManager || P.asDataObject() == DATAOBJECT_CREATE )
1558  {
1560  }
1561  }
1562  else if( P.is_Input() )
1563  {
1564  if( P.is_Enabled() && P.Check(true) == false )
1565  {
1566  bResult = false;
1567 
1568  SG_UI_Dlg_Message(CSG_String::Format("%s\n[%s]\n%s", _TL("Input Error"), P.Get_Identifier(), P.Get_Name()), Get_Name());
1569  }
1570  }
1571 
1572  //-------------------------------------------------
1573  else if( P.is_DataObject_List() )
1574  {
1575  for(int j=P.asList()->Get_Item_Count()-1; j>=0; j--)
1576  {
1577  if( m_pManager && !m_pManager->Exists(P.asList()->Get_Item(j)) )
1578  {
1579  P.asList()->Del_Item(j);
1580  }
1581  }
1582  }
1583 
1584  //-------------------------------------------------
1585  else if( P.is_DataObject() && P.is_Enabled() == false )
1586  {
1587  if( P.asDataObject() != DATAOBJECT_CREATE && (!m_pManager || !m_pManager->Exists(P.asDataObject())) )
1588  {
1590  }
1591  }
1592 
1593  else if( P.is_DataObject() )
1594  {
1595  CSG_Data_Object *pObject = P.asDataObject();
1596 
1597  if( (pObject == DATAOBJECT_CREATE)
1598  || (pObject == DATAOBJECT_NOTSET && !P.is_Optional())
1599  || (pObject != DATAOBJECT_NOTSET && m_pManager && !m_pManager->Exists(pObject)) )
1600  {
1601  switch( P.Get_Type() )
1602  {
1603  case PARAMETER_TYPE_Table : pObject = SG_Create_Table (); break;
1604  case PARAMETER_TYPE_Shapes : pObject = SG_Create_Shapes (); break;
1605  case PARAMETER_TYPE_PointCloud: pObject = SG_Create_PointCloud(); break;
1606  case PARAMETER_TYPE_TIN : pObject = SG_Create_TIN (); break;
1607  case PARAMETER_TYPE_Grid : pObject = SG_Create_Grid (); break;
1608  case PARAMETER_TYPE_Grids : pObject = SG_Create_Grids (); break;
1609  default : pObject = NULL ; break;
1610  }
1611  }
1612 
1613  if( pObject )
1614  {
1615  if( P.Get_Type() == PARAMETER_TYPE_Shapes
1616  && ((CSG_Parameter_Shapes *)&P)->Get_Shape_Type() != SHAPE_TYPE_Undefined
1617  && ((CSG_Parameter_Shapes *)&P)->Get_Shape_Type() != pObject->asShapes()->Get_Type() )
1618  {
1619  if( has_GUI() && pObject->asShapes()->Get_Type() != SHAPE_TYPE_Undefined )
1620  {
1621  pObject = SG_Create_Shapes (((CSG_Parameter_Shapes *)&P)->Get_Shape_Type());
1622  }
1623  else
1624  {
1625  pObject->asShapes()->Create(((CSG_Parameter_Shapes *)&P)->Get_Shape_Type());
1626  }
1627  }
1628 
1630  {
1631  if( P.Get_Parent() && P.Get_Parent()->asGrid_System() && P.Get_Parent()->asGrid_System()->is_Valid() )
1632  {
1633  if( P.Get_Type() == PARAMETER_TYPE_Grid )
1634  {
1635  pObject->asGrid ()->Create(*P.Get_Parent()->asGrid_System() , ((CSG_Parameter_Grid *)&P)->Get_Preferred_Type());
1636  }
1637  else
1638  {
1639  pObject->asGrids()->Create(*P.Get_Parent()->asGrid_System(), 0, 0., ((CSG_Parameter_Grids *)&P)->Get_Preferred_Type());
1640  }
1641  }
1642  }
1643 
1644  if( P.Set_Value(pObject) )
1645  {
1646  pObject->Set_Name(P.Get_Name());
1647  pObject->Get_MetaData().Del_Children();
1648 
1649  if( m_pManager )
1650  {
1651  m_pManager->Add(pObject);
1652  }
1653  }
1654  else
1655  {
1656  delete(pObject);
1657 
1658  bResult = false;
1659 
1660  SG_UI_Dlg_Message(CSG_String::Format("%s\n[%s]\n%s", _TL("Output Error"), P.Get_Identifier(), P.Get_Name()), Get_Name());
1661  }
1662  }
1663  else // if( pObject == NULL )
1664  {
1665  if( !P.is_Optional() )
1666  {
1667  bResult = false;
1668 
1669  SG_UI_Dlg_Message(CSG_String::Format("%s\n[%s]\n%s", _TL("Output Error"), P.Get_Identifier(), P.Get_Name()), Get_Name());
1670  }
1671  }
1672  }
1673  }
1674 
1675  return( bResult );
1676 }
1677 
1678 //---------------------------------------------------------
1679 bool CSG_Parameters::DataObjects_Synchronize(void)
1680 {
1681  for(int i=0; i<Get_Count(); i++)
1682  {
1683  CSG_Parameter *p = m_Parameters[i];
1684 
1685  if( p->Get_Type() == PARAMETER_TYPE_Parameters )
1686  {
1687  p->asParameters()->DataObjects_Synchronize();
1688  }
1689 
1690  //-------------------------------------------------
1691  else if( p->is_Output() )
1692  {
1693  if( p->is_DataObject() )
1694  {
1695  CSG_Data_Object *pObject = p->asDataObject();
1696 
1697  if( pObject == DATAOBJECT_CREATE )
1698  {
1700  }
1701  else if( pObject != DATAOBJECT_NOTSET )
1702  {
1703  if( pObject->asShapes() && pObject->asShapes()->Get_Type() == SHAPE_TYPE_Undefined
1704  && (m_pManager == &SG_Get_Data_Manager() || !SG_Get_Data_Manager().Exists(pObject)) )
1705  {
1706  if( m_pManager && !m_pManager->Delete(pObject) )
1707  {
1708  delete(pObject);
1709  }
1710 
1712  }
1713  else
1714  {
1715  if( m_pManager && !m_pManager->Exists(pObject) )
1716  {
1717  m_pManager->Add(pObject);
1718  }
1719 
1721  }
1722  }
1723  }
1724 
1725  //---------------------------------------------
1726  else if( p->is_DataObject_List() )
1727  {
1728  for(int j=0; j<p->asList()->Get_Item_Count(); j++)
1729  {
1730  CSG_Data_Object *pObject = p->asList()->Get_Item(j);
1731 
1732  if( m_pManager && !m_pManager->Exists(pObject) )
1733  {
1734  m_pManager->Add(pObject);
1735  }
1736 
1738  }
1739  }
1740  }
1741  }
1742 
1743  return( true );
1744 }
1745 
1746 //---------------------------------------------------------
1747 bool CSG_Parameters::DataObjects_Get_Projection(CSG_Projection &Projection) const
1748 {
1749  for(int i=0; i<Get_Count() && !Projection.is_Okay(); i++)
1750  {
1751  CSG_Parameter *p = m_Parameters[i];
1752 
1753  if( p->is_Enabled() && !p->ignore_Projection() )
1754  {
1755  if( p->Get_Type() == PARAMETER_TYPE_Parameters )
1756  {
1757  p->asParameters()->DataObjects_Get_Projection(Projection);
1758  }
1759  else if( p->is_Input() )
1760  {
1761  if( p->is_DataObject()
1762  && p->asDataObject() != DATAOBJECT_NOTSET
1763  && p->asDataObject() != DATAOBJECT_CREATE )
1764  {
1765  Projection = p->asDataObject()->Get_Projection();
1766  }
1767  else if( p->is_DataObject_List() )
1768  {
1769  for(int j=0; j<p->asList()->Get_Item_Count() && !Projection.is_Okay(); j++)
1770  {
1771  Projection = p->asList()->Get_Item(j)->Get_Projection();
1772  }
1773  }
1774  }
1775  }
1776  }
1777 
1778  return( Projection.is_Okay() );
1779 }
1780 
1781 //---------------------------------------------------------
1782 bool CSG_Parameters::DataObjects_Set_Projection(const CSG_Projection &Projection)
1783 {
1784  if( !Projection.is_Okay() )
1785  {
1786  return( false );
1787  }
1788 
1789  for(int i=0; i<Get_Count(); i++)
1790  {
1791  CSG_Parameter *p = m_Parameters[i];
1792 
1793  if( !p->ignore_Projection() )
1794  {
1795  if( p->Get_Type() == PARAMETER_TYPE_Parameters )
1796  {
1797  p->asParameters()->DataObjects_Set_Projection(Projection);
1798  }
1799  else if( p->is_Output() )
1800  {
1801  if( p->is_DataObject()
1802  && p->asDataObject() != DATAOBJECT_NOTSET
1803  && p->asDataObject() != DATAOBJECT_CREATE )
1804  {
1805  p->asDataObject()->Get_Projection() = Projection;
1806  }
1807  else if( p->is_DataObject_List() )
1808  {
1809  for(int j=0; j<p->asList()->Get_Item_Count(); j++)
1810  {
1811  p->asList()->Get_Item(j)->Get_Projection() = Projection;
1812  }
1813  }
1814  }
1815  }
1816  }
1817 
1818  return( true );
1819 }
1820 
1821 
1823 // //
1825 
1826 //---------------------------------------------------------
1827 bool CSG_Parameters::Get_String(CSG_String &String, bool bOptionsOnly)
1828 {
1829  bool bResult = false;
1830 
1831  if( Get_Count() > 0 )
1832  {
1833  if( m_pGrid_System )
1834  {
1835  m_pGrid_System->_Set_String();
1836 
1837  String += CSG_String::Format("%s: %s\n", m_pGrid_System->Get_Name(), m_pGrid_System->asString());
1838  }
1839 
1840  for(int i=0; i<Get_Count(); i++)
1841  {
1842  CSG_Parameter *p = m_Parameters[i];
1843 
1844  if( (!bOptionsOnly || p->is_Option()) && !p->asGrid_System() && p->is_Enabled() && !p->is_Information() && !(p->Get_Type() == PARAMETER_TYPE_String && ((CSG_Parameter_String *)p)->is_Password()) )
1845  {
1846  bResult = true;
1847 
1848  p->_Set_String(); // forcing update (at scripting level some parameter types can be changed without the Set_Parameter() mechanism)
1849 
1850  String += CSG_String::Format("%s: %s\n", p->Get_Name(), p->asString());
1851  }
1852  }
1853  }
1854 
1855  return( bResult );
1856 }
1857 
1858 //---------------------------------------------------------
1859 bool CSG_Parameters::Msg_String(bool bOptionsOnly)
1860 {
1861  CSG_String Msg;
1862 
1863  if( Get_String(Msg, bOptionsOnly) )
1864  {
1865  SG_UI_Msg_Add_Execution(CSG_String::Format("\n__________\n[%s] %s:\n", m_Name.c_str(),
1866  bOptionsOnly ? _TL("Options") : _TL("Parameters")),
1867  false, SG_UI_MSG_STYLE_NORMAL
1868  );
1869 
1871 
1872  return( true );
1873  }
1874 
1875  return( false );
1876 }
1877 
1878 
1880 // //
1882 
1883 //---------------------------------------------------------
1884 bool CSG_Parameters::Set_History(CSG_MetaData &MetaData, bool bOptions, bool bDataObjects)
1885 {
1886  CSG_MetaData *pEntry;
1887  CSG_Data_Object *pObject;
1888 
1889  //-----------------------------------------------------
1890  if( bOptions )
1891  {
1892  for(int i=0; i<Get_Count(); i++) // get options...
1893  {
1894  CSG_Parameter *p = m_Parameters[i];
1895 
1896  if( p->is_Option() && p->is_Enabled() && !p->is_Information()
1897  && !(p->Get_Type() == PARAMETER_TYPE_String && ((CSG_Parameter_String *)p)->is_Password()) )
1898  {
1899  p->Serialize(MetaData, true);
1900  }
1901 
1902  //---------------------------------------------
1903  else if( p->is_Parameters() )
1904  {
1905  p->asParameters()->Set_History(MetaData, true, false);
1906  }
1907  }
1908  }
1909 
1910  //-----------------------------------------------------
1911  if( bDataObjects )
1912  {
1913  for(int i=0; i<Get_Count(); i++) // get input with history...
1914  {
1915  CSG_Parameter *p = m_Parameters[i];
1916 
1917  //---------------------------------------------
1918  if( p->is_Input() )
1919  {
1920  if( p->is_DataObject() && (pObject = p->asDataObject()) != NULL )
1921  {
1922  pEntry = MetaData.Add_Child("INPUT");
1923 
1924  pEntry->Add_Property("type" , p->Get_Type_Identifier());
1925  pEntry->Add_Property("id" , p->Get_Identifier ());
1926  pEntry->Add_Property("name" , p->Get_Name ());
1927  pEntry->Add_Property("parms", Get_Identifier ());
1928 
1929  if( p->Get_Type() == PARAMETER_TYPE_Grid
1930  || p->Get_Type() == PARAMETER_TYPE_Grids )
1931  {
1932  pEntry->Add_Property("system", p->Get_Parent()->Get_Identifier());
1933  }
1934 
1935  if( pObject->Get_History().Get_Children_Count() > 0 )
1936  {
1937  pEntry->Add_Children(pObject->Get_History());
1938  }
1939  else if( pObject->Get_File_Name() && *pObject->Get_File_Name() )
1940  {
1941  pEntry = pEntry->Add_Child("FILE", pObject->Get_File_Name());
1942  }
1943  }
1944 
1945  else if( p->is_DataObject_List() && p->asList()->Get_Item_Count() > 0 )
1946  {
1947  CSG_MetaData *pList = MetaData.Add_Child("INPUT_LIST");
1948 
1949  pList->Add_Property("type" , p->Get_Type_Identifier());
1950  pList->Add_Property("id" , p->Get_Identifier ());
1951  pList->Add_Property("name" , p->Get_Name ());
1952  pList->Add_Property("parms", Get_Identifier ());
1953 
1955  {
1956  pList->Add_Property("system", p->Get_Parent()->Get_Identifier());
1957  }
1958 
1959  for(int j=0; j<p->asList()->Get_Item_Count(); j++)
1960  {
1961  pObject = p->asList()->Get_Item(j);
1962 
1963  pEntry = pList->Add_Child(*pList, false);
1964 
1965  pEntry->Set_Name("INPUT");
1966 
1967  if( !SG_Get_History_Ignore_Lists() && pObject->Get_History().Get_Children_Count() > 0 )
1968  {
1969  pEntry->Add_Children(pObject->Get_History());
1970  }
1971  else if( pObject->Get_File_Name() && *pObject->Get_File_Name() )
1972  {
1973  pEntry = pEntry->Add_Child("FILE", pObject->Get_File_Name());
1974  }
1975  }
1976  }
1977  }
1978 
1979  //---------------------------------------------
1980  else if( p->is_Parameters() )
1981  {
1982  p->asParameters()->Set_History(MetaData, false, true);
1983  }
1984  }
1985  }
1986 
1987  return( true );
1988 }
1989 
1990 
1992 // //
1993 // Grid System //
1994 // //
1996 
1997 //---------------------------------------------------------
2004 {
2005  return( m_pGrid_System && m_pGrid_System->asGrid_System() && m_pGrid_System->Set_Value((void *)&System) );
2006 }
2007 
2008 //---------------------------------------------------------
2015 {
2016  CSG_Grid_System System;
2017 
2018  return( Set_Grid_System(System) );
2019 }
2020 
2021 
2023 // //
2024 // Serialize //
2025 // //
2027 
2028 //---------------------------------------------------------
2030 {
2031  if( Data.Cmp_Name("parameters") )
2032  {
2033  Data.Get_Property("name", m_Name);
2034 
2035  for(int i=0; i<Data.Get_Children_Count(); i++)
2036  {
2037  CSG_Parameter *pParameter = Get_Parameter(Data(i)->Get_Property("id"));
2038 
2039  if( pParameter && pParameter->Serialize(*Data(i), false) )
2040  {
2041  pParameter->has_Changed();
2042  }
2043  }
2044 
2045  return( true );
2046  }
2047 
2048  return( false );
2049 }
2050 
2051 //---------------------------------------------------------
2053 {
2054  Data.Destroy();
2055 
2056  Data.Set_Name("parameters");
2057  Data.Set_Property("name", m_Name);
2058 
2059  for(int i=0; i<Get_Count(); i++)
2060  {
2061  m_Parameters[i]->Serialize(Data, true);
2062  }
2063 
2064  return( true );
2065 }
2066 
2067 //---------------------------------------------------------
2069 {
2070  CSG_MetaData Data; return( Data.Load(File) && Load(Data) );
2071 }
2072 
2073 //---------------------------------------------------------
2074 bool CSG_Parameters::Save(const CSG_String &File) const
2075 {
2076  CSG_MetaData Data; return( Save(Data) && Data.Save(File) );
2077 }
2078 
2079 //---------------------------------------------------------
2080 // SAGA 2.0 compatibility...
2082 {
2083  CSG_Parameter *pParameter = NULL;
2084  CSG_String sLine;
2085 
2086  if( !Stream.is_Open() )
2087  {
2088  return( false );
2089  }
2090 
2091  //-----------------------------------------------------
2092  while( Stream.Read_Line(sLine) && sLine.Cmp("[PARAMETER_ENTRIES_BEGIN]") );
2093 
2094  if( sLine.Cmp("[PARAMETER_ENTRIES_BEGIN]") )
2095  {
2096  return( false );
2097  }
2098 
2099  //-----------------------------------------------------
2100  while( Stream.Read_Line(sLine) && sLine.Cmp("[PARAMETER_ENTRIES_END]") )
2101  {
2102  if( !sLine.Cmp("[PARAMETER_ENTRY_BEGIN]")
2103  && Stream.Read_Line(sLine) && (pParameter = Get_Parameter(sLine)) != NULL
2104  && Stream.Read_Line(sLine) )
2105  {
2106  int i;
2107  double d;
2108  TSG_Rect r;
2109  CSG_String s;
2110  CSG_Table t;
2111 
2112  switch( sLine.asInt() )
2113  {
2114  case 1: // PARAMETER_TYPE_Bool:
2115  case 2: // PARAMETER_TYPE_Int:
2116  case 6: // PARAMETER_TYPE_Choice:
2117  case 11: // PARAMETER_TYPE_Color:
2118  case 15: // PARAMETER_TYPE_Table_Field:
2119  pParameter->Set_Value(Stream.Scan_Int());
2120  break;
2121 
2122  case 3: // PARAMETER_TYPE_Double:
2123  case 4: // PARAMETER_TYPE_Degree:
2124  pParameter->Set_Value(Stream.Scan_Double());
2125  break;
2126 
2127  case 5: // PARAMETER_TYPE_Range:
2128  pParameter->asRange()->Set_Range(Stream.Scan_Double(), Stream.Scan_Double());
2129  break;
2130 
2131  case 7: // PARAMETER_TYPE_String:
2132  case 9: // PARAMETER_TYPE_FilePath:
2133  Stream.Read_Line(sLine);
2134  pParameter->Set_Value(sLine);
2135  break;
2136 
2137  case 8: // PARAMETER_TYPE_Text:
2138  s.Clear();
2139  while( Stream.Read_Line(sLine) && sLine.Cmp("[TEXT_ENTRY_END]") )
2140  {
2141  s += sLine + "\n";
2142  }
2143  pParameter->Set_Value(s);
2144  break;
2145 
2146  case 10: // PARAMETER_TYPE_Font:
2147  Stream.Read(&i, sizeof(i));
2148  pParameter->Set_Value(i);
2149  break;
2150 
2151  case 12: // PARAMETER_TYPE_Colors:
2152  pParameter->asColors()->Serialize(Stream, false, false);
2153  break;
2154 
2155  case 13: // PARAMETER_TYPE_FixedTable:
2156  if( t.Serialize(Stream, false) )
2157  {
2158  pParameter->asTable()->Assign_Values(&t);
2159  }
2160  break;
2161 
2162  case 14: // PARAMETER_TYPE_Grid_System:
2163  Stream.Read(&d, sizeof(d));
2164  Stream.Read(&r, sizeof(r));
2165  pParameter->asGrid_System()->Assign(d, r);
2166  break;
2167 
2168  case 16: // PARAMETER_TYPE_Grid:
2169  case 17: // PARAMETER_TYPE_Table:
2170  case 18: // PARAMETER_TYPE_Shapes:
2171  case 19: // PARAMETER_TYPE_TIN:
2172  case 24: // PARAMETER_TYPE_DataObject_Output:
2173  if( Stream.Read_Line(sLine) )
2174  {
2175  if( !sLine.Cmp("[ENTRY_DATAOBJECT_CREATE]") )
2176  {
2177  pParameter->Set_Value(DATAOBJECT_CREATE);
2178  }
2179  else
2180  {
2181  pParameter->Set_Value(m_pManager ? m_pManager->Find(sLine) : NULL);
2182  }
2183  }
2184  break;
2185 
2186  case 20: // PARAMETER_TYPE_Grid_List:
2187  case 21: // PARAMETER_TYPE_Table_List:
2188  case 22: // PARAMETER_TYPE_Shapes_List:
2189  case 23: // PARAMETER_TYPE_TIN_List:
2190  while( Stream.Read_Line(sLine) && sLine.Cmp("[ENTRY_DATAOBJECTLIST_END]") )
2191  {
2192  CSG_Data_Object *pObject = m_pManager ? m_pManager->Find(sLine) : NULL;
2193 
2194  if( pObject )
2195  {
2196  pParameter->asList()->Add_Item(pObject);
2197  }
2198  }
2199  break;
2200 
2201  case 25: // PARAMETER_TYPE_Parameters:
2202  pParameter->asParameters()->Serialize_Compatibility(Stream);
2203  break;
2204  }
2205  }
2206  }
2207 
2208  return( true );
2209 }
2210 
2211 
2213 // //
2214 // //
2215 // //
2217 
2218 //---------------------------------------------------------
CSG_Parameter::asColors
CSG_Colors * asColors(void) const
Definition: parameter.cpp:966
CSG_String::BeforeFirst
CSG_String BeforeFirst(char Character) const
Definition: api_string.cpp:666
CSG_MetaData::Destroy
void Destroy(void)
Definition: metadata.cpp:148
CSG_Parameters::Assign
bool Assign(CSG_Parameters *pSource)
Definition: parameters.cpp:1453
CSG_Parameter_Date
Definition: parameters.h:571
CSG_Parameter::Set_Value
virtual bool Set_Value(int Value)
Definition: parameter.cpp:745
CSG_Parameters::Get_Description
const CSG_String & Get_Description(void) const
Definition: parameters.h:1691
CSG_Parameter_Range::Set_Min
bool Set_Min(double Min)
Definition: parameter_data.cpp:802
PARAMETER_TYPE_Double
@ PARAMETER_TYPE_Double
Definition: parameters.h:127
CSG_Parameters::Get_Parameter
CSG_Parameter * Get_Parameter(int i) const
Definition: parameters.h:1708
PARAMETER_TYPE_FilePath
@ PARAMETER_TYPE_FilePath
Definition: parameters.h:136
PARAMETER_TYPE_Degree
@ PARAMETER_TYPE_Degree
Definition: parameters.h:128
CSG_Parameter_Choice::Set_Items
bool Set_Items(const SG_Char *String)
Definition: parameter_data.cpp:934
CSG_Parameters::Del_References
void Del_References(void)
Definition: parameters.cpp:326
CSG_Parameter_Grid
Definition: parameters.h:1194
SG_T
#define SG_T(s)
Definition: api_core.h:531
CSG_Parameters::Add_Date
CSG_Parameter * Add_Date(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0)
Definition: parameters.cpp:416
CSG_Parameter_Value::Set_Minimum
void Set_Minimum(double Minimum, bool bOn=true)
Definition: parameter_data.cpp:371
CSG_Parameters::Add_Parameter
CSG_Parameter * Add_Parameter(CSG_Parameter *pParameter)
Definition: parameters.cpp:365
CSG_Parameters::Add_Grid_System
CSG_Parameter * Add_Grid_System(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, CSG_Grid_System *pInit=NULL)
Definition: parameters.cpp:567
SG_Create_Table
CSG_Table * SG_Create_Table(void)
Definition: table.cpp:65
CSG_Parameters::Add_Degree
CSG_Parameter * Add_Degree(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
Definition: parameters.cpp:411
CSG_String::Append
CSG_String & Append(const CSG_String &String)
Definition: api_string.cpp:355
_TL
#define _TL(s)
Definition: api_core.h:1480
CSG_Parameter_List::Add_Item
virtual bool Add_Item(CSG_Data_Object *pItem)
Definition: parameter_data.cpp:3013
CSG_Parameter_Degree
Definition: parameters.h:546
CSG_Parameter_Parameters
Definition: parameters.h:1563
PARAMETER_TYPE_Table_Fields
@ PARAMETER_TYPE_Table_Fields
Definition: parameters.h:145
CSG_Data_Object::Get_History
CSG_MetaData & Get_History(void)
Definition: dataobject.h:227
CSG_String::Length
size_t Length(void) const
Definition: api_string.cpp:172
CSG_DateTime::Now
static CSG_DateTime Now(void)
Definition: datetime.cpp:581
CSG_Parameters::Add_Colors
CSG_Parameter * Add_Colors(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, CSG_Colors *pInit=NULL)
Definition: parameters.cpp:536
CSG_MetaData::Get_Children_Count
int Get_Children_Count(void) const
Definition: metadata.h:149
CSG_Parameters::Set_Grid_System
bool Set_Grid_System(const CSG_Grid_System &System)
Definition: parameters.cpp:2003
CSG_Parameters::Reset_Grid_System
bool Reset_Grid_System(void)
Definition: parameters.cpp:2014
CSG_Parameter::Get_Identifier
const SG_Char * Get_Identifier(void) const
Definition: parameter.cpp:546
PARAMETER_TYPE_Node
@ PARAMETER_TYPE_Node
Definition: parameters.h:123
CSG_Parameter::asString
const SG_Char * asString(void) const
Definition: parameters.h:284
PARAMETER_OPTIONAL
#define PARAMETER_OPTIONAL
Definition: parameters.h:96
CSG_Parameter::asTable
CSG_Table * asTable(void) const
Definition: parameter.cpp:994
CSG_Parameters::Get_Owner
void * Get_Owner(void) const
Definition: parameters.h:1670
CSG_Parameter_TIN
Definition: parameters.h:1309
data_manager.h
CSG_Parameter_Table_List
Definition: parameters.h:1463
CSG_Parameter_Value::Set_Maximum
void Set_Maximum(double Maximum, bool bOn=true)
Definition: parameter_data.cpp:391
SG_UI_MSG_STYLE_NORMAL
@ SG_UI_MSG_STYLE_NORMAL
Definition: api_core.h:1493
CSG_Parameters::Add_Data_Type
CSG_Parameter * Add_Data_Type(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Data_Types, TSG_Data_Type Default=SG_DATATYPE_Undefined, const CSG_String &User="")
Definition: parameters.cpp:452
CSG_Parameters::Del_Parameters
bool Del_Parameters(void)
Definition: parameters.cpp:1255
TSG_Shape_Type
TSG_Shape_Type
Definition: shapes.h:100
SG_Create_PointCloud
CSG_PointCloud * SG_Create_PointCloud(void)
Definition: pointcloud.cpp:76
PARAMETER_TYPE_Grids_List
@ PARAMETER_TYPE_Grids_List
Definition: parameters.h:155
CSG_Parameters::Add_Grid_or_Const
CSG_Parameter * Add_Grid_or_Const(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false, bool bSystem_Dependent=true)
Definition: parameters.cpp:610
PARAMETER_TYPE_String
@ PARAMETER_TYPE_String
Definition: parameters.h:134
CSG_Grid_System
Definition: grid.h:200
CSG_String::asInt
int asInt(void) const
Definition: api_string.cpp:722
PARAMETER_TYPE_Int
@ PARAMETER_TYPE_Int
Definition: parameters.h:126
CSG_Grid::Create
bool Create(const CSG_Grid &Grid)
Definition: grid.cpp:230
CSG_Parameters::Add_Font
CSG_Parameter * Add_Font(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const SG_Char *pInit=NULL)
Definition: parameters.cpp:518
CSG_Parameter_List::Get_Item
CSG_Data_Object * Get_Item(int Index) const
Definition: parameters.h:1368
CSG_Parameters::Add_Info_Value
CSG_Parameter * Add_Info_Value(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, TSG_Parameter_Type Type, double Value=0.0)
Definition: parameters.cpp:390
CSG_Shapes::Create
bool Create(const CSG_Shapes &Shapes)
Definition: shapes.cpp:204
SG_UI_Msg_Add_Execution
void SG_UI_Msg_Add_Execution(const char *Message, bool bNewLine, TSG_UI_MSG_STYLE Style)
Definition: api_callback.cpp:517
CSG_Parameters::Add_Node
CSG_Parameter * Add_Node(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:371
CSG_MetaData::Set_Property
bool Set_Property(const CSG_String &Name, const CSG_String &Value, bool bAddIfNotExists=true)
Definition: metadata.cpp:600
CSG_Parameter::is_Input
bool is_Input(void) const
Definition: parameters.h:231
CSG_Parameters::Serialize_Compatibility
bool Serialize_Compatibility(CSG_File &Stream)
Definition: parameters.cpp:2081
CSG_Projection::is_Okay
bool is_Okay(void) const
Definition: geo_tools.h:861
CSG_Parameter_Colors
Definition: parameters.h:956
CSG_Parameter_Choices
Definition: parameters.h:747
PARAMETER_TYPE_TIN
@ PARAMETER_TYPE_TIN
Definition: parameters.h:152
CSG_Parameters::Add_Grids_List
CSG_Parameter * Add_Grids_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent=true)
Definition: parameters.cpp:698
CSG_Parameter_Data_Object_Output
Definition: parameters.h:1165
CSG_Parameters::Add_String
CSG_Parameter * Add_String(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &String, bool bLongText=false, bool bPassword=false)
Definition: parameters.cpp:489
CSG_Parameter::Get_Description
const SG_Char * Get_Description(void) const
Definition: parameter.cpp:578
CSG_Parameters::Add_Double
CSG_Parameter * Add_Double(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
Definition: parameters.cpp:406
SG_Get_Data_Manager
CSG_Data_Manager & SG_Get_Data_Manager(void)
Definition: data_manager.cpp:65
CSG_Parameters::Cmp_Identifier
bool Cmp_Identifier(const CSG_String &Identifier) const
Definition: parameters.cpp:262
CSG_Parameters::DataObjects_Check
bool DataObjects_Check(bool bSilent=false)
Definition: parameters.cpp:1512
SG_DATAOBJECT_TYPE_Grids
@ SG_DATAOBJECT_TYPE_Grids
Definition: dataobject.h:119
CSG_Parameters::Add_Value
CSG_Parameter * Add_Value(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, TSG_Parameter_Type Type, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
Definition: parameters.cpp:385
CSG_File::Scan_Int
int Scan_Int(void) const
Definition: api_file.cpp:537
PARAMETER_TYPE_FixedTable
@ PARAMETER_TYPE_FixedTable
Definition: parameters.h:141
CSG_Parameter_Table_Field
Definition: parameters.h:1054
CSG_Data_Manager::Exists
bool Exists(CSG_Data_Object *pObject) const
Definition: data_manager.cpp:389
SG_Free
SAGA_API_DLL_EXPORT void SG_Free(void *memblock)
Definition: api_memory.cpp:83
CSG_Parameter::asDataObject
CSG_Data_Object * asDataObject(void) const
Definition: parameter.cpp:972
CSG_Parameter_Node
Definition: parameters.h:375
CSG_Parameter::Assign
bool Assign(CSG_Parameter *pSource)
Definition: parameter.cpp:1072
CSG_Parameters::~CSG_Parameters
virtual ~CSG_Parameters(void)
Definition: parameters.cpp:95
SG_Create_TIN
CSG_TIN * SG_Create_TIN(void)
Definition: tin.cpp:63
CSG_MetaData::Save
bool Save(const CSG_String &File, const SG_Char *Extension=NULL) const
Definition: metadata.cpp:883
PARAMETER_TYPE_PointCloud
@ PARAMETER_TYPE_PointCloud
Definition: parameters.h:147
CSG_Parameter::asValue
class CSG_Parameter_Value * asValue(void) const
Definition: parameter.cpp:1022
CSG_Parameter_Font
Definition: parameters.h:895
CSG_Parameter::ignore_Projection
void ignore_Projection(bool bIgnore)
Definition: parameter.cpp:177
CSG_File::Read
size_t Read(void *Buffer, size_t Size, size_t Count=1) const
Definition: api_file.cpp:322
CSG_File
Definition: api_core.h:1116
CSG_String::Cmp
int Cmp(const CSG_String &String) const
Definition: api_string.cpp:515
CSG_Parameters::Add_Table_Field_or_Const
CSG_Parameter * Add_Table_Field_or_Const(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
Definition: parameters.cpp:741
CSG_Parameters::Add_PointCloud
CSG_Parameter * Add_PointCloud(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameters.cpp:886
tool.h
PARAMETER_INPUT_OPTIONAL
#define PARAMETER_INPUT_OPTIONAL
Definition: parameters.h:102
CSG_Parameter_PointCloud
Definition: parameters.h:1333
CSG_Parameters::Get_String
bool Get_String(CSG_String &String, bool bOptionsOnly)
Definition: parameters.cpp:1827
CSG_Parameters::Msg_String
bool Msg_String(bool bOptionsOnly)
Definition: parameters.cpp:1859
PARAMETER_TYPE_Shapes_List
@ PARAMETER_TYPE_Shapes_List
Definition: parameters.h:157
SSG_Rect
Definition: geo_tools.h:464
PARAMETER_TYPE_Grids
@ PARAMETER_TYPE_Grids
Definition: parameters.h:149
CSG_MetaData::Get_Property
const SG_Char * Get_Property(int i) const
Definition: metadata.h:181
CSG_Parameters::has_GUI
bool has_GUI(void) const
Definition: parameters.cpp:242
CSG_Parameter::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const =0
CSG_Parameter::Serialize
bool Serialize(CSG_MetaData &MetaData, bool bSave)
Definition: parameter.cpp:1096
CSG_Parameters::Add_Range
CSG_Parameter * Add_Range(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Range_Min=0.0, double Range_Max=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
Definition: parameters.cpp:432
SG_UI_DATAOBJECT_UPDATE
@ SG_UI_DATAOBJECT_UPDATE
Definition: api_core.h:1509
CSG_Parameters::Add_Info_Range
CSG_Parameter * Add_Info_Range(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Range_Min=0.0, double Range_Max=0.0)
Definition: parameters.cpp:437
CSG_Data_Object::asShapes
class CSG_Shapes * asShapes(bool bPolymorph=false) const
Definition: dataobject.cpp:450
CSG_Parameter::is_DataObject_List
bool is_DataObject_List(void) const
Definition: parameter.cpp:294
CSG_Parameter_Text
Definition: parameters.h:833
CSG_Parameter_File_Name::Set_Flag_Multiple
void Set_Flag_Multiple(bool bFlag)
Definition: parameter_data.cpp:1564
PARAMETER_TYPE_Choices
@ PARAMETER_TYPE_Choices
Definition: parameters.h:133
PARAMETER_TYPE_Data_Type
@ PARAMETER_TYPE_Data_Type
Definition: parameters.h:131
CSG_Parameter_Shapes
Definition: parameters.h:1278
CSG_Parameter_List::Del_Items
virtual bool Del_Items(void)
Definition: parameter_data.cpp:3055
CSG_Parameter_Fixed_Table
Definition: parameters.h:990
CSG_Grids::Create
virtual bool Create(const CSG_Grids &Grids)
Definition: grids.cpp:271
CSG_MetaData::Cmp_Name
bool Cmp_Name(const CSG_String &String, bool bNoCase=true) const
Definition: metadata.cpp:437
CSG_Strings::Clear
void Clear(void)
Definition: api_core.h:728
PARAMETER_TYPE_Colors
@ PARAMETER_TYPE_Colors
Definition: parameters.h:140
CSG_Parameters::Add_TIN_List
CSG_Parameter * Add_TIN_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameters.cpp:871
CSG_Parameter_File_Name::Set_Flag_Save
void Set_Flag_Save(bool bFlag)
Definition: parameter_data.cpp:1559
CSG_Parameters::Set_Name
void Set_Name(const CSG_String &Name)
Definition: parameters.cpp:272
SG_UI_Dlg_Message
void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
Definition: api_callback.cpp:362
CSG_Data_Object
Definition: dataobject.h:180
CSG_Parameter
Definition: parameters.h:207
CSG_Parameters::Add_TIN_Output
CSG_Parameter * Add_TIN_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:859
CSG_Parameter_Grid_System
Definition: parameters.h:1021
CSG_Parameters::Assign_Values
bool Assign_Values(CSG_Parameters *pSource)
Definition: parameters.cpp:1459
PARAMETER_TYPE_Undefined
@ PARAMETER_TYPE_Undefined
Definition: parameters.h:165
CSG_Parameters::Add_FixedTable
CSG_Parameter * Add_FixedTable(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, CSG_Table *pInit=NULL)
Definition: parameters.cpp:548
CSG_Data_Object::asGrids
class CSG_Grids * asGrids(bool bPolymorph=false) const
Definition: dataobject.cpp:502
PARAMETER_TYPE_Table
@ PARAMETER_TYPE_Table
Definition: parameters.h:150
PARAMETER_TYPE_Bool
@ PARAMETER_TYPE_Bool
Definition: parameters.h:125
CSG_Parameters::Get_Count
int Get_Count(void) const
Definition: parameters.h:1681
CSG_Parameters::Restore_Defaults
bool Restore_Defaults(bool bClearData=false)
Definition: parameters.cpp:1421
DATAOBJECT_CREATE
#define DATAOBJECT_CREATE
Definition: dataobject.h:130
CSG_Table::Serialize
bool Serialize(CSG_File &Stream, bool bSave)
Definition: table_io.cpp:538
PARAMETER_TYPE_Table_Field
@ PARAMETER_TYPE_Table_Field
Definition: parameters.h:144
CSG_Parameters::Use_Grid_System
bool Use_Grid_System(void)
Definition: parameters.cpp:224
CSG_Parameters::Add_FilePath
CSG_Parameter * Add_FilePath(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const SG_Char *Filter=NULL, const SG_Char *Default=NULL, bool bSave=false, bool bDirectory=false, bool bMultiple=false)
Definition: parameters.cpp:500
CSG_Parameter::is_Enabled
bool is_Enabled(bool bCheckEnv=true) const
Definition: parameter.cpp:208
CSG_MetaData::Del_Children
bool Del_Children(int Depth=0, const SG_Char *Name=NULL)
Definition: metadata.cpp:373
CSG_Parameter::Set_Default
bool Set_Default(int Value)
Definition: parameter.cpp:851
CSG_Parameter_Data_Type::Set_Data_Types
bool Set_Data_Types(int Data_Types, TSG_Data_Type Default=SG_DATATYPE_Undefined, const CSG_String &User="")
Definition: parameter_data.cpp:1149
CSG_File::Read_Line
bool Read_Line(CSG_String &sLine) const
Definition: api_file.cpp:379
CSG_Parameter_List::Del_Item
virtual bool Del_Item(CSG_Data_Object *pItem, bool bUpdateData=true)
Definition: parameter_data.cpp:3025
PARAMETER_TYPE_Choice
@ PARAMETER_TYPE_Choice
Definition: parameters.h:132
CSG_Parameter_File_Name
Definition: parameters.h:853
CSG_Parameters::Add_Shapes_List
CSG_Parameter * Add_Shapes_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, TSG_Shape_Type=SHAPE_TYPE_Undefined)
Definition: parameters.cpp:832
CSG_Parameter::asParameters
class CSG_Parameters * asParameters(void) const
Definition: parameter.cpp:969
CSG_Parameters::Add_Grid_List
CSG_Parameter * Add_Grid_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent=true)
Definition: parameters.cpp:632
CSG_Parameter_Grids
Definition: parameters.h:1234
CSG_Parameters::Load
bool Load(const CSG_MetaData &Data)
Definition: parameters.cpp:2029
CSG_File::Scan_Double
double Scan_Double(void) const
Definition: api_file.cpp:542
CSG_Parameters::Get_Tool
class CSG_Tool * Get_Tool(void) const
Definition: parameters.h:1672
SG_UI_DataObject_Update
bool SG_UI_DataObject_Update(CSG_Data_Object *pDataObject, int Show, CSG_Parameters *pParameters)
Definition: api_callback.cpp:611
CSG_Parameters::Add_Reference
void Add_Reference(const CSG_String &Authors, const CSG_String &Year, const CSG_String &Title, const CSG_String &Where, const SG_Char *Link=NULL, const SG_Char *Link_Text=NULL)
Definition: parameters.cpp:292
CSG_Parameters::Set_Enabled
void Set_Enabled(bool bEnabled=true)
Definition: parameters.cpp:336
CSG_Parameter_Grids_List
Definition: parameters.h:1437
CSG_Parameter_File_Name::Set_Filter
void Set_Filter(const SG_Char *Filter)
Definition: parameter_data.cpp:1541
CSG_MetaData::Add_Property
bool Add_Property(const CSG_String &Name, const CSG_String &Value)
Definition: metadata.cpp:544
CSG_Parameters::Add_Color
CSG_Parameter * Add_Color(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value=0)
Definition: parameters.cpp:426
CSG_Parameter::asDataType
class CSG_Parameter_Data_Type * asDataType(void) const
Definition: parameter.cpp:1037
CSG_Parameter::Get_Child
CSG_Parameter * Get_Child(int iChild) const
Definition: parameters.h:255
CSG_Parameter_Grid_List
Definition: parameters.h:1402
CSG_Parameters::Add_Int
CSG_Parameter * Add_Int(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Value=0, int Minimum=0, bool bMinimum=false, int Maximum=0, bool bMaximum=false)
Definition: parameters.cpp:401
CSG_Grid_System::Assign
bool Assign(const CSG_Grid_System &System)
Definition: grid_system.cpp:225
CSG_DateTime::Get_JDN
double Get_JDN(void) const
Definition: datetime.cpp:411
PARAMETER_TYPE_Grid
@ PARAMETER_TYPE_Grid
Definition: parameters.h:148
CSG_Parameters::Add_Table_List
CSG_Parameter * Add_Table_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameters.cpp:793
CSG_Parameter_Range::Set_Range
bool Set_Range(double Min, double Max)
Definition: parameter_data.cpp:783
CSG_Parameter_Range
Definition: parameters.h:610
CSG_Table::Assign_Values
bool Assign_Values(const CSG_Table &Table)
Definition: table.cpp:401
CSG_Parameters::Add_Table
CSG_Parameter * Add_Table(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameters.cpp:771
PARAMETER_TYPE_Date
@ PARAMETER_TYPE_Date
Definition: parameters.h:129
CSG_Data_Object::Get_File_Name
const SG_Char * Get_File_Name(bool bNative=true) const
Definition: dataobject.cpp:331
CSG_Parameters::Add_Parameters
CSG_Parameter * Add_Parameters(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:923
PARAMETER_TYPE_Grid_List
@ PARAMETER_TYPE_Grid_List
Definition: parameters.h:154
CSG_Parameter::_Set_String
virtual void _Set_String(void)
Definition: parameter.cpp:840
CSG_Parameters::Add_Grids
CSG_Parameter * Add_Grids(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent=true, TSG_Data_Type Preferred_Type=SG_DATATYPE_Undefined)
Definition: parameters.cpp:658
CSG_Parameter::is_Optional
bool is_Optional(void) const
Definition: parameters.h:233
SG_DATAOBJECT_TYPE_TIN
@ SG_DATAOBJECT_TYPE_TIN
Definition: dataobject.h:122
CSG_Parameters::Create
bool Create(const CSG_Parameters &Parameters)
Definition: parameters.cpp:122
CSG_Parameters::Add_Table_Fields
CSG_Parameter * Add_Table_Fields(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:754
CSG_Parameters::Add_Grid
CSG_Parameter * Add_Grid(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, bool bSystem_Dependent=true, TSG_Data_Type Preferred_Type=SG_DATATYPE_Undefined)
Definition: parameters.cpp:582
CSG_File::is_Open
bool is_Open(void) const
Definition: api_core.h:1135
SG_DATAOBJECT_TYPE_Grid
@ SG_DATAOBJECT_TYPE_Grid
Definition: dataobject.h:118
CSG_Parameters::Add_PointCloud_Output
CSG_Parameter * Add_PointCloud_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:896
CSG_Parameter::asFilePath
class CSG_Parameter_File_Name * asFilePath(void) const
Definition: parameter.cpp:1042
CSG_Parameters::Del_Parameter
bool Del_Parameter(int i)
Definition: parameters.cpp:1191
CSG_Data_Object::Set_Name
void Set_Name(const CSG_String &Name)
Definition: dataobject.cpp:235
CSG_Parameter::is_Output
bool is_Output(void) const
Definition: parameters.h:232
parameters.h
CSG_MetaData::Add_Children
bool Add_Children(const CSG_MetaData &MetaData)
Definition: metadata.cpp:351
CSG_Parameters::Add_Info_String
CSG_Parameter * Add_Info_String(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &String, bool bLongText=false)
Definition: parameters.cpp:494
CSG_Parameters::Add_TIN
CSG_Parameter * Add_TIN(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameters.cpp:849
SG_Create_Grids
CSG_Grids * SG_Create_Grids(void)
Definition: grids.cpp:65
CSG_String::Format
static CSG_String Format(const char *Format,...)
Definition: api_string.cpp:270
CSG_Parameters::Add_Grids_Output
CSG_Parameter * Add_Grids_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:686
CSG_Parameter_List::Get_Item_Count
int Get_Item_Count(void) const
Definition: parameters.h:1367
CSG_Parameter_Shapes_List
Definition: parameters.h:1486
CSG_String::Find
int Find(char Character, bool fromEnd=false) const
Definition: api_string.cpp:616
CSG_Projection
Definition: geo_tools.h:833
CSG_Parameters::Get_Identifier
const CSG_String & Get_Identifier(void) const
Definition: parameters.h:1685
CSG_Parameter_Int
Definition: parameters.h:470
CSG_Parameters::Add_Shapes
CSG_Parameter * Add_Shapes(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint, TSG_Shape_Type Shape_Type=SHAPE_TYPE_Undefined)
Definition: parameters.cpp:808
CSG_Table
Definition: table.h:283
SG_DATAOBJECT_TYPE_Shapes
@ SG_DATAOBJECT_TYPE_Shapes
Definition: dataobject.h:121
CSG_Parameter_Range::Set_Max
bool Set_Max(double Max)
Definition: parameter_data.cpp:820
CSG_String::CmpNoCase
int CmpNoCase(const CSG_String &String) const
Definition: api_string.cpp:521
CSG_String::AfterFirst
CSG_String AfterFirst(char Character) const
Definition: api_string.cpp:644
CSG_String::Clear
void Clear(void)
Definition: api_string.cpp:259
CSG_Parameter::Get_Children_Count
int Get_Children_Count(void) const
Definition: parameters.h:254
CSG_Parameter::Get_Parent
CSG_Parameter * Get_Parent(void) const
Definition: parameter.cpp:105
CSG_Parameter::is_DataObject
bool is_DataObject(void) const
Definition: parameter.cpp:275
CSG_Parameter_Double
Definition: parameters.h:508
CSG_Parameter_Bool
Definition: parameters.h:395
SG_Get_History_Ignore_Lists
int SG_Get_History_Ignore_Lists(void)
Definition: dataobject.cpp:172
SG_Char
#define SG_Char
Definition: api_core.h:530
CSG_Parameters::Set_Description
void Set_Description(const CSG_String &Description)
Definition: parameters.cpp:282
CSG_Table::Create
bool Create(const CSG_Table &Table)
Definition: table.cpp:146
CSG_String
Definition: api_core.h:557
CSG_Data_Manager::Add
bool Add(CSG_Data_Object *pObject)
Definition: data_manager.cpp:428
CSG_Data_Object::asGrid
class CSG_Grid * asGrid(bool bPolymorph=false) const
Definition: dataobject.cpp:491
CSG_Parameter::asChoice
class CSG_Parameter_Choice * asChoice(void) const
Definition: parameter.cpp:1038
PARAMETER_INFORMATION
#define PARAMETER_INFORMATION
Definition: parameters.h:97
SG_DATAOBJECT_TYPE_Table
@ SG_DATAOBJECT_TYPE_Table
Definition: dataobject.h:120
CSG_Data_Manager
Definition: data_manager.h:164
CSG_MetaData
Definition: metadata.h:88
CSG_Colors::Serialize
bool Serialize(CSG_File &Stream, bool bSave, bool bBinary)
Definition: api_colors.cpp:1162
CSG_Strings::Sort
bool Sort(bool Ascending=true)
Definition: api_string.cpp:1121
CSG_Parameter_Table_Fields
Definition: parameters.h:1094
CSG_Parameter::Check
bool Check(bool bSilent=true)
Definition: parameter.cpp:898
CSG_Parameter_String
Definition: parameters.h:799
CSG_MetaData::Load
bool Load(const CSG_String &File, const SG_Char *Extension=NULL)
Definition: metadata.cpp:790
CSG_Parameters::Add_Shapes_Output
CSG_Parameter * Add_Shapes_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:820
CSG_Parameter_Shapes::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1281
CSG_String::is_Empty
bool is_Empty(void) const
Definition: api_string.cpp:178
CSG_Parameter::has_Changed
bool has_Changed(int Check_Flags=PARAMETER_CHECK_ALL)
Definition: parameter.cpp:832
CSG_Data_Object::Get_MetaData
CSG_MetaData & Get_MetaData(void) const
Definition: dataobject.h:225
CSG_Parameter_Color
Definition: parameters.h:930
CSG_Parameters::Add_Grid_Output
CSG_Parameter * Add_Grid_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:620
CSG_Parameters::CSG_Parameters
CSG_Parameters(void)
Definition: parameters.cpp:65
CSG_Parameters::Destroy
void Destroy(void)
Definition: parameters.cpp:182
PARAMETER_TYPE_Grid_System
@ PARAMETER_TYPE_Grid_System
Definition: parameters.h:143
CSG_Parameter_File_Name::Set_Flag_Directory
void Set_Flag_Directory(bool bFlag)
Definition: parameter_data.cpp:1569
PARAMETER_TYPE_PointCloud_List
@ PARAMETER_TYPE_PointCloud_List
Definition: parameters.h:159
CSG_Parameters::Save
bool Save(CSG_MetaData &Data) const
Definition: parameters.cpp:2052
CSG_Parameters::Add_Table_Output
CSG_Parameter * Add_Table_Output(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description)
Definition: parameters.cpp:781
PARAMETER_TYPE_Table_List
@ PARAMETER_TYPE_Table_List
Definition: parameters.h:156
CSG_Parameter::asRange
class CSG_Parameter_Range * asRange(void) const
Definition: parameter.cpp:1041
TSG_PFNC_Parameter_Changed
int(* TSG_PFNC_Parameter_Changed)(CSG_Parameter *pParameter, int Flags)
Definition: parameters.h:1646
CSG_MetaData::Set_Name
void Set_Name(const CSG_String &Name)
Definition: metadata.h:133
CSG_Parameters::Add_PointCloud_List
CSG_Parameter * Add_PointCloud_List(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameters.cpp:908
CSG_Parameters::Assign_Parameters
bool Assign_Parameters(CSG_Parameters *pSource)
Definition: parameters.cpp:1483
SG_UI_Get_Window_Main
void * SG_UI_Get_Window_Main(void)
Definition: api_callback.cpp:771
CSG_Parameters::Set_Manager
void Set_Manager(class CSG_Data_Manager *pManager)
Definition: parameters.cpp:206
CSG_Parameters::Set_Identifier
void Set_Identifier(const CSG_String &Identifier)
Definition: parameters.cpp:252
PARAMETER_TYPE_DataObject_Output
@ PARAMETER_TYPE_DataObject_Output
Definition: parameters.h:161
CSG_Parameters::Set_Parameter
bool Set_Parameter(const CSG_String &ID, CSG_Parameter *pValue)
Definition: parameters.cpp:1348
CSG_Parameter_Choice
Definition: parameters.h:659
SG_UI_MSG_STYLE_01
@ SG_UI_MSG_STYLE_01
Definition: api_core.h:1500
CSG_Parameters::Get_Name
const CSG_String & Get_Name(void) const
Definition: parameters.h:1688
CSG_Parameter::Set_Enabled
bool Set_Enabled(bool bEnabled=true)
Definition: parameter.cpp:195
CSG_Parameter_Range::Get_Min_Parameter
CSG_Parameter_Double * Get_Min_Parameter(void) const
Definition: parameters.h:620
CSG_String::c_str
const SG_Char * c_str(void) const
Definition: api_string.cpp:236
CSG_Parameters::Add_Choices
CSG_Parameter * Add_Choices(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items)
Definition: parameters.cpp:479
CSG_Parameters::Set_Callback_On_Parameter_Changed
TSG_PFNC_Parameter_Changed Set_Callback_On_Parameter_Changed(TSG_PFNC_Parameter_Changed pCallback)
Definition: parameters.cpp:1285
CSG_Parameter_PointCloud_List
Definition: parameters.h:1540
CSG_Parameter_TIN_List
Definition: parameters.h:1517
SG_Create_Grid
CSG_Grid * SG_Create_Grid(void)
Definition: grid.cpp:72
CSG_Parameters
Definition: parameters.h:1650
TSG_Data_Type
TSG_Data_Type
Definition: api_core.h:985
SG_Realloc
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
Definition: api_memory.cpp:77
CSG_MetaData::Add_Child
CSG_MetaData * Add_Child(void)
Definition: metadata.cpp:174
CSG_Shapes::Get_Type
virtual TSG_Shape_Type Get_Type(void) const
Definition: shapes.h:807
CSG_Parameter::is_Parameters
bool is_Parameters(void) const
Definition: parameter.cpp:312
CSG_Parameter::asGrid_System
CSG_Grid_System * asGrid_System(void) const
Definition: parameter.cpp:968
CSG_Parameter::Get_Name
const SG_Char * Get_Name(void) const
Definition: parameter.cpp:565
PARAMETER_TYPE_Range
@ PARAMETER_TYPE_Range
Definition: parameters.h:130
CSG_Parameter_Range::Get_Max_Parameter
CSG_Parameter_Double * Get_Max_Parameter(void) const
Definition: parameters.h:624
CSG_Parameter::is_Option
bool is_Option(void) const
Definition: parameter.cpp:238
PARAMETER_OUTPUT
#define PARAMETER_OUTPUT
Definition: parameters.h:95
PARAMETER_TYPE_TIN_List
@ PARAMETER_TYPE_TIN_List
Definition: parameters.h:158
TSG_Parameter_Type
TSG_Parameter_Type
Definition: parameters.h:122
PARAMETER_TYPE_Parameters
@ PARAMETER_TYPE_Parameters
Definition: parameters.h:163
CSG_Parameter_Choices::Set_Items
void Set_Items(const CSG_String &Items)
Definition: parameter_data.cpp:1303
PARAMETER_TYPE_Font
@ PARAMETER_TYPE_Font
Definition: parameters.h:138
CSG_Parameter::asList
class CSG_Parameter_List * asList(void) const
Definition: parameter.cpp:1046
CSG_Data_Object::Get_Projection
CSG_Projection & Get_Projection(void)
Definition: dataobject.cpp:578
PARAMETER_TYPE_Color
@ PARAMETER_TYPE_Color
Definition: parameters.h:139
CSG_Colors::Assign
bool Assign(const CSG_Colors &Colors)
Definition: api_colors.cpp:1031
PARAMETER_TYPE_Shapes
@ PARAMETER_TYPE_Shapes
Definition: parameters.h:151
CSG_Parameter::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter.cpp:887
SG_DATAOBJECT_TYPE_PointCloud
@ SG_DATAOBJECT_TYPE_PointCloud
Definition: dataobject.h:123
CSG_Parameters::Set_History
bool Set_History(CSG_MetaData &History, bool bOptions=true, bool bDataObjects=true)
Definition: parameters.cpp:1884
SHAPE_TYPE_Undefined
@ SHAPE_TYPE_Undefined
Definition: shapes.h:101
CSG_Parameters::Set_Callback
bool Set_Callback(bool bActive=true)
Definition: parameters.cpp:1306
CSG_Parameter::asChoices
class CSG_Parameter_Choices * asChoices(void) const
Definition: parameter.cpp:1040
CSG_Parameter::is_Information
bool is_Information(void) const
Definition: parameters.h:234
CSG_Parameter_Table
Definition: parameters.h:1255
CSG_Parameters::Add_Bool
CSG_Parameter * Add_Bool(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool Value=false)
Definition: parameters.cpp:396
CSG_Grid_System::is_Valid
bool is_Valid(void) const
Definition: grid_system.cpp:243
CSG_Parameter::Get_Type_Identifier
CSG_String Get_Type_Identifier(void) const
Definition: parameter.cpp:122
CSG_Parameter_Data_Type
Definition: parameters.h:717
CSG_Colors
Definition: api_core.h:1329
PARAMETER_OUTPUT_OPTIONAL
#define PARAMETER_OUTPUT_OPTIONAL
Definition: parameters.h:103
CSG_Parameters::Add_Table_Field
CSG_Parameter * Add_Table_Field(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, bool bAllowNone=false)
Definition: parameters.cpp:724
DATAOBJECT_NOTSET
#define DATAOBJECT_NOTSET
Definition: dataobject.h:129
PARAMETER_TYPE_Text
@ PARAMETER_TYPE_Text
Definition: parameters.h:135
SG_Create_Shapes
CSG_Shapes * SG_Create_Shapes(void)
Definition: shapes.cpp:85
CSG_Parameters::Add_Choice
CSG_Parameter * Add_Choice(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, const CSG_String &Items, int Default=0)
Definition: parameters.cpp:464