SAGA API  v9.6
parameter_data.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 // parameter_data.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 
56 
58 // //
59 // //
60 // //
62 
63 //---------------------------------------------------------
65 {
66  switch( Type )
67  {
68  default : return( _TL("parameter" ) );
69 
70  case PARAMETER_TYPE_Node : return( _TL("node" ) );
71 
72  case PARAMETER_TYPE_Bool : return( _TL("boolean" ) );
73  case PARAMETER_TYPE_Int : return( _TL("integer number" ) );
74  case PARAMETER_TYPE_Double : return( _TL("floating point number") );
75  case PARAMETER_TYPE_Degree : return( _TL("degree" ) );
76  case PARAMETER_TYPE_Date : return( _TL("date" ) );
77  case PARAMETER_TYPE_Range : return( _TL("value range" ) );
78  case PARAMETER_TYPE_Data_Type : return( _TL("data type" ) );
79  case PARAMETER_TYPE_Choice : return( _TL("choice" ) );
80  case PARAMETER_TYPE_Choices : return( _TL("choices" ) );
81 
82  case PARAMETER_TYPE_String : return( _TL("text" ) );
83  case PARAMETER_TYPE_Text : return( _TL("long text" ) );
84  case PARAMETER_TYPE_FilePath : return( _TL("file path" ) );
85 
86  case PARAMETER_TYPE_Font : return( _TL("font" ) );
87  case PARAMETER_TYPE_Color : return( _TL("color" ) );
88  case PARAMETER_TYPE_Colors : return( _TL("colors" ) );
89  case PARAMETER_TYPE_FixedTable : return( _TL("static table" ) );
90  case PARAMETER_TYPE_Grid_System : return( _TL("grid system" ) );
91  case PARAMETER_TYPE_Table_Field : return( _TL("table field" ) );
92  case PARAMETER_TYPE_Table_Fields : return( _TL("table fields" ) );
93 
94  case PARAMETER_TYPE_DataObject_Output: return( _TL("data object" ) );
95  case PARAMETER_TYPE_Grid : return( _TL("grid" ) );
96  case PARAMETER_TYPE_Grids : return( _TL("grid collection" ) );
97  case PARAMETER_TYPE_Table : return( _TL("table" ) );
98  case PARAMETER_TYPE_Shapes : return( _TL("shapes" ) );
99  case PARAMETER_TYPE_TIN : return( _TL("TIN" ) );
100  case PARAMETER_TYPE_PointCloud : return( _TL("point cloud" ) );
101 
102  case PARAMETER_TYPE_Grid_List : return( _TL("grid list" ) );
103  case PARAMETER_TYPE_Grids_List : return( _TL("grid collection list" ) );
104  case PARAMETER_TYPE_Table_List : return( _TL("table list" ) );
105  case PARAMETER_TYPE_Shapes_List : return( _TL("shapes list" ) );
106  case PARAMETER_TYPE_TIN_List : return( _TL("TIN list" ) );
107  case PARAMETER_TYPE_PointCloud_List : return( _TL("point cloud list" ) );
108 
109  case PARAMETER_TYPE_Parameters : return( _TL("parameters" ) );
110  }
111 }
112 
113 //---------------------------------------------------------
115 {
116  switch( Type )
117  {
118  default : return( "parameter" );
119 
120  case PARAMETER_TYPE_Node : return( "node" );
121 
122  case PARAMETER_TYPE_Bool : return( "boolean" );
123  case PARAMETER_TYPE_Int : return( "integer" );
124  case PARAMETER_TYPE_Double : return( "double" );
125  case PARAMETER_TYPE_Degree : return( "degree" );
126  case PARAMETER_TYPE_Date : return( "date" );
127  case PARAMETER_TYPE_Range : return( "range" );
128  case PARAMETER_TYPE_Data_Type : return( "datatype" );
129  case PARAMETER_TYPE_Choice : return( "choice" );
130  case PARAMETER_TYPE_Choices : return( "choices" );
131 
132  case PARAMETER_TYPE_String : return( "text" );
133  case PARAMETER_TYPE_Text : return( "long_text" );
134  case PARAMETER_TYPE_FilePath : return( "file" );
135 
136  case PARAMETER_TYPE_Font : return( "font" );
137  case PARAMETER_TYPE_Color : return( "color" );
138  case PARAMETER_TYPE_Colors : return( "colors" );
139  case PARAMETER_TYPE_FixedTable : return( "static_table" );
140  case PARAMETER_TYPE_Grid_System : return( "grid_system" );
141  case PARAMETER_TYPE_Table_Field : return( "table_field" );
142  case PARAMETER_TYPE_Table_Fields : return( "table_fields" );
143 
144  case PARAMETER_TYPE_DataObject_Output: return( "data_object" );
145  case PARAMETER_TYPE_Grid : return( "grid" );
146  case PARAMETER_TYPE_Grids : return( "grids" );
147  case PARAMETER_TYPE_Table : return( "table" );
148  case PARAMETER_TYPE_Shapes : return( "shapes" );
149  case PARAMETER_TYPE_TIN : return( "tin" );
150  case PARAMETER_TYPE_PointCloud : return( "points" );
151 
152  case PARAMETER_TYPE_Grid_List : return( "grid_list" );
153  case PARAMETER_TYPE_Grids_List : return( "grids_list" );
154  case PARAMETER_TYPE_Table_List : return( "table_list" );
155  case PARAMETER_TYPE_Shapes_List : return( "shapes_list" );
156  case PARAMETER_TYPE_TIN_List : return( "tin_list" );
157  case PARAMETER_TYPE_PointCloud_List : return( "points_list" );
158 
159  case PARAMETER_TYPE_Parameters : return( "parameters" );
160  }
161 }
162 
163 //---------------------------------------------------------
165 {
166  if( !Identifier.Cmp("node" ) ) { return( PARAMETER_TYPE_Node ); }
167  if( !Identifier.Cmp("boolean" ) ) { return( PARAMETER_TYPE_Bool ); }
168  if( !Identifier.Cmp("integer" ) ) { return( PARAMETER_TYPE_Int ); }
169  if( !Identifier.Cmp("double" ) ) { return( PARAMETER_TYPE_Double ); }
170  if( !Identifier.Cmp("degree" ) ) { return( PARAMETER_TYPE_Degree ); }
171  if( !Identifier.Cmp("date" ) ) { return( PARAMETER_TYPE_Date ); }
172  if( !Identifier.Cmp("range" ) ) { return( PARAMETER_TYPE_Range ); }
173  if( !Identifier.Cmp("datatype" ) ) { return( PARAMETER_TYPE_Data_Type ); }
174  if( !Identifier.Cmp("choice" ) ) { return( PARAMETER_TYPE_Choice ); }
175  if( !Identifier.Cmp("choices" ) ) { return( PARAMETER_TYPE_Choices ); }
176 
177  if( !Identifier.Cmp("text" ) ) { return( PARAMETER_TYPE_String ); }
178  if( !Identifier.Cmp("long_text" ) ) { return( PARAMETER_TYPE_Text ); }
179  if( !Identifier.Cmp("file" ) ) { return( PARAMETER_TYPE_FilePath ); }
180 
181  if( !Identifier.Cmp("font" ) ) { return( PARAMETER_TYPE_Font ); }
182  if( !Identifier.Cmp("color" ) ) { return( PARAMETER_TYPE_Color ); }
183  if( !Identifier.Cmp("colors" ) ) { return( PARAMETER_TYPE_Colors ); }
184  if( !Identifier.Cmp("static_table") ) { return( PARAMETER_TYPE_FixedTable ); }
185  if( !Identifier.Cmp("grid_system" ) ) { return( PARAMETER_TYPE_Grid_System ); }
186  if( !Identifier.Cmp("table_field" ) ) { return( PARAMETER_TYPE_Table_Field ); }
187  if( !Identifier.Cmp("table_fields") ) { return( PARAMETER_TYPE_Table_Fields ); }
188 
189  if( !Identifier.Cmp("data_object" ) ) { return( PARAMETER_TYPE_DataObject_Output); }
190  if( !Identifier.Cmp("grid" ) ) { return( PARAMETER_TYPE_Grid ); }
191  if( !Identifier.Cmp("grids" ) ) { return( PARAMETER_TYPE_Grids ); }
192  if( !Identifier.Cmp("table" ) ) { return( PARAMETER_TYPE_Table ); }
193  if( !Identifier.Cmp("shapes" ) ) { return( PARAMETER_TYPE_Shapes ); }
194  if( !Identifier.Cmp("tin" ) ) { return( PARAMETER_TYPE_TIN ); }
195  if( !Identifier.Cmp("points" ) ) { return( PARAMETER_TYPE_PointCloud ); }
196 
197  if( !Identifier.Cmp("grid_list" ) ) { return( PARAMETER_TYPE_Grid_List ); }
198  if( !Identifier.Cmp("grids_list" ) ) { return( PARAMETER_TYPE_Grids_List ); }
199  if( !Identifier.Cmp("table_list" ) ) { return( PARAMETER_TYPE_Table_List ); }
200  if( !Identifier.Cmp("shapes_list" ) ) { return( PARAMETER_TYPE_Shapes_List ); }
201  if( !Identifier.Cmp("tin_list" ) ) { return( PARAMETER_TYPE_TIN_List ); }
202  if( !Identifier.Cmp("points_list" ) ) { return( PARAMETER_TYPE_PointCloud_List ); }
203 
204  if( !Identifier.Cmp("parameters" ) ) { return( PARAMETER_TYPE_Parameters ); }
205 
206  return( PARAMETER_TYPE_Undefined );
207 }
208 
209 
211 // //
212 // Node //
213 // //
215 
216 //---------------------------------------------------------
217 CSG_Parameter_Node::CSG_Parameter_Node(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
218  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
219 {
220  // nop
221 }
222 
223 
225 // //
226 // Bool //
227 // //
229 
230 //---------------------------------------------------------
231 CSG_Parameter_Bool::CSG_Parameter_Bool(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
232  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
233 {
234  m_Value = false;
235 }
236 
237 //---------------------------------------------------------
239 {
240  return( m_Value == (Get_Default().asInt() != 0) );
241 }
242 
243 //---------------------------------------------------------
245 {
246  return( Set_Value(asBool() ? 0 : 1) );
247 }
248 
249 //---------------------------------------------------------
251 {
252  bool bValue = Value != 0;
253 
254  if( m_Value != bValue )
255  {
256  m_Value = bValue;
257 
259  }
260 
261  return( SG_PARAMETER_DATA_SET_TRUE );
262 }
263 
265 {
266  return( _Set_Value((int)Value) );
267 }
268 
270 {
271  if( !Value.CmpNoCase(_TL("true" )) || !Value.CmpNoCase(_TL("yes")) )
272  {
273  return( _Set_Value(1) );
274  }
275 
276  if( !Value.CmpNoCase(_TL("false")) || !Value.CmpNoCase(_TL("no" )) )
277  {
278  return( _Set_Value(0) );
279  }
280 
281  int i;
282 
283  if( Value.asInt(i) )
284  {
285  return( _Set_Value(i) );
286  }
287 
288  return( SG_PARAMETER_DATA_SET_FALSE );
289 }
290 
291 //---------------------------------------------------------
293 {
294  m_String = m_Value ? _TL("true") : _TL("false");
295 }
296 
297 //---------------------------------------------------------
299 {
300  m_Value = pSource->asBool();
301 
302  return( true );
303 }
304 
305 //---------------------------------------------------------
307 {
308  if( bSave )
309  {
310  Entry.Set_Content(m_Value ? "true" : "false");
311  }
312  else
313  {
314  m_Value = Entry.Cmp_Content("true", true);
315  }
316 
317  return( true );
318 }
319 
320 
322 // //
323 // Value //
324 // //
326 
327 //---------------------------------------------------------
328 CSG_Parameter_Value::CSG_Parameter_Value(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
329  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
330 {
331  m_Minimum = 0.;
332  m_bMinimum = false;
333 
334  m_Maximum = 0.;
335  m_bMaximum = false;
336 }
337 
338 //---------------------------------------------------------
339 bool CSG_Parameter_Value::Set_Valid_Range(double Minimum, double Maximum)
340 {
341  if( m_bMinimum && m_bMaximum && Minimum > Maximum )
342  {
343  m_Minimum = Maximum;
344  m_Maximum = Minimum;
345  }
346  else
347  {
348  m_Minimum = Minimum;
349  m_Maximum = Maximum;
350  }
351 
352  int Result;
353 
354  switch( Get_Type() )
355  {
357  case PARAMETER_TYPE_Degree: Result = _Set_Value(asDouble()); break;
358  case PARAMETER_TYPE_Int : Result = _Set_Value(asInt ()); break;
359  default : return( false );
360  }
361 
362  if( Result == SG_PARAMETER_DATA_SET_CHANGED )
363  {
364  has_Changed();
365  }
366 
367  return( Result != SG_PARAMETER_DATA_SET_FALSE );
368 }
369 
370 //---------------------------------------------------------
371 void CSG_Parameter_Value::Set_Minimum(double Minimum, bool bOn)
372 {
373  if( bOn == false )
374  {
375  m_bMinimum = false;
376  }
377  else
378  {
379  m_bMinimum = true;
380 
381  if( m_bMaximum && m_Maximum < Minimum )
382  {
383  m_Maximum = Minimum;
384  }
385 
386  Set_Valid_Range(Minimum, m_Maximum);
387  }
388 }
389 
390 //---------------------------------------------------------
391 void CSG_Parameter_Value::Set_Maximum(double Maximum, bool bOn)
392 {
393  if( bOn == false )
394  {
395  m_bMaximum = false;
396  }
397  else
398  {
399  m_bMaximum = true;
400 
401  if( m_bMinimum && m_Minimum > Maximum )
402  {
403  m_Minimum = Maximum;
404  }
405 
406  Set_Valid_Range(m_Minimum, Maximum);
407  }
408 }
409 
410 //---------------------------------------------------------
412 {
413  m_Minimum = pSource->asValue()->m_Minimum;
414  m_bMinimum = pSource->asValue()->m_bMinimum;
415 
416  m_Maximum = pSource->asValue()->m_Maximum;
417  m_bMaximum = pSource->asValue()->m_bMaximum;
418 
419  return( true );
420 }
421 
422 
424 // //
425 // Int //
426 // //
428 
429 //---------------------------------------------------------
430 CSG_Parameter_Int::CSG_Parameter_Int(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
431  : CSG_Parameter_Value(pOwner, pParent, ID, Name, Description, Constraint)
432 {
433  m_Value = 0;
434 }
435 
436 //---------------------------------------------------------
438 {
439  return( m_Value == Get_Default().asInt() );
440 }
441 
442 //---------------------------------------------------------
444 {
445  if( m_bMinimum && Value < (int)m_Minimum )
446  {
447  return( _Set_Value((int)m_Minimum) );
448  }
449 
450  if( m_bMaximum && Value > (int)m_Maximum )
451  {
452  return( _Set_Value((int)m_Maximum) );
453  }
454 
455  if( m_Value != Value )
456  {
457  m_Value = Value;
458 
460  }
461 
462  return( SG_PARAMETER_DATA_SET_TRUE );
463 }
464 
466 {
467  return( _Set_Value((int)Value) );
468 }
469 
471 {
472  int i;
473 
474  if( Value.asInt(i) )
475  {
476  return( _Set_Value(i) );
477  }
478 
479  return( SG_PARAMETER_DATA_SET_FALSE );
480 }
481 
482 //---------------------------------------------------------
484 {
485  m_String.Printf("%d", m_Value);
486 }
487 
488 //---------------------------------------------------------
490 {
492 
493  return( _Set_Value(((CSG_Parameter_Value *)pSource)->asInt()) != 0 );
494 }
495 
496 //---------------------------------------------------------
498 {
499  if( bSave )
500  {
501  Entry.Set_Content(asString());
502  }
503  else
504  {
505  return( Entry.Get_Content().asInt(m_Value) );
506  }
507 
508  return( true );
509 }
510 
511 
513 // //
514 // Double //
515 // //
517 
518 //---------------------------------------------------------
519 CSG_Parameter_Double::CSG_Parameter_Double(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
520  : CSG_Parameter_Value(pOwner, pParent, ID, Name, Description, Constraint)
521 {
522  m_Value = 0.;
523 }
524 
525 //---------------------------------------------------------
527 {
528  return( m_Value == Get_Default().asDouble() );
529 }
530 
531 //---------------------------------------------------------
533 {
534  return( _Set_Value((double)Value) );
535 }
536 
538 {
539  if( m_bMinimum && Value < m_Minimum )
540  {
541  return( _Set_Value(m_Minimum) );
542  }
543 
544  if( m_bMaximum && Value > m_Maximum )
545  {
546  return( _Set_Value(m_Maximum) );
547  }
548 
549  if( m_Value != Value )
550  {
551  m_Value = Value;
552 
554  }
555 
556  return( SG_PARAMETER_DATA_SET_TRUE );
557 }
558 
560 {
561  double d;
562 
563  if( Value.asDouble(d) )
564  {
565  return( _Set_Value(d) );
566  }
567 
568  return( SG_PARAMETER_DATA_SET_FALSE );
569 }
570 
571 //---------------------------------------------------------
573 {
575 }
576 
577 //---------------------------------------------------------
579 {
581 
582  return( _Set_Value(pSource->asDouble()) != 0 );
583 }
584 
585 //---------------------------------------------------------
587 {
588  if( bSave )
589  {
591  }
592  else
593  {
594  return( Entry.Get_Content().asDouble(m_Value) );
595  }
596 
597  return( true );
598 }
599 
600 
602 // //
603 // Degree //
604 // //
606 
607 //---------------------------------------------------------
608 CSG_Parameter_Degree::CSG_Parameter_Degree(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
609  : CSG_Parameter_Double(pOwner, pParent, ID, Name, Description, Constraint)
610 {
611  // nop
612 }
613 
614 //---------------------------------------------------------
616 {
618 }
619 
620 //---------------------------------------------------------
622 {
624 }
625 
626 
628 // //
629 // Date //
630 // //
632 
633 //---------------------------------------------------------
634 CSG_Parameter_Date::CSG_Parameter_Date(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
635  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
636 {
637  _Set_Value(CSG_DateTime::Now().Get_JDN());
638 }
639 
640 //---------------------------------------------------------
642 {
643  return( _Set_Value((double)Value) );
644 }
645 
647 {
648  Value = 0.5 + floor(Value); // always adjust to high noon, prevents rounding problems (we're not intested in time, just date!)
649 
650  if( Value != asDouble() )
651  {
652  m_Date.Set(Value);
653 
655  }
656 
657  return( SG_PARAMETER_DATA_SET_TRUE );
658 }
659 
661 {
662  CSG_DateTime Date;
663 
664  if( Date.Parse_ISODate(Value) )
665  {
666  if( !m_Date.is_EqualTo(Date) )
667  {
668  m_Date.Set(Date);
669 
671  }
672 
673  return( SG_PARAMETER_DATA_SET_TRUE );
674  }
675 
676  if( Date.Parse_Date(Value) )
677  {
678  if( !m_Date.is_EqualTo(Date) )
679  {
680  m_Date.Set(Date);
681 
683  }
684 
685  return( SG_PARAMETER_DATA_SET_TRUE );
686  }
687 
688  return( SG_PARAMETER_DATA_SET_FALSE );
689 }
690 
691 //---------------------------------------------------------
693 {
695 }
696 
697 //---------------------------------------------------------
699 {
700  return( (int)asDouble() );
701 }
702 
703 //---------------------------------------------------------
705 {
706  return( m_Date.Get_JDN() );
707 }
708 
709 //---------------------------------------------------------
711 {
712  m_Date = Date;
713 }
714 
715 //---------------------------------------------------------
717 {
718  m_Date = ((CSG_Parameter_Date *)pSource)->m_Date;
719 
720  return( true );
721 }
722 
723 //---------------------------------------------------------
725 {
726  if( bSave )
727  {
728  Entry.Set_Content(asString());
729  }
730  else
731  {
732  _Set_Value(Entry.Get_Content());
733  }
734 
735  return( true );
736 }
737 
738 
740 // //
741 // Range //
742 // //
744 
745 //---------------------------------------------------------
746 CSG_Parameter_Range::CSG_Parameter_Range(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
747  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
748 {
749  m_pRange = new CSG_Parameters;
750 
751  if( is_Information() )
752  {
753  m_pMin = (CSG_Parameter_Double *)m_pRange->Add_Info_Value(ID, "MIN", "Minimum", Description, PARAMETER_TYPE_Double);
754  m_pMax = (CSG_Parameter_Double *)m_pRange->Add_Info_Value(ID, "MAX", "Maximum", Description, PARAMETER_TYPE_Double);
755  }
756  else
757  {
758  m_pMin = (CSG_Parameter_Double *)m_pRange->Add_Double (ID, "MIN", "Minimum", Description);
759  m_pMax = (CSG_Parameter_Double *)m_pRange->Add_Double (ID, "MAX", "Maximum", Description);
760  }
761 }
762 
764 {
765  delete(m_pRange);
766 }
767 
768 //---------------------------------------------------------
770 {
771  m_String.Printf("%.*f; %.*f",
774  );
775 }
776 
777 //---------------------------------------------------------
779 {
781 }
782 
783 bool CSG_Parameter_Range::Set_Range(double Min, double Max)
784 {
785  bool bResult;
786 
787  if( Min > Max )
788  {
789  bResult = m_pMin->Set_Value(Max);
790  bResult |= m_pMax->Set_Value(Min);
791  }
792  else
793  {
794  bResult = m_pMin->Set_Value(Min);
795  bResult |= m_pMax->Set_Value(Max);
796  }
797 
798  return( bResult );
799 }
800 
801 //---------------------------------------------------------
803 {
804  if( m_pMin->Set_Value(Value) )
805  {
806  has_Changed();
807 
808  return( true );
809  }
810 
811  return( false );
812 }
813 
815 {
816  return( m_pMin->asDouble() );
817 }
818 
819 //---------------------------------------------------------
821 {
822  if( m_pMax->Set_Value(Value) )
823  {
824  has_Changed();
825 
826  return( true );
827  }
828 
829  return( false );
830 }
831 
833 {
834  return( m_pMax->asDouble() );
835 }
836 
837 //---------------------------------------------------------
839 {
840  return( m_pMin->is_Default() && m_pMax->is_Default() );
841 }
842 
843 //---------------------------------------------------------
845 {
846  return( m_pMin->Restore_Default() && m_pMax->Restore_Default() );
847 }
848 
849 //---------------------------------------------------------
851 {
852  m_pMin->Assign(pSource->asRange()->m_pMin);
853  m_pMax->Assign(pSource->asRange()->m_pMax);
854 
855  return( true );
856 }
857 
858 //---------------------------------------------------------
860 {
861  if( bSave )
862  {
863  Entry.Fmt_Content("%.*f; %.*f",
866  );
867 
868  return( true );
869  }
870  else
871  {
872  CSG_String s(Entry.Get_Content()); double Min, Max;
873 
874  if( s.BeforeFirst(';').asDouble(Min) && s.AfterFirst(';').asDouble(Max) )
875  {
876  return( Set_Range(Min, Max) );
877  }
878  }
879 
880  return( false );
881 }
882 
883 
885 // //
886 // Choice //
887 // //
889 
890 //---------------------------------------------------------
891 CSG_Parameter_Choice::CSG_Parameter_Choice(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
892  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
893 {
894  m_Value = -1;
895 }
896 
897 //---------------------------------------------------------
899 {
900  return( m_Value == Get_Default().asInt() );
901 }
902 
903 //---------------------------------------------------------
905 {
906  return( Get_Count() > 1 && Set_Value((asInt() + 1) % Get_Count()) );
907 }
908 
909 //---------------------------------------------------------
911 {
912  m_Items.Clear(); m_Data.Clear();
913 
914  return( true );
915 }
916 
917 //---------------------------------------------------------
919 {
920  if( !Item.is_Empty() )
921  {
922  m_Items.Add(Item);
923  m_Data .Add(Data);
924 
925  _Set_String(); // items have changed
926 
927  return( true );
928  }
929 
930  return( false );
931 }
932 
933 //---------------------------------------------------------
935 {
936  m_Items.Clear(); m_Data.Clear();
937 
938  if( String && *String != '\0' )
939  {
940  CSG_Strings Items(SG_String_Tokenize(String, "|"));
941 
942  for(int i=0; i<Items.Get_Count(); i++)
943  {
944  if( Items[i].Find('{') == 0 && Items[i].Find('}') > 0 ) // data entry within leading curly brackets: '{data} item text'
945  {
946  CSG_String Data(Items[i].AfterFirst('{').BeforeFirst('}'));
947  CSG_String Item(Items[i].AfterFirst('}')); Item.Trim();
948 
949  Add_Item(Item, Data);
950  }
951  else
952  {
953  Add_Item(Items[i]);
954  }
955  }
956  }
957 
958  if( m_Value < 0 && m_Items.Get_Count() > 0 )
959  {
960  m_Value = 0;
961  }
962 
963  if( m_Value >= m_Items.Get_Count() )
964  {
965  m_Value = m_Items.Get_Count() - 1;
966  }
967 
968  _Set_String(); // items have changed
969 
970  return( Get_Count() > 0 );
971 }
972 
973 //---------------------------------------------------------
975 {
976  CSG_String Items;
977 
978  for(int i=0; i<Get_Count(); i++)
979  {
980  if( i > 0 )
981  {
982  Items += "|";
983  }
984 
985  Items += m_Items[i];
986  }
987 
988  return( Items );
989 }
990 
991 //---------------------------------------------------------
992 const SG_Char * CSG_Parameter_Choice::Get_Item(int Index) const
993 {
994  if( Index >= 0 && Index < Get_Count() )
995  {
996  return( m_Items[Index] );
997  }
998 
999  return( NULL );
1000 }
1001 
1002 //---------------------------------------------------------
1004 {
1005  if( Index >= 0 && Index < Get_Count() )
1006  {
1007  return( m_Data[Index] );
1008  }
1009 
1010  return( "" );
1011 }
1012 
1014 {
1015  return( Get_Item_Data(m_Value) );
1016 }
1017 
1019 {
1020  Value = Get_Item_Data(m_Value);
1021 
1022  return( !Value.is_Empty() );
1023 }
1024 
1025 bool CSG_Parameter_Choice::Get_Data(int &Value) const
1026 {
1027  CSG_String String;
1028 
1029  return( Get_Data(String) && String.asInt(Value) );
1030 }
1031 
1032 bool CSG_Parameter_Choice::Get_Data(double &Value) const
1033 {
1034  CSG_String String;
1035 
1036  return( Get_Data(String) && String.asDouble(Value) );
1037 }
1038 
1039 //---------------------------------------------------------
1041 {
1042  if( Value >= 0 && Value < m_Items.Get_Count() )
1043  {
1044  if( m_Value != Value )
1045  {
1046  m_Value = Value;
1047 
1049  }
1050 
1051  return( SG_PARAMETER_DATA_SET_TRUE );
1052  }
1053 
1054  return( SG_PARAMETER_DATA_SET_FALSE );
1055 }
1056 
1057 //---------------------------------------------------------
1059 {
1060  return( _Set_Value((int)Value) );
1061 }
1062 
1063 //---------------------------------------------------------
1065 {
1066  if( !Value.is_Empty() )
1067  {
1068  for(int i=0; i<m_Items.Get_Count(); i++)
1069  {
1070  if( !Value.Cmp(Get_Item_Data(i)) || !Value.Cmp(Get_Item(i)) )
1071  {
1072  return( _Set_Value(i) );
1073  }
1074  }
1075 
1076  int Index; // choice not found? then test, if value string is an integer specifying the index position
1077 
1078  if( Value.asInt(Index) && Index >= 0 && Index < m_Items.Get_Count() )
1079  {
1080  return( _Set_Value(Index) );
1081  }
1082 
1083  }
1084 
1085  return( SG_PARAMETER_DATA_SET_FALSE );
1086 }
1087 
1088 //---------------------------------------------------------
1090 {
1091  m_String = m_Value >= 0 && m_Value < Get_Count() ? Get_Item(m_Value) : _TL("<no choice available>");
1092 }
1093 
1094 //---------------------------------------------------------
1096 {
1097  m_Items = pSource->asChoice()->m_Items;
1098  m_Data = pSource->asChoice()->m_Data ;
1099  m_Value = pSource->asChoice()->m_Value;
1100 
1101  _Set_String(); // items have changed
1102 
1103  return( true );
1104 }
1105 
1106 //---------------------------------------------------------
1108 {
1109  if( bSave )
1110  {
1111  Entry.Add_Property("index", m_Value);
1112 
1113  Entry.Set_Content(asString());
1114 
1115  return( true );
1116  }
1117  else
1118  {
1119  int Index;
1120 
1121  return( (Entry.Get_Property("index", Index) || Entry.Get_Content().asInt(Index)) && _Set_Value(Index) );
1122  }
1123 }
1124 
1125 
1127 // //
1128 // Data Type //
1129 // //
1131 
1132 //---------------------------------------------------------
1133 CSG_Parameter_Data_Type::CSG_Parameter_Data_Type(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1134  : CSG_Parameter_Choice(pOwner, pParent, ID, Name, Description, Constraint)
1135 {
1136  // nop
1137 }
1138 
1139 //---------------------------------------------------------
1148 //---------------------------------------------------------
1149 bool CSG_Parameter_Data_Type::Set_Data_Types(int Data_Types, TSG_Data_Type Default, const CSG_String &User)
1150 {
1151  if( Data_Types <= SG_DATATYPES_Undefined )
1152  {
1153  Data_Types = SG_DATATYPES_Standard;
1154  }
1155 
1156  if( Default == SG_DATATYPE_Undefined && User.is_Empty() )
1157  {
1158  switch( Data_Types )
1159  {
1160  case (SG_DATATYPES_Integer ): Default = SG_DATATYPE_Int ; break;
1161  case (SG_DATATYPES_Integer|SG_DATATYPES_Bit): Default = SG_DATATYPE_Int ; break;
1162  case (SG_DATATYPES_Numeric ): Default = SG_DATATYPE_Float ; break;
1163  case (SG_DATATYPES_Numeric|SG_DATATYPES_Bit): Default = SG_DATATYPE_Float ; break;
1164  case (SG_DATATYPES_Table ): Default = SG_DATATYPE_String; break;
1165  case (SG_DATATYPES_Standard ): Default = SG_DATATYPE_String; break;
1166  }
1167  }
1168 
1169  #define ADD_TYPE(type) if( (Data_Types & SG_Data_Type_Get_Flag(type)) != 0 ) { if( Default == type ) { _Default = Get_Count(); } Add_Item(SG_Data_Type_Get_Name(type), SG_Data_Type_Get_Identifier(type)); }
1170 
1171  int _Default = -1;
1172 
1173  ADD_TYPE(SG_DATATYPE_String); // data types are added in this order to the choice item list
1188 
1189  if( !User.is_Empty() )
1190  {
1191  if( _Default < 0 )
1192  {
1193  _Default = Get_Count();
1194  }
1195 
1197  }
1198  else if( _Default < 0 )
1199  {
1200  _Default = 0;
1201  }
1202 
1203  Set_Default(_Default); Set_Value(_Default);
1204 
1205  return( true );
1206 }
1207 
1208 //---------------------------------------------------------
1215 //---------------------------------------------------------
1217 {
1218  for(int i=0; i<Get_Count(); i++)
1219  {
1220  if( Value == SG_Data_Type_Get_Type(Get_Item_Data(i)) )
1221  {
1222  return( Set_Value(i) );
1223  }
1224  }
1225 
1226  return( false );
1227 }
1228 
1229 //---------------------------------------------------------
1237 //---------------------------------------------------------
1239 {
1241 
1242  return( Type == SG_DATATYPE_Undefined ? Default : Type );
1243 }
1244 
1245 //---------------------------------------------------------
1247 {
1248  return( CSG_Parameter_Choice::_Assign(pSource) );
1249 }
1250 
1251 //---------------------------------------------------------
1253 {
1254  return( CSG_Parameter_Choice::_Serialize(Entry, bSave) );
1255 }
1256 
1257 
1259 // //
1260 // Choices //
1261 // //
1263 
1264 //---------------------------------------------------------
1265 CSG_Parameter_Choices::CSG_Parameter_Choices(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1266  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1267 {
1268  // nop
1269 }
1270 
1271 //---------------------------------------------------------
1273 {
1274  CSG_String_Tokenizer Tokens(Value, ";");
1275 
1276  m_Selection.Destroy();
1277 
1278  while( Tokens.Has_More_Tokens() )
1279  {
1280  int Index;
1281 
1282  if( Tokens.Get_Next_Token().asInt(Index) )
1283  {
1284  Select(Index);
1285  }
1286  }
1287 
1289 }
1290 
1291 //---------------------------------------------------------
1293 {
1294  m_String.Clear();
1295 
1296  for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1297  {
1298  m_String += CSG_String::Format("%d;", m_Selection[i]);
1299  }
1300 }
1301 
1302 //---------------------------------------------------------
1304 {
1305  Del_Items();
1306 
1307  CSG_String_Tokenizer Tokens(Items, "|");
1308 
1309  while( Tokens.Has_More_Tokens() )
1310  {
1311  Add_Item(Tokens.Get_Next_Token());
1312  }
1313 }
1314 
1315 //---------------------------------------------------------
1317 {
1318  Del_Items();
1319 
1320  for(int i=0; i<Items.Get_Count(); i++)
1321  {
1322  Add_Item(Items[i]);
1323  }
1324 }
1325 
1326 //---------------------------------------------------------
1328 {
1329  CSG_String Items;
1330 
1331  for(int i=0; i<m_Items[0].Get_Count(); i++)
1332  {
1333  if( i > 0 )
1334  {
1335  Items += "|";
1336  }
1337 
1338  Items += m_Items[0][i];
1339  }
1340 
1341  return( Items );
1342 }
1343 
1344 //---------------------------------------------------------
1346 {
1347  m_Items[0].Clear();
1348  m_Items[1].Clear();
1349 
1350  m_Selection.Destroy();
1351 }
1352 
1353 //---------------------------------------------------------
1355 {
1356  m_Items[0] += Item;
1357  m_Items[1] += Data;
1358 }
1359 
1360 //---------------------------------------------------------
1362 {
1363  for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1364  {
1365  if( Index == m_Selection[i] )
1366  {
1367  return( true );
1368  }
1369  }
1370 
1371  return( false );
1372 }
1373 
1374 //---------------------------------------------------------
1375 bool CSG_Parameter_Choices::Select(int Index, bool bSelect)
1376 {
1377  if( Index >= 0 && Index < Get_Item_Count() )
1378  {
1379  if( bSelect && !is_Selected(Index) )
1380  {
1381  m_Selection += Index;
1382  }
1383  else if( !bSelect )
1384  {
1385  for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1386  {
1387  if( Index == m_Selection[i] )
1388  {
1389  for(size_t j=i+1; j<m_Selection.Get_uSize(); i++, j++)
1390  {
1391  m_Selection[i] = m_Selection[j];
1392  }
1393 
1395  }
1396  }
1397  }
1398 
1399  return( true );
1400  }
1401 
1402  return( false );
1403 }
1404 
1405 //---------------------------------------------------------
1407 {
1408  m_Selection.Destroy();
1409 
1410  return( true );
1411 }
1412 
1413 //---------------------------------------------------------
1415 {
1416  m_Items[0] = pSource->asChoices()->m_Items[0];
1417  m_Items[1] = pSource->asChoices()->m_Items[1];
1418 
1419  m_Selection = pSource->asChoices()->m_Selection;
1420 
1421  return( true );
1422 }
1423 
1424 //---------------------------------------------------------
1426 {
1427  if( bSave )
1428  {
1429  Entry.Set_Content(asString());
1430 
1431  return( true );
1432  }
1433  else
1434  {
1435  return( _Set_Value(Entry.Get_Content()) != 0 );
1436  }
1437 }
1438 
1439 
1441 // //
1442 // String //
1443 // //
1445 
1446 //---------------------------------------------------------
1447 CSG_Parameter_String::CSG_Parameter_String(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1448  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1449 {
1450  m_bPassword = false;
1451 }
1452 
1453 //---------------------------------------------------------
1455 {
1456  return( !m_String.is_Empty() );
1457 }
1458 
1459 //---------------------------------------------------------
1461 {
1462  m_bPassword = bOn;
1463 }
1464 
1465 //---------------------------------------------------------
1467 {
1468  return( m_bPassword );
1469 }
1470 
1471 //---------------------------------------------------------
1473 {
1474  if( m_String.Cmp(Value) )
1475  {
1476  m_String = Value;
1477 
1479  }
1480 
1481  return( SG_PARAMETER_DATA_SET_TRUE );
1482 }
1483 
1484 //---------------------------------------------------------
1486 {
1487  m_String = ((CSG_Parameter_String *)pSource)->m_String;
1488  m_bPassword = ((CSG_Parameter_String *)pSource)->m_bPassword;
1489 
1490  return( true );
1491 }
1492 
1493 //---------------------------------------------------------
1495 {
1496  if( bSave )
1497  {
1498  Entry.Set_Content(m_String);
1499  }
1500  else
1501  {
1502  m_String = Entry.Get_Content();
1503  }
1504 
1505  return( true );
1506 }
1507 
1508 
1510 // //
1511 // Text //
1512 // //
1514 
1515 //---------------------------------------------------------
1516 CSG_Parameter_Text::CSG_Parameter_Text(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1517  : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1518 {
1519  // nop
1520 }
1521 
1522 
1524 // //
1525 // FilePath //
1526 // //
1528 
1529 //---------------------------------------------------------
1530 CSG_Parameter_File_Name::CSG_Parameter_File_Name(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1531  : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1532 {
1533  m_Filter.Printf("%s|*.*", _TL("All Files"));
1534 
1535  m_bSave = false;
1536  m_bMultiple = false;
1537  m_bDirectory = false;
1538 }
1539 
1540 //---------------------------------------------------------
1542 {
1543  if( Filter )
1544  {
1545  m_Filter = Filter;
1546  }
1547  else
1548  {
1549  m_Filter.Printf("%s|*.*", _TL("All Files"));
1550  }
1551 }
1552 
1554 {
1555  return( m_Filter.c_str() );
1556 }
1557 
1558 //---------------------------------------------------------
1560 {
1561  m_bSave = bFlag;
1562 }
1563 
1565 {
1566  m_bMultiple = bFlag;
1567 }
1568 
1570 {
1571  m_bDirectory = bFlag;
1572 }
1573 
1574 //---------------------------------------------------------
1576 {
1577  FilePaths.Clear();
1578 
1579  if( m_String.Length() > 0 )
1580  {
1581  if( !m_bMultiple )
1582  {
1583  FilePaths.Add(m_String);
1584  }
1585  else if( m_String[0] != '\"' )
1586  {
1587  FilePaths.Add(m_String);
1588  }
1589  else
1590  {
1591  CSG_String s(m_String);
1592 
1593  while( s.Length() > 2 )
1594  {
1595  s = s.AfterFirst('\"');
1596  FilePaths.Add(s.BeforeFirst('\"'));
1597  s = s.AfterFirst('\"');
1598  }
1599  }
1600  }
1601 
1602  return( FilePaths.Get_Count() > 0 );
1603 }
1604 
1605 //---------------------------------------------------------
1607 {
1609 
1611 
1612  m_bSave = pSource->asFilePath()->m_bSave;
1613  m_bMultiple = pSource->asFilePath()->m_bMultiple;
1614  m_bDirectory = pSource->asFilePath()->m_bDirectory;
1615 
1616  return( true );
1617 }
1618 
1619 
1621 // //
1622 // Font //
1623 // //
1625 
1626 //---------------------------------------------------------
1627 CSG_Parameter_Font::CSG_Parameter_Font(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1628  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1629 {
1630  Restore_Default();
1631 }
1632 
1633 //---------------------------------------------------------
1635 {
1636  m_Color = SG_GET_RGB(0, 0, 0);
1637 #ifdef __WXMAC__
1638  m_String = ".applesystemuifont 11 utf-8";
1639 #else
1640  m_String = "0;-12;0;0;0;400;0;0;0;0;3;2;1;34;Arial";
1641 #endif
1642 
1643  return( true );
1644 }
1645 
1646 //---------------------------------------------------------
1648 {
1649  if( m_Color != Value )
1650  {
1651  m_Color = Value;
1652 
1654  }
1655 
1656  return( SG_PARAMETER_DATA_SET_TRUE );
1657 }
1658 
1659 //---------------------------------------------------------
1661 {
1662  if( Value.is_Empty() )
1663  {
1664  Restore_Default();
1665 
1667  }
1668 
1669  m_String = Value;
1670 
1672 }
1673 
1674 //---------------------------------------------------------
1676 {
1677  return( m_Color );
1678 }
1679 
1680 //---------------------------------------------------------
1682 {
1683  return( (void *)m_String.c_str() );
1684 }
1685 
1686 //---------------------------------------------------------
1688 {
1689  m_Color = ((CSG_Parameter_Font *)pSource)->m_Color;
1690  m_String = ((CSG_Parameter_Font *)pSource)->m_String;
1691 
1692  return( true );
1693 }
1694 
1695 //---------------------------------------------------------
1697 {
1698  if( bSave )
1699  {
1700  Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1702  ));
1703 
1704  Entry.Add_Child("FONT", m_String);
1705  }
1706  else
1707  {
1708  if( Entry("COLOR") != NULL )
1709  {
1710  _Set_Value((int)SG_GET_RGB(
1711  Entry("COLOR")->Get_Content().AfterFirst('R').asInt(),
1712  Entry("COLOR")->Get_Content().AfterFirst('G').asInt(),
1713  Entry("COLOR")->Get_Content().AfterFirst('B').asInt()
1714  ));
1715  }
1716 
1717  if( Entry("FONT") != NULL )
1718  {
1719  _Set_Value(Entry("FONT")->Get_Content());
1720  }
1721  }
1722 
1723  return( true );
1724 }
1725 
1726 
1728 // //
1729 // Color //
1730 // //
1732 
1733 //---------------------------------------------------------
1734 CSG_Parameter_Color::CSG_Parameter_Color(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1735  : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
1736 {
1737  // nop
1738 }
1739 
1740 //---------------------------------------------------------
1742 {
1743  long l;
1744 
1745  if( SG_Color_From_Text(Value, l) )
1746  {
1747  return( CSG_Parameter_Int::_Set_Value((int)l) );
1748  }
1749 
1750  int i;
1751 
1752  if( Value.asInt(i) )
1753  {
1754  return( CSG_Parameter_Int::_Set_Value(i) );
1755  }
1756 
1757  return( SG_PARAMETER_DATA_SET_FALSE );
1758 }
1759 
1760 //---------------------------------------------------------
1762 {
1763  if( bSave )
1764  {
1765  Entry.Fmt_Content("R%03d G%03d B%03d", SG_GET_R(m_Value), SG_GET_G(m_Value), SG_GET_B(m_Value));
1766  }
1767  else
1768  {
1769  m_Value = SG_GET_RGB(
1770  Entry.Get_Content().AfterFirst('R').asInt(),
1771  Entry.Get_Content().AfterFirst('G').asInt(),
1772  Entry.Get_Content().AfterFirst('B').asInt()
1773  );
1774  }
1775 
1776  return( true );
1777 }
1778 
1779 
1781 // //
1782 // Colors //
1783 // //
1785 
1786 //---------------------------------------------------------
1787 CSG_Parameter_Colors::CSG_Parameter_Colors(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1788  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1789 {
1790  // nop
1791 }
1792 
1793 //---------------------------------------------------------
1795 {
1796  if( Value >= 0 && Value < CSG_Colors::Get_Predefined_Count() )
1797  {
1798  if( m_Colors.Create(m_Colors.Get_Count(), Value) )
1799  {
1801  }
1802  }
1803 
1804  return( SG_PARAMETER_DATA_SET_FALSE );
1805 }
1806 
1807 //---------------------------------------------------------
1809 {
1810  m_String.Printf("%d %s", m_Colors.Get_Count(), _TL("colors"));
1811 }
1812 
1813 //---------------------------------------------------------
1815 {
1816  return( m_Colors.Get_Count() );
1817 }
1818 
1819 //---------------------------------------------------------
1821 {
1822  return( (void *)&m_Colors );
1823 }
1824 
1825 //---------------------------------------------------------
1827 {
1828  return( m_Colors.Assign(pSource->asColors()) );
1829 }
1830 
1831 //---------------------------------------------------------
1833 {
1834  if( bSave )
1835  {
1836  for(int i=0; i<m_Colors.Get_Count(); i++)
1837  {
1838  Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1839  m_Colors.Get_Red (i),
1840  m_Colors.Get_Green(i),
1841  m_Colors.Get_Blue (i))
1842  );
1843  }
1844  }
1845  else
1846  {
1847  if( Entry.Get_Children_Count() <= 1 )
1848  {
1849  return( false );
1850  }
1851 
1853 
1854  for(int i=0; i<m_Colors.Get_Count(); i++)
1855  {
1856  CSG_String s(Entry(i)->Get_Content());
1857 
1858  m_Colors.Set_Red (i, s.AfterFirst('R').asInt());
1859  m_Colors.Set_Green(i, s.AfterFirst('G').asInt());
1860  m_Colors.Set_Blue (i, s.AfterFirst('B').asInt());
1861  }
1862  }
1863 
1864  return( true );
1865 }
1866 
1867 
1869 // //
1870 // FixedTable //
1871 // //
1873 
1874 //---------------------------------------------------------
1875 CSG_Parameter_Fixed_Table::CSG_Parameter_Fixed_Table(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1876  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1877 {
1878  m_Table.Set_Name(_TL("Table"));
1879 }
1880 
1881 //---------------------------------------------------------
1883 {
1884  if( Value && m_Table.Assign_Values((CSG_Table *)Value) )
1885  {
1887  }
1888 
1889  return( SG_PARAMETER_DATA_SET_TRUE );
1890 }
1891 
1892 //---------------------------------------------------------
1894 {
1895  m_String.Printf("%s (%s: %d, %s: %lld)", m_Table.Get_Name(), _TL("columns"), m_Table.Get_Field_Count(), _TL("rows"), m_Table.Get_Count());
1896 }
1897 
1898 //---------------------------------------------------------
1900 {
1901  return( (void *)&m_Table );
1902 }
1903 
1904 //---------------------------------------------------------
1906 {
1907  return( m_Table.Create(*pSource->asTable()) );
1908 }
1909 
1910 //---------------------------------------------------------
1912 {
1913  int iField;
1914 
1915  if( bSave )
1916  {
1917  CSG_MetaData *pNode = Entry.Add_Child("FIELDS");
1918 
1919  for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
1920  {
1921  CSG_MetaData *pEntry = pNode->Add_Child("FIELD", m_Table.Get_Field_Name(iField));
1922 
1923  pEntry->Set_Property("type", gSG_Data_Type_Identifier[m_Table.Get_Field_Type(iField)]);
1924  }
1925 
1926  pNode = Entry.Add_Child("RECORDS");
1927 
1928  for(sLong iRecord=0; iRecord<m_Table.Get_Count(); iRecord++)
1929  {
1930  CSG_MetaData *pEntry = pNode->Add_Child("RECORD");
1931 
1932  CSG_Table_Record *pRecord = m_Table.Get_Record(iRecord);
1933 
1934  for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
1935  {
1936  pEntry->Add_Child("FIELD", pRecord->asString(iField));
1937  }
1938  }
1939  }
1940  else
1941  {
1942  CSG_MetaData *pNode;
1943 
1944  if( (pNode = Entry("FIELDS")) == NULL )
1945  {
1946  return( false );
1947  }
1948 
1949  CSG_Table Table;
1950 
1951  for(iField=0; iField<pNode->Get_Children_Count(); iField++)
1952  {
1954 
1955  CSG_String s;
1956 
1957  if( pNode->Get_Child(iField)->Get_Property("type", s) )
1958  {
1959  type = SG_Data_Type_Get_Type(s);
1960  }
1961 
1962  Table.Add_Field(pNode->Get_Child(iField)->Get_Content(), type == SG_DATATYPE_Undefined ? SG_DATATYPE_String : type);
1963  }
1964 
1965  if( (pNode = Entry("RECORDS")) == NULL )
1966  {
1967  return( false );
1968  }
1969 
1970  for(int iRecord=0; iRecord<pNode->Get_Children_Count(); iRecord++)
1971  {
1972  CSG_MetaData *pEntry = pNode->Get_Child(iRecord);
1973 
1974  CSG_Table_Record *pRecord = Table.Add_Record();
1975 
1976  for(iField=0; iField<pEntry->Get_Children_Count(); iField++)
1977  {
1978  pRecord->Set_Value(iField, pEntry->Get_Child(iField)->Get_Content());
1979  }
1980  }
1981 
1982  return( m_Table.Assign_Values(&Table) );
1983  }
1984 
1985  return( true );
1986 }
1987 
1988 
1990 // //
1991 // Grid_System //
1992 // //
1994 
1995 //---------------------------------------------------------
1996 CSG_Parameter_Grid_System::CSG_Parameter_Grid_System(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
1997  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1998 {
1999  // nop
2000 }
2001 
2002 //---------------------------------------------------------
2004 {
2005  CSG_Grid_System System;
2006 
2007  if( Value != NULL )
2008  {
2009  System.Create(*((CSG_Grid_System *)Value));
2010  }
2011 
2012  if( m_System == System )
2013  {
2014  return( SG_PARAMETER_DATA_SET_TRUE );
2015  }
2016 
2017  m_System = System;
2018 
2019  //-----------------------------------------------------
2020  bool bCallback = Get_Parameters()->Set_Callback(false); // only update grid parameter objects in 1st loop...
2021 
2022  for(int i=0; i<Get_Children_Count(); i++)
2023  {
2024  CSG_Parameter *pParameter = Get_Child(i);
2025 
2026  if( pParameter->is_DataObject() )
2027  {
2028  CSG_Data_Object *pObject = pParameter->asDataObject();
2029 
2030  if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2031  {
2032  bool bInvalid = !m_System.is_Valid() || !(Get_Manager() && Get_Manager()->Exists(pObject));
2033 
2034  if( !bInvalid )
2035  {
2036  switch( pObject->Get_ObjectType() )
2037  {
2038  case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2039  case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2040  default: break;
2041  }
2042  }
2043 
2044  if( bInvalid )
2045  {
2046  pParameter->Set_Value(DATAOBJECT_NOTSET);
2047  }
2048  }
2049  }
2050 
2051  //-------------------------------------------------
2052  else if( pParameter->is_DataObject_List() )
2053  {
2054  CSG_Parameter_List *pList = pParameter->asList();
2055 
2056  if( !m_System.is_Valid() )
2057  {
2058  pList->Del_Items();
2059  }
2060  else for(int j=pList->Get_Item_Count()-1; j>=0; j--)
2061  {
2062  CSG_Data_Object *pObject = pList->Get_Item(j);
2063 
2064  bool bInvalid = !(Get_Manager() && Get_Manager()->Exists(pObject));
2065 
2066  if( !bInvalid && pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2067  {
2068  switch( pObject->Get_ObjectType() )
2069  {
2070  case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2071  case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2072  default: break;
2073  }
2074  }
2075 
2076  if( bInvalid )
2077  {
2078  pList->Del_Item(j);
2079  }
2080  }
2081  }
2082  }
2083 
2084  Get_Parameters()->Set_Callback(bCallback);
2085 
2086  if( bCallback ) // ...process On_Parameter_Changed()/On_Parameters_Enable() in a 2nd loop!
2087  {
2088  for(int i=0; i<Get_Children_Count(); i++)
2089  {
2090  CSG_Parameter *pParameter = Get_Child(i);
2091 
2092  if( pParameter->is_DataObject() || pParameter->is_DataObject_List() )
2093  {
2094  pParameter->has_Changed();
2095  }
2096  }
2097  }
2098 
2099  //-----------------------------------------------------
2101 }
2102 
2103 //---------------------------------------------------------
2105 {
2107 }
2108 
2109 //---------------------------------------------------------
2111 {
2112  return( (void *)&m_System );
2113 }
2114 
2115 //---------------------------------------------------------
2117 {
2118  m_System = ((CSG_Parameter_Grid_System *)pSource)->m_System;
2119 
2120  return( true );
2121 }
2122 
2123 //---------------------------------------------------------
2125 {
2126  if( bSave )
2127  {
2128  Entry.Add_Child("CELLSIZE", m_System.Get_Cellsize());
2129  Entry.Add_Child("XMIN" , m_System.Get_Extent().Get_XMin());
2130  Entry.Add_Child("YMIN" , m_System.Get_Extent().Get_YMin());
2131  Entry.Add_Child("XMAX" , m_System.Get_Extent().Get_XMax());
2132  Entry.Add_Child("YMAX" , m_System.Get_Extent().Get_YMax());
2133  }
2134  else
2135  {
2136  m_System.Create(
2137  Entry("CELLSIZE")->Get_Content().asDouble(),
2138  Entry("XMIN" )->Get_Content().asDouble(),
2139  Entry("YMIN" )->Get_Content().asDouble(),
2140  Entry("XMAX" )->Get_Content().asDouble(),
2141  Entry("YMAX" )->Get_Content().asDouble()
2142  );
2143  }
2144 
2145  return( true );
2146 }
2147 
2148 
2150 // //
2151 // Table Field //
2152 // //
2154 
2155 //---------------------------------------------------------
2156 CSG_Parameter_Table_Field::CSG_Parameter_Table_Field(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2157  : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
2158 {
2159  m_Default = -1;
2160  m_Value = -1;
2161 }
2162 
2163 //---------------------------------------------------------
2164 bool CSG_Parameter_Table_Field::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2165 {
2166  if( m_Default < 0 && is_Optional() )
2167  {
2169 
2171  _TL("Default"), _TL("default value if no attribute has been selected"),
2172  Value, Minimum, bMinimum, Maximum, bMaximum
2173  );
2174  }
2175 
2176  return( m_Default >= 0 );
2177 }
2178 
2179 //---------------------------------------------------------
2181 {
2182  CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2183 
2184  return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2185 }
2186 
2187 //---------------------------------------------------------
2189 {
2190  CSG_Table *pTable = Get_Table();
2191 
2192  if( pTable != NULL && pTable->Get_Field_Count() > 0 && Value >= 0 )
2193  {
2194  if( Value >= pTable->Get_Field_Count() )
2195  {
2196  Value = !is_Optional() ? pTable->Get_Field_Count() - 1 : -1;
2197  }
2198  }
2199  else
2200  {
2201  Value = -1;
2202  }
2203 
2204  if( Get_Child(m_Default) )
2205  {
2206  Get_Child(m_Default)->Set_Enabled(Value < 0);
2207  }
2208 
2209  if( m_Value != Value )
2210  {
2211  m_Value = Value;
2212 
2214  }
2215 
2216  return( SG_PARAMETER_DATA_SET_TRUE );
2217 }
2218 
2219 //---------------------------------------------------------
2221 {
2222  CSG_Table *pTable = Get_Table();
2223 
2224  if( pTable != NULL )
2225  {
2226  int Index;
2227 
2228  for(Index=0; Index<pTable->Get_Field_Count(); Index++)
2229  {
2230  if( !Value.CmpNoCase(pTable->Get_Field_Name(Index)) )
2231  {
2232  return( _Set_Value(Index) );
2233  }
2234  }
2235 
2236  if( Value.asInt(Index) )
2237  {
2238  return( _Set_Value(Index) );
2239  }
2240  }
2241 
2242  return( _Set_Value(-1) );
2243 }
2244 
2245 //---------------------------------------------------------
2247 {
2248  CSG_Table *pTable = Get_Table();
2249 
2250  if( !pTable || pTable->Get_Field_Count() < 1 )
2251  {
2252  m_String = _TL("<no attributes>");
2253  }
2254  else if( m_Value < 0 || m_Value >= pTable->Get_Field_Count() )
2255  {
2256  m_String = _TL("<not set>");
2257  }
2258  else
2259  {
2260  m_String = pTable->Get_Field_Name(m_Value);
2261  }
2262 }
2263 
2264 //---------------------------------------------------------
2266 {
2267  return( Get_Child(m_Default) ? Get_Child(m_Default)->asDouble() : 0. );
2268 }
2269 
2270 //---------------------------------------------------------
2272 {
2273  m_Value = ((CSG_Parameter_Table_Field *)pSource)->m_Value;
2274  m_Default = ((CSG_Parameter_Table_Field *)pSource)->m_Default;
2275 
2276  _Set_String();
2277 
2278  return( true );
2279 }
2280 
2281 //---------------------------------------------------------
2283 {
2284  if( bSave )
2285  {
2286  Entry.Set_Property("index", asInt());
2287  Entry.Set_Content(asString());
2288 
2289  return( true );
2290  }
2291  else
2292  {
2293  int Index;
2294 
2295  if( Entry.Get_Property("index", Index) ) // we require this check for backward compatibility, "index" was first introduced with SAGA 2.2.3 (r2671)
2296  {
2297  return( _Set_Value(Index) != 0 );
2298  }
2299 
2300  return( _Set_Value(Entry.Get_Content()) != 0 );
2301  }
2302 }
2303 
2304 //---------------------------------------------------------
2306 {
2307  CSG_String Choices;
2308 
2309  for(int i=0; i<Table.Get_Field_Count(); i++)
2310  {
2311  if( i > 0 ) { Choices += "|"; }
2312 
2313  Choices += Table.Get_Field_Name(i);
2314  }
2315 
2316  if( bAllowNone )
2317  {
2318  if( Table.Get_Field_Count() ) { Choices += "|"; }
2319 
2320  Choices += _TL("<not set>");
2321  }
2322 
2323  return( Choices );
2324 }
2325 
2326 
2328 // //
2329 // Table Fields //
2330 // //
2332 
2333 //---------------------------------------------------------
2334 CSG_Parameter_Table_Fields::CSG_Parameter_Table_Fields(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2335  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2336 {
2337  m_nFields = 0;
2338  m_Fields = NULL;
2339 }
2340 
2341 //---------------------------------------------------------
2343 {
2345 }
2346 
2347 //---------------------------------------------------------
2349 {
2350  CSG_Table *pTable = Get_Table();
2351 
2352  if( !pTable || pTable->Get_Field_Count() <= 0 )
2353  {
2355  m_nFields = 0;
2356  m_String = _TL("<no attributes>");
2357 
2359  }
2360 
2361  m_Fields = (int *)SG_Realloc(m_Fields, pTable->Get_Field_Count() * sizeof(int));
2362 
2363  memset(m_Fields, 0, pTable->Get_Field_Count() * sizeof(int));
2364 
2365  //-----------------------------------------------------
2366  int iField;
2367 
2368  CSG_String List(Value); List.Replace(";", ",");
2369 
2370  while( List.Length() > 0 )
2371  {
2372  CSG_String sValue = List.BeforeFirst(',');
2373 
2374  if( sValue.asInt(iField) && iField >= 0 && iField < pTable->Get_Field_Count() )
2375  {
2376  m_Fields[iField] = 1;
2377  }
2378  else if( sValue.Length() > 0 )
2379  {
2380  sValue.Trim();
2381 
2382  if( sValue[0] == '[' )
2383  {
2384  sValue = sValue.AfterFirst('[').BeforeLast(']');
2385  }
2386 
2387  for(iField=0; iField<pTable->Get_Field_Count(); iField++)
2388  {
2389  if( sValue.CmpNoCase(pTable->Get_Field_Name(iField)) == 0 )
2390  {
2391  m_Fields[iField] = 1;
2392 
2393  break;
2394  }
2395  }
2396  }
2397 
2398  List = List.AfterFirst(',');
2399  }
2400 
2401  //-----------------------------------------------------
2402  m_String.Clear();
2403 
2404  for(iField=0, m_nFields=0; iField<pTable->Get_Field_Count(); iField++)
2405  {
2406  if( m_Fields[iField] != 0 )
2407  {
2408  m_Fields[m_nFields++] = iField;
2409 
2410  m_String += CSG_String::Format(m_String.is_Empty() ? "%d" : ",%d", iField);
2411  }
2412  }
2413 
2414  if( m_nFields <= 0 )
2415  {
2416  m_String = _TL("<no attributes>");
2417  }
2418 
2420 }
2421 
2422 //---------------------------------------------------------
2424 {
2425  return( m_nFields );
2426 }
2427 
2428 //---------------------------------------------------------
2430 {
2431  return( m_Fields );
2432 }
2433 
2434 //---------------------------------------------------------
2436 {
2437  CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2438 
2439  return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2440 }
2441 
2442 //---------------------------------------------------------
2444 {
2445  return( _Set_Value(pSource->asString()) != 0 );
2446 }
2447 
2448 //---------------------------------------------------------
2450 {
2451  if( bSave )
2452  {
2453  Entry.Set_Content(m_String);
2454  }
2455  else
2456  {
2457  m_String = Entry.Get_Content();
2458  }
2459 
2460  return( true );
2461 }
2462 
2463 
2465 // //
2466 // DataObject //
2467 // //
2469 
2470 //---------------------------------------------------------
2471 CSG_Parameter_Data_Object::CSG_Parameter_Data_Object(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2472  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2473 {
2474  m_pDataObject = NULL;
2475 }
2476 
2477 //---------------------------------------------------------
2479 {
2480  return( is_Optional() || (m_pDataObject && m_pDataObject->is_Valid()) );
2481 }
2482 
2483 //---------------------------------------------------------
2485 {
2486  if( m_pDataObject != Value )
2487  {
2488  m_pDataObject = (CSG_Data_Object *)Value;
2489 
2491  }
2492 
2493  return( SG_PARAMETER_DATA_SET_TRUE );
2494 }
2495 
2496 //---------------------------------------------------------
2498 {
2500  {
2501  m_String = is_Output() && !is_Optional() ? _TL("<create>") : _TL("<not set>");
2502  }
2503  else if( m_pDataObject == DATAOBJECT_CREATE )
2504  {
2505  m_String = _TL("<create>");
2506  }
2507  else
2508  {
2510  }
2511 }
2512 
2513 //---------------------------------------------------------
2515 {
2516  return( m_pDataObject );
2517 }
2518 
2519 //---------------------------------------------------------
2521 {
2522  m_pDataObject = ((CSG_Parameter_Data_Object *)pSource)->m_pDataObject;
2523 
2524  return( true );
2525 }
2526 
2527 //---------------------------------------------------------
2529 {
2530  if( bSave )
2531  {
2533  {
2534  Entry.Set_Content("CREATE");
2535 
2536  return( true );
2537  }
2538 
2539  if( m_pDataObject == DATAOBJECT_NOTSET )//|| !SG_File_Exists(m_pDataObject->Get_File_Name(false)) )
2540  {
2541  Entry.Set_Content("NOT SET");
2542 
2543  return( true );
2544  }
2545 
2546  if( !m_pDataObject->Get_Owner() )
2547  {
2548  Entry.Set_Content(m_pDataObject->Get_File_Name(false));
2549 
2550  return( true );
2551  }
2552 
2554  {
2555  CSG_Grids *pGrids = m_pDataObject->Get_Owner()->asGrids();
2556 
2557  for(int i=0; i<pGrids->Get_NZ(); i++)
2558  {
2559  if( pGrids->Get_Grid_Ptr(i) == m_pDataObject )
2560  {
2562 
2563  Entry.Add_Property("index", i);
2564 
2565  return( true );
2566  }
2567  }
2568  }
2569  }
2570  else
2571  {
2572  CSG_Data_Object *pDataObject = NULL; int Index = -1;
2573 
2574  if( Entry.Cmp_Content("CREATE") )
2575  {
2577 
2578  return( true );
2579  }
2580 
2581  if( Entry.Cmp_Content("NOT SET") || !Get_Manager() || !(pDataObject = Get_Manager()->Find(Entry.Get_Content(), false)) )
2582  {
2584 
2585  return( true );
2586  }
2587 
2588  if( !Entry.Get_Property("index", Index) )
2589  {
2590  _Set_Value(pDataObject);
2591 
2592  return( true );
2593  }
2594 
2595  if( pDataObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_Grids )
2596  {
2597  _Set_Value(pDataObject->asGrids()->Get_Grid_Ptr(Index));
2598 
2599  return( true );
2600  }
2601  }
2602 
2603  return( false );
2604 }
2605 
2606 
2608 // //
2609 // DataObject_Output //
2610 // //
2612 
2613 //---------------------------------------------------------
2614 CSG_Parameter_Data_Object_Output::CSG_Parameter_Data_Object_Output(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2615  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2616 {
2618 }
2619 
2620 //---------------------------------------------------------
2622 {
2623  CSG_Data_Object *pDataObject = (CSG_Data_Object *)Value;
2624 
2625  if( m_pDataObject != pDataObject )
2626  {
2627  if( pDataObject == DATAOBJECT_NOTSET || pDataObject == DATAOBJECT_CREATE )
2628  {
2629  m_pDataObject = pDataObject;
2630  }
2631  else if( pDataObject->Get_ObjectType() == m_Type )
2632  {
2633  m_pDataObject = pDataObject;
2634 
2635  if( Get_Manager() )
2636  {
2638 
2639  if( Get_Manager() == &SG_Get_Data_Manager() ) // prevent that local data manager send their data objects to gui
2640  {
2642  }
2643  }
2644  }
2645 
2647  }
2648 
2649  return( SG_PARAMETER_DATA_SET_TRUE );
2650 }
2651 
2652 //---------------------------------------------------------
2654 {
2655  if( m_Type == SG_DATAOBJECT_TYPE_Undefined ) // m_Type should not be changed after set once!!!...
2656  {
2657  switch( Type )
2658  {
2663  case SG_DATAOBJECT_TYPE_TIN :
2665  m_Type = Type;
2666 
2667  return( true );
2668 
2669  default:
2670  return( false );
2671  }
2672  }
2673 
2674  return( false );
2675 }
2676 
2677 
2679 // //
2680 // Grid //
2681 // //
2683 
2684 //---------------------------------------------------------
2685 CSG_Parameter_Grid::CSG_Parameter_Grid(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2686  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2687 {
2689 }
2690 
2691 //---------------------------------------------------------
2693 {
2694  m_Type = Type;
2695 }
2696 
2697 //---------------------------------------------------------
2699 {
2700  return( Get_Parent() ? Get_Parent()->asGrid_System() : NULL );
2701 }
2702 
2703 //---------------------------------------------------------
2704 bool CSG_Parameter_Grid::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2705 {
2706  if( m_Default < 0 && is_Input() && is_Optional() )
2707  {
2709 
2711  _TL("Default"), _TL("default value if no grid has been selected"),
2712  Value, Minimum, bMinimum, Maximum, bMaximum
2713  );
2714  }
2715 
2716  return( m_Default >= 0 );
2717 }
2718 
2719 //---------------------------------------------------------
2721 {
2722  if( Value == m_pDataObject ) // nothing to do
2723  {
2724  return( SG_PARAMETER_DATA_SET_TRUE );
2725  }
2726 
2727  //-----------------------------------------------------
2728  if( Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE && Get_System() ) // check grid system compatibility
2729  {
2731  ? ((CSG_Grid *)Value)->Get_System()
2732  : ((CSG_Grids *)Value)->Get_System();
2733 
2734  if( System.is_Valid() == false )
2735  {
2736  if( is_Input() )
2737  {
2738  return( SG_PARAMETER_DATA_SET_FALSE );
2739  }
2740  }
2741  else if( !Get_System()->is_Equal(System) )
2742  {
2743  if( Get_System()->is_Valid() )
2744  {
2745  for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
2746  {
2747  CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
2748 
2749  if( pChild->is_Output() && !Get_Parameters()->has_GUI() )
2750  {
2751  continue;
2752  }
2753 
2754  if( pChild->Get_Type() == PARAMETER_TYPE_Grid
2755  || pChild->Get_Type() == PARAMETER_TYPE_Grids )
2756  {
2757  if( pChild->asDataObject() != DATAOBJECT_NOTSET
2758  && pChild->asDataObject() != DATAOBJECT_CREATE
2759  && pChild->asDataObject() != m_pDataObject
2760  && pChild->asDataObject() != Value )
2761  {
2762  return( SG_PARAMETER_DATA_SET_FALSE );
2763  }
2764  }
2765 
2766  if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
2767  {
2768  if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
2769  || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
2770  {
2771  return( SG_PARAMETER_DATA_SET_FALSE );
2772  }
2773  }
2774  }
2775  }
2776 
2777  Get_Parent()->Set_Value((void *)&System);
2778  }
2779  }
2780 
2781  //-----------------------------------------------------
2782  m_pDataObject = (CSG_Data_Object *)Value;
2783 
2784  if( Get_Child(m_Default) )
2785  {
2787  }
2788 
2790 }
2791 
2792 //---------------------------------------------------------
2794 {
2796 }
2797 
2798 //---------------------------------------------------------
2800 {
2802 }
2803 
2804 //---------------------------------------------------------
2806 {
2807  m_Type = ((CSG_Parameter_Grid *)pSource)->m_Type;
2808  m_Default = ((CSG_Parameter_Grid *)pSource)->m_Default;
2809 
2810  return( _Set_Value(pSource->asPointer()) != 0 );
2811 }
2812 
2813 
2815 // //
2816 // Grids //
2817 // //
2819 
2820 //---------------------------------------------------------
2821 CSG_Parameter_Grids::CSG_Parameter_Grids(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2822  : CSG_Parameter_Grid(pOwner, pParent, ID, Name, Description, Constraint)
2823 {
2824  // nop
2825 }
2826 
2827 
2829 // //
2830 // Table //
2831 // //
2833 
2834 //---------------------------------------------------------
2835 CSG_Parameter_Table::CSG_Parameter_Table(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2836  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2837 {
2838  // nop
2839 }
2840 
2841 //---------------------------------------------------------
2843 {
2844  if( m_pDataObject == Value )
2845  {
2846  return( SG_PARAMETER_DATA_SET_TRUE );
2847  }
2848 
2849  m_pDataObject = (CSG_Data_Object *)Value;
2850 
2851  for(int i=0; i<Get_Children_Count(); i++)
2852  {
2853  CSG_Parameter *pChild = Get_Child(i);
2854 
2855  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2856  {
2857  pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2858  }
2859  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2860  {
2861  pChild->Set_Value(CSG_String(""));
2862  }
2863  }
2864 
2866 }
2867 
2868 
2870 // //
2871 // Shapes //
2872 // //
2874 
2875 //---------------------------------------------------------
2876 CSG_Parameter_Shapes::CSG_Parameter_Shapes(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2877  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2878 {
2880 }
2881 
2882 //---------------------------------------------------------
2884 {
2885  if( (is_Input() || Get_Parameters()->has_GUI()) && Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE
2886  && m_Type != SHAPE_TYPE_Undefined && m_Type != ((CSG_Shapes *)Value)->Get_Type() )
2887  {
2888  return( SG_PARAMETER_DATA_SET_FALSE );
2889  }
2890 
2891  if( m_pDataObject == Value )
2892  {
2893  return( SG_PARAMETER_DATA_SET_TRUE );
2894  }
2895 
2896  m_pDataObject = (CSG_Data_Object *)Value;
2897 
2898  for(int i=0; i<Get_Children_Count(); i++)
2899  {
2900  CSG_Parameter *pChild = Get_Child(i);
2901 
2902  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2903  {
2904  pChild->Set_Value(m_pDataObject && m_pDataObject != DATAOBJECT_CREATE && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2905  }
2906  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2907  {
2908  pChild->Set_Value("");
2909  }
2910  }
2911 
2913 }
2914 
2915 //---------------------------------------------------------
2917 {
2918  m_Type = Type;
2919 }
2920 
2921 //---------------------------------------------------------
2923 {
2924  m_Type = ((CSG_Parameter_Shapes *)pSource)->m_Type;
2925 
2926  return( CSG_Parameter_Data_Object::_Assign(pSource) );
2927 }
2928 
2929 
2931 // //
2932 // TIN //
2933 // //
2935 
2936 //---------------------------------------------------------
2937 CSG_Parameter_TIN::CSG_Parameter_TIN(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2938  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2939 {
2940  // nop
2941 }
2942 
2943 //---------------------------------------------------------
2945 {
2946  if( m_pDataObject == Value )
2947  {
2948  return( SG_PARAMETER_DATA_SET_TRUE );
2949  }
2950 
2951  m_pDataObject = (CSG_Data_Object *)Value;
2952 
2953  for(int i=0; i<Get_Children_Count(); i++)
2954  {
2955  CSG_Parameter *pChild = Get_Child(i);
2956 
2957  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2958  {
2959  pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2960  }
2961  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2962  {
2963  pChild->Set_Value("");
2964  }
2965  }
2966 
2968 }
2969 
2970 
2972 // //
2973 // PointCloud //
2974 // //
2976 
2977 //---------------------------------------------------------
2978 CSG_Parameter_PointCloud::CSG_Parameter_PointCloud(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
2979  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2980 {
2981  // nop
2982 }
2983 
2984 //---------------------------------------------------------
2986 {
2987  if( m_pDataObject == Value )
2988  {
2989  return( SG_PARAMETER_DATA_SET_TRUE );
2990  }
2991 
2992  m_pDataObject = (CSG_Data_Object *)Value;
2993 
2994  for(int i=0; i<Get_Children_Count(); i++)
2995  {
2996  CSG_Parameter *pChild = Get_Child(i);
2997 
2998  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2999  {
3000  pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
3001  }
3002  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
3003  {
3004  pChild->Set_Value("");
3005  }
3006  }
3007 
3009 }
3010 
3011 //---------------------------------------------------------
3013 {
3014  return( CSG_Parameter_Data_Object::_Assign(pSource) );
3015 }
3016 
3017 
3019 // //
3020 // List //
3021 // //
3023 
3024 //---------------------------------------------------------
3025 CSG_Parameter_List::CSG_Parameter_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3026  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
3027 {
3028  // nop
3029 }
3030 
3031 //---------------------------------------------------------
3033 {
3034  if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE && m_Objects.Add(pObject) )
3035  {
3036  _Set_String();
3037 
3038  return( true );
3039  }
3040 
3041  return( false );
3042 }
3043 
3044 bool CSG_Parameter_List::Del_Item(CSG_Data_Object *pObject, bool bUpdateData)
3045 {
3046  if( m_Objects.Del(pObject) > 0 )
3047  {
3048  if( bUpdateData )
3049  {
3050  _Set_String();
3051  }
3052 
3053  return( true );
3054  }
3055 
3056  return( false );
3057 }
3058 
3059 bool CSG_Parameter_List::Del_Item(int Index, bool bUpdateData)
3060 {
3061  if( m_Objects.Del(Index) )
3062  {
3063  if( bUpdateData )
3064  {
3065  _Set_String();
3066  }
3067 
3068  return( true );
3069  }
3070 
3071  return( false );
3072 }
3073 
3075 {
3076  if( m_Objects.Set_Array(0) )
3077  {
3078  _Set_String();
3079 
3080  return( true );
3081  }
3082 
3083  return( false );
3084 }
3085 
3086 //---------------------------------------------------------
3088 {
3089  if( Value == NULL && Get_Item_Count() > 0 && Del_Items() )
3090  {
3092  }
3093 
3094  if( Value != NULL && Add_Item((CSG_Data_Object *)Value) )
3095  {
3097  }
3098 
3099  return( SG_PARAMETER_DATA_SET_TRUE );
3100 }
3101 
3102 //---------------------------------------------------------
3104 {
3105  if( Get_Item_Count() > 0 )
3106  {
3107  m_String.Printf("%d %s (", Get_Item_Count(), Get_Item_Count() == 1 ? _TL("object") : _TL("objects"));
3108 
3109  for(int i=0; i<Get_Item_Count(); i++)
3110  {
3111  if( i > 0 )
3112  {
3113  m_String += ", ";
3114  }
3115 
3116  m_String += Get_Item(i)->Get_Name();
3117  }
3118 
3119  m_String += ")";
3120  }
3121  else
3122  {
3123  m_String = _TL("No objects");
3124  }
3125 }
3126 
3127 //---------------------------------------------------------
3129 {
3130  return( Get_Item_Count() );
3131 }
3132 
3133 //---------------------------------------------------------
3135 {
3136  return( m_Objects.Get_Array() );
3137 }
3138 
3139 //---------------------------------------------------------
3141 {
3142  Del_Items();
3143 
3144  for(int i=0; i<((CSG_Parameter_List *)pSource)->Get_Item_Count(); i++)
3145  {
3147  {
3148  Add_Item(((CSG_Parameter_List *)pSource)->Get_Item(i));
3149  }
3150  }
3151 
3152  return( true );
3153 }
3154 
3155 //---------------------------------------------------------
3157 {
3158  if( bSave )
3159  {
3160  for(int i=0; i<Get_Item_Count(); i++)
3161  {
3162  CSG_String File = Get_Item(i)->Get_File_Name(false);
3163 
3164  if( File.BeforeFirst(':').Cmp("PGSQL") || SG_File_Exists(File) )
3165  {
3166  Entry.Add_Child("DATA", File);
3167  }
3168  }
3169  }
3170  else
3171  {
3172  Del_Items();
3173 
3174  for(int i=0; i<Entry.Get_Children_Count(); i++)
3175  {
3176  CSG_Data_Object *pObject = Get_Manager() ? Get_Manager()->Find(Entry.Get_Content(i), false) : NULL;
3177 
3178  if( pObject )
3179  {
3180  Add_Item(pObject);
3181  }
3182  }
3183  }
3184 
3185  return( true );
3186 }
3187 
3188 
3190 // //
3191 // Grid_List //
3192 // //
3194 
3195 //---------------------------------------------------------
3196 CSG_Parameter_Grid_List::CSG_Parameter_Grid_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3197  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3198 {
3199  // nop
3200 }
3201 
3202 //---------------------------------------------------------
3204 {
3206  {
3207  return( Get_Parent()->asGrid_System() );
3208  }
3209 
3210  return( NULL );
3211 }
3212 
3213 //---------------------------------------------------------
3215 {
3216  if( pObject == DATAOBJECT_NOTSET || pObject == DATAOBJECT_CREATE
3217  || (pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grid
3218  && pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids) )
3219  {
3220  return( false );
3221  }
3222 
3223  //-----------------------------------------------------
3224  if( Get_System() ) // check grid system compatibility
3225  {
3227  ? ((CSG_Grid *)pObject)->Get_System()
3228  : ((CSG_Grids *)pObject)->Get_System();
3229 
3230  if( System.is_Valid() == false && is_Input() )
3231  {
3232  return( false );
3233  }
3234 
3235  if( !Get_System()->is_Valid() )
3236  {
3237  Get_Parent()->Set_Value((void *)&System);
3238  }
3239  else if( !Get_System()->is_Equal(System) )
3240  {
3241  for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3242  {
3243  CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3244 
3245  if( pChild->Get_Type() == PARAMETER_TYPE_Grid
3246  || pChild->Get_Type() == PARAMETER_TYPE_Grids )
3247  {
3248  if( pChild->asDataObject() != DATAOBJECT_NOTSET
3249  && pChild->asDataObject() != DATAOBJECT_CREATE )
3250  {
3251  return( false );
3252  }
3253  }
3254 
3255  if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3256  {
3257  if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
3258  || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3259  {
3260  return( false );
3261  }
3262  }
3263  }
3264 
3265  Get_Parent()->Set_Value((void *)&System);
3266  }
3267  }
3268 
3269  return( CSG_Parameter_List::Add_Item(pObject) && Update_Data() );
3270 }
3271 
3272 //---------------------------------------------------------
3274 {
3275  return( CSG_Parameter_List::Del_Item(pItem, bUpdateData) );
3276 }
3277 
3278 //---------------------------------------------------------
3279 bool CSG_Parameter_Grid_List::Del_Item(int Index, bool bUpdateData)
3280 {
3281  return( CSG_Parameter_List::Del_Item(Index, bUpdateData) );
3282 }
3283 
3284 //---------------------------------------------------------
3286 {
3287  return( CSG_Parameter_List::Del_Items() && Update_Data() );
3288 }
3289 
3290 //---------------------------------------------------------
3292 {
3293  m_Grids.Set_Array(0);
3294 
3295  for(int i=0; i<Get_Item_Count(); i++)
3296  {
3297  switch( Get_Item(i)->Get_ObjectType() )
3298  {
3299  case SG_DATAOBJECT_TYPE_Grid: {
3300  m_Grids.Add(Get_Item(i));
3301  break; }
3302 
3303  case SG_DATAOBJECT_TYPE_Grids: {
3304  CSG_Grids *pGrids = (CSG_Grids *)Get_Item(i);
3305 
3306  for(int j=0; j<pGrids->Get_Grid_Count(); j++)
3307  {
3308  m_Grids.Add(pGrids->Get_Grid_Ptr(j));
3309  }
3310  break; }
3311 
3312  default: {
3313  break; }
3314  }
3315  }
3316 
3317  if( !m_Grids.Get_Size() && !Get_Parameters()->has_GUI() )
3318  {
3320  {
3322  }
3323  }
3324 
3325  return( true );
3326 }
3327 
3328 
3330 // //
3331 // Grids_List //
3332 // //
3334 
3335 //---------------------------------------------------------
3336 CSG_Parameter_Grids_List::CSG_Parameter_Grids_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3337  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3338 {
3339  // nop
3340 }
3341 
3342 //---------------------------------------------------------
3344 {
3346  {
3347  return( Get_Parent()->asGrid_System() );
3348  }
3349 
3350  return( NULL );
3351 }
3352 
3353 //---------------------------------------------------------
3355 {
3356  if( pObject == NULL || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids )
3357  {
3358  return( false );
3359  }
3360 
3361  //-----------------------------------------------------
3362  CSG_Grid_System *pSystem = Get_System();
3363 
3364  if( pSystem ) // check grid system compatibility
3365  {
3367  ? ((CSG_Grid *)pObject)->Get_System()
3368  : ((CSG_Grids *)pObject)->Get_System();
3369 
3370  if( !pSystem->is_Valid() )
3371  {
3372  Get_Parent()->Set_Value((void *)&System);
3373  }
3374  else if( !pSystem->is_Equal(System) )
3375  {
3376  for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3377  {
3378  CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3379 
3380  if( pChild->Get_Type() == PARAMETER_TYPE_Grids )
3381  {
3382  if( pChild->asDataObject() != DATAOBJECT_NOTSET
3383  && pChild->asDataObject() != DATAOBJECT_CREATE )
3384  {
3385  return( false );
3386  }
3387  }
3388 
3389  if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3390  {
3391  if( (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3392  {
3393  return( false );
3394  }
3395  }
3396  }
3397 
3398  Get_Parent()->Set_Value((void *)&System);
3399  }
3400  }
3401 
3402  return( CSG_Parameter_List::Add_Item(pObject) );
3403 }
3404 
3405 
3407 // //
3408 // Table_List //
3409 // //
3411 
3412 
3413 //---------------------------------------------------------
3414 CSG_Parameter_Table_List::CSG_Parameter_Table_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3415  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3416 {
3417  // nop
3418 }
3419 
3420 
3422 // //
3423 // Shapes_List //
3424 // //
3426 
3427 
3428 //---------------------------------------------------------
3429 CSG_Parameter_Shapes_List::CSG_Parameter_Shapes_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3430  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3431 {
3433 }
3434 
3435 //---------------------------------------------------------
3437 {
3438  m_Type = Type;
3439 }
3440 
3441 //---------------------------------------------------------
3443 {
3444  m_Type = ((CSG_Parameter_Shapes_List *)pSource)->m_Type;
3445 
3446  return( CSG_Parameter_List::_Assign(pSource) );
3447 }
3448 
3449 
3451 // //
3452 // TIN_List //
3453 // //
3455 
3456 
3457 //---------------------------------------------------------
3458 CSG_Parameter_TIN_List::CSG_Parameter_TIN_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3459  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3460 {
3461  // nop
3462 }
3463 
3464 
3466 // //
3467 // PointCloud_List //
3468 // //
3470 
3471 
3472 //---------------------------------------------------------
3473 CSG_Parameter_PointCloud_List::CSG_Parameter_PointCloud_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3474  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3475 {
3476  // nop
3477 }
3478 
3479 
3481 // //
3482 // Parameters //
3483 // //
3485 
3486 //---------------------------------------------------------
3487 CSG_Parameter_Parameters::CSG_Parameter_Parameters(CSG_Parameters *pParameters, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
3488  : CSG_Parameter(pParameters, pParent, ID, Name, Description, Constraint)
3489 {
3490  m_pParameters = new CSG_Parameters(pParameters->Get_Owner(), Name, Description, ID);
3491 }
3492 
3494 {
3495  delete(m_pParameters);
3496 }
3497 
3498 //---------------------------------------------------------
3500 {
3501  return( m_pParameters->Restore_Defaults() );
3502 }
3503 
3504 //---------------------------------------------------------
3506 {
3507  m_String.Printf("%d %s", m_pParameters->Get_Count(), _TL("parameters"));
3508 }
3509 
3510 //---------------------------------------------------------
3512 {
3513  return( m_pParameters );
3514 }
3515 
3516 //---------------------------------------------------------
3518 {
3519  m_pParameters->Assign(pSource->asParameters());
3520 
3521  return( true );
3522 }
3523 
3524 //---------------------------------------------------------
3526 {
3527  if( m_pParameters->Serialize(Entry, bSave) )
3528  {
3529  if( bSave )
3530  {
3531  Entry.Set_Property("id" , Get_Identifier ());
3532  Entry.Set_Property("type", Get_Type_Identifier());
3533  }
3534 
3535  return( true );
3536  }
3537 
3538  return( false );
3539 }
3540 
3541 
3543 // //
3544 // //
3545 // //
3547 
3548 //---------------------------------------------------------
CSG_Parameter::asColors
CSG_Colors * asColors(void) const
Definition: parameter.cpp:1035
CSG_Parameter_Grid_System::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:2110
CSG_Parameter::asGridsList
class CSG_Parameter_Grids_List * asGridsList(void) const
Definition: parameter.cpp:1117
CSG_Parameter_Grids_List::Get_System
CSG_Grid_System * Get_System(void) const
Definition: parameter_data.cpp:3343
CSG_String::BeforeFirst
CSG_String BeforeFirst(char Character) const
Definition: api_string.cpp:666
CSG_Parameter_Data_Object
Definition: parameters.h:1137
CSG_DateTime::Parse_Date
bool Parse_Date(const CSG_String &date)
Definition: datetime.cpp:476
CSG_Parameters::Assign
bool Assign(CSG_Parameters *pSource)
Definition: parameters.cpp:1510
CSG_Parameter_Date
Definition: parameters.h:572
SG_DATATYPE_Color
@ SG_DATATYPE_Color
Definition: api_core.h:1007
SG_DATATYPE_Int
@ SG_DATATYPE_Int
Definition: api_core.h:1000
CSG_Parameter::Set_Value
virtual bool Set_Value(int Value)
Definition: parameter.cpp:799
CSG_Parameter_Range::Set_Min
bool Set_Min(double Min)
Definition: parameter_data.cpp:802
CSG_Parameter_List::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:3134
CSG_Parameter_Grid::m_Type
TSG_Data_Type m_Type
Definition: parameters.h:1218
CSG_Parameter::asPointer
void * asPointer(void) const
Definition: parameters.h:286
PARAMETER_TYPE_Double
@ PARAMETER_TYPE_Double
Definition: parameters.h:127
CSG_Parameter_File_Name::Get_Filter
const SG_Char * Get_Filter(void) const
Definition: parameter_data.cpp:1553
CSG_Parameter_Fixed_Table::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:1899
CSG_Parameter_Bool::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:298
PARAMETER_TYPE_FilePath
@ PARAMETER_TYPE_FilePath
Definition: parameters.h:136
SG_DATATYPE_Undefined
@ SG_DATATYPE_Undefined
Definition: api_core.h:1009
PARAMETER_TYPE_Degree
@ PARAMETER_TYPE_Degree
Definition: parameters.h:128
CSG_Parameter_String::is_Valid
virtual bool is_Valid(void) const
Definition: parameter_data.cpp:1454
SG_GET_RGB
#define SG_GET_RGB(r, g, b)
Definition: api_core.h:1262
CSG_Parameter_Degree::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:621
SG_FREE_SAFE
#define SG_FREE_SAFE(PTR)
Definition: api_core.h:205
CSG_Parameter_Grid_System::m_System
CSG_Grid_System m_System
Definition: parameters.h:1034
CSG_Parameter_Choice::Set_Items
bool Set_Items(const SG_Char *String)
Definition: parameter_data.cpp:934
CSG_Parameter_File_Name::Get_FilePaths
bool Get_FilePaths(CSG_Strings &FilePaths) const
Definition: parameter_data.cpp:1575
CSG_Parameter_Grid
Definition: parameters.h:1199
CSG_Parameter_Value::Set_Minimum
void Set_Minimum(double Minimum, bool bOn=true)
Definition: parameter_data.cpp:371
CSG_String::Printf
int Printf(const char *Format,...)
Definition: api_string.cpp:308
CSG_String_Tokenizer::Has_More_Tokens
bool Has_More_Tokens(void) const
Definition: api_string.cpp:1511
CSG_Grid_System::Get_Cellsize
double Get_Cellsize(void) const
Definition: grid.h:231
SG_DATATYPE_String
@ SG_DATATYPE_String
Definition: api_core.h:1005
_TL
#define _TL(s)
Definition: api_core.h:1489
SG_DATATYPE_DWord
@ SG_DATATYPE_DWord
Definition: api_core.h:999
CSG_Parameter_Grid_System::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:2104
SG_DATATYPE_Binary
@ SG_DATATYPE_Binary
Definition: api_core.h:1008
CSG_Parameter_List::Add_Item
virtual bool Add_Item(CSG_Data_Object *pItem)
Definition: parameter_data.cpp:3032
SG_GET_B
#define SG_GET_B(rgb)
Definition: api_core.h:1267
CSG_Parameter_Table_Fields::Get_Table
CSG_Table * Get_Table(void) const
Definition: parameter_data.cpp:2435
CSG_Parameter_Choice::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1095
CSG_Parameter_Data_Object_Output::Set_DataObject_Type
bool Set_DataObject_Type(TSG_Data_Object_Type Type)
Definition: parameter_data.cpp:2653
PARAMETER_TYPE_Table_Fields
@ PARAMETER_TYPE_Table_Fields
Definition: parameters.h:145
CSG_String::Length
size_t Length(void) const
Definition: api_string.cpp:172
CSG_Parameter::m_String
CSG_String m_String
Definition: parameters.h:331
CSG_Parameter_Parameters::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:3525
CSG_Parameter_Range::m_pMax
CSG_Parameter_Double * m_pMax
Definition: parameters.h:639
CSG_Parameter_Data_Object::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2484
SG_DATATYPES_Undefined
#define SG_DATATYPES_Undefined
Definition: api_core.h:1014
CSG_Parameter_Int::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:483
CSG_Parameter_PointCloud::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:3012
CSG_Parameter_Grid_System::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2003
SG_Color_From_Text
bool SG_Color_From_Text(const CSG_String &Text, long &Color)
Definition: api_colors.cpp:85
CSG_DateTime::Now
static CSG_DateTime Now(void)
Definition: datetime.cpp:581
CSG_Parameter_Colors::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:1814
CSG_Parameter_Table_Fields::m_nFields
int m_nFields
Definition: parameters.h:1115
CSG_Parameter_Range::Get_Max
double Get_Max(void) const
Definition: parameter_data.cpp:832
CSG_Parameter_Data_Object_Output::m_Type
TSG_Data_Object_Type m_Type
Definition: parameters.h:1183
CSG_Parameter_Grids_List::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1446
CSG_MetaData::Get_Children_Count
int Get_Children_Count(void) const
Definition: metadata.h:147
CSG_Parameter::Get_Identifier
const SG_Char * Get_Identifier(void) const
Definition: parameter.cpp:547
CSG_Parameter::asInt
int asInt(void) const
Definition: parameters.h:282
CSG_Parameter_Int::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:443
PARAMETER_TYPE_Node
@ PARAMETER_TYPE_Node
Definition: parameters.h:123
CSG_Parameter::asString
const SG_Char * asString(void) const
Definition: parameters.h:285
SG_Degree_To_Double
SAGA_API_DLL_EXPORT double SG_Degree_To_Double(const CSG_String &String)
Definition: api_string.cpp:1226
CSG_Parameter::asTable
CSG_Table * asTable(void) const
Definition: parameter.cpp:1063
CSG_MetaData::Get_Content
const CSG_String & Get_Content(void) const
Definition: metadata.h:132
CSG_Parameter_Fixed_Table::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:1882
CSG_Parameters::Get_Owner
void * Get_Owner(void) const
Definition: parameters.h:1710
CSG_Table_Record
Definition: table.h:130
CSG_Parameter_String::CSG_Parameter_String
CSG_Parameter_String(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1447
CSG_MetaData::Set_Content
void Set_Content(const CSG_String &Content)
Definition: metadata.h:139
CSG_Parameter_Choice::Add_Item
bool Add_Item(const CSG_String &Item, const CSG_String &Data="")
Definition: parameter_data.cpp:918
CSG_Parameter_Choices::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:1292
CSG_Parameter_Shapes_List::CSG_Parameter_Shapes_List
CSG_Parameter_Shapes_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3429
CSG_Parameter_String::is_Password
bool is_Password(void) const
Definition: parameter_data.cpp:1466
data_manager.h
CSG_Parameter_List::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:3087
CSG_Parameter_Value::Set_Maximum
void Set_Maximum(double Maximum, bool bOn=true)
Definition: parameter_data.cpp:391
CSG_Rect::Get_XMax
double Get_XMax(void) const
Definition: geo_tools.h:503
CSG_Parameter_Grid_System::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2116
CSG_Array_Pointer::Get_Size
sLong Get_Size(void) const
Definition: api_core.h:381
CSG_Colors::Get_Blue
long Get_Blue(int Index) const
Definition: api_core.h:1369
CSG_DateTime::Parse_ISODate
bool Parse_ISODate(const CSG_String &date)
Definition: datetime.cpp:507
CSG_Parameter_Bool::CSG_Parameter_Bool
CSG_Parameter_Bool(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:231
TSG_Shape_Type
TSG_Shape_Type
Definition: shapes.h:100
CSG_Parameter_Choice::CSG_Parameter_Choice
CSG_Parameter_Choice(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:891
CSG_Parameter_Choices::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:1272
CSG_Parameter_Table_Field::m_Default
int m_Default
Definition: parameters.h:1073
PARAMETER_TYPE_Grids_List
@ PARAMETER_TYPE_Grids_List
Definition: parameters.h:155
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
CSG_Table::Get_Record
virtual CSG_Table_Record * Get_Record(sLong Index) const
Definition: table.h:394
PARAMETER_TYPE_Int
@ PARAMETER_TYPE_Int
Definition: parameters.h:126
CSG_Parameter_Parameters::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:3511
CSG_Parameter_Shapes_List::m_Type
TSG_Shape_Type m_Type
Definition: parameters.h:1508
CSG_Parameter_Grid::_asDouble
virtual double _asDouble(void) const
Definition: parameter_data.cpp:2799
CSG_Parameter_Node::CSG_Parameter_Node
CSG_Parameter_Node(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:217
CSG_Parameter_TIN_List::CSG_Parameter_TIN_List
CSG_Parameter_TIN_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3458
CSG_Parameter_Parameters::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter_data.cpp:3499
CSG_Parameter_List::Get_Item
CSG_Data_Object * Get_Item(int Index) const
Definition: parameters.h:1373
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:459
CSG_Parameter_PointCloud::CSG_Parameter_PointCloud
CSG_Parameter_PointCloud(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2978
CSG_Grids::Get_Grid_Count
int Get_Grid_Count(void) const
Definition: grids.h:249
CSG_Parameter_Choice::Del_Items
bool Del_Items(void)
Definition: parameter_data.cpp:910
CSG_MetaData::Set_Property
bool Set_Property(const CSG_String &Name, const CSG_String &Value, bool bAddIfNotExists=true)
Definition: metadata.cpp:615
CSG_Parameter_Choice::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:1040
CSG_Parameter_Range::m_pMin
CSG_Parameter_Double * m_pMin
Definition: parameters.h:639
CSG_Parameter_Font::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:1675
CSG_Parameter::is_Input
bool is_Input(void) const
Definition: parameters.h:232
CSG_Parameter_Int::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:489
CSG_Parameter_Value::CSG_Parameter_Value
CSG_Parameter_Value(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:328
CSG_Parameter_Font::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:1681
CSG_Parameter_Value::Set_Valid_Range
bool Set_Valid_Range(double Minimum, double Maximum)
Definition: parameter_data.cpp:339
CSG_Parameter_Color::CSG_Parameter_Color
CSG_Parameter_Color(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1734
SG_DATATYPE_Byte
@ SG_DATATYPE_Byte
Definition: api_core.h:995
CSG_Parameter_Fixed_Table::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1905
PARAMETER_TYPE_TIN
@ PARAMETER_TYPE_TIN
Definition: parameters.h:152
CSG_Parameter_Colors::m_Colors
CSG_Colors m_Colors
Definition: parameters.h:967
CSG_Parameter_File_Name::CSG_Parameter_File_Name
CSG_Parameter_File_Name(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1530
CSG_Parameter_Choice::Toggle_Value
virtual bool Toggle_Value(void)
Definition: parameter_data.cpp:904
CSG_Parameter_Shapes::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2883
CSG_Parameter_String::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:1472
CSG_Parameter_Table_Field::CSG_Parameter_Table_Field
CSG_Parameter_Table_Field(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2156
CSG_Parameter_Data_Object::m_pDataObject
CSG_Data_Object * m_pDataObject
Definition: parameters.h:1147
CSG_Data_Object::Get_Name
const SG_Char * Get_Name(void) const
Definition: dataobject.cpp:349
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:475
SG_DATATYPES_Integer
#define SG_DATATYPES_Integer
Definition: api_core.h:1033
SG_Get_Data_Manager
CSG_Data_Manager & SG_Get_Data_Manager(void)
Definition: data_manager.cpp:65
CSG_Parameter_Colors::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:1808
CSG_Grid_System::Create
bool Create(const CSG_Grid_System &System, int Precision=-1)
Definition: grid_system.cpp:140
CSG_Parameter_Choices::Get_Item_Count
int Get_Item_Count(void) const
Definition: parameters.h:759
SG_DATAOBJECT_TYPE_Grids
@ SG_DATAOBJECT_TYPE_Grids
Definition: dataobject.h:119
CSG_Parameter_Parameters::CSG_Parameter_Parameters
CSG_Parameter_Parameters(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3487
CSG_Parameter_Double::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:572
CSG_Parameter_Table_Field::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:2188
PARAMETER_TYPE_FixedTable
@ PARAMETER_TYPE_FixedTable
Definition: parameters.h:141
CSG_Parameter_Bool::is_Default
virtual bool is_Default(void) const
Definition: parameter_data.cpp:238
CSG_Parameter_Table_Field
Definition: parameters.h:1057
CSG_Parameter_Table::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2842
CSG_Table::Get_Field_Count
int Get_Field_Count(void) const
Definition: table.h:356
CSG_Data_Manager::Exists
bool Exists(CSG_Data_Object *pObject) const
Definition: data_manager.cpp:278
CSG_Parameter_File_Name::m_Filter
CSG_String m_Filter
Definition: parameters.h:880
CSG_Data_Object::Get_ObjectType
virtual TSG_Data_Object_Type Get_ObjectType(void) const =0
Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking.
CSG_Parameter::asDataObject
CSG_Data_Object * asDataObject(void) const
Definition: parameter.cpp:1041
CSG_Parameter_Colors::CSG_Parameter_Colors
CSG_Parameter_Colors(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1787
CSG_Parameter::Assign
bool Assign(CSG_Parameter *pSource)
Definition: parameter.cpp:1141
CSG_Parameter_Value
Definition: parameters.h:435
CSG_Parameter_Grid_List::CSG_Parameter_Grid_List
CSG_Parameter_Grid_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3196
CSG_Parameter_Table_Field::Add_Default
bool Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
Definition: parameter_data.cpp:2164
CSG_MetaData::Get_Child
CSG_MetaData * Get_Child(int Index) const
Definition: metadata.h:148
CSG_Parameter_Parameters::CSG_Parameters
friend class CSG_Parameters
Definition: parameters.h:1594
CSG_Parameter_String::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1485
CSG_Colors::Set_Blue
bool Set_Blue(int Index, int Value)
Definition: api_colors.cpp:342
CSG_DateTime::is_EqualTo
bool is_EqualTo(const CSG_DateTime &DateTime) const
Definition: datetime.cpp:428
PARAMETER_TYPE_PointCloud
@ PARAMETER_TYPE_PointCloud
Definition: parameters.h:147
CSG_Colors::Get_Red
long Get_Red(int Index) const
Definition: api_core.h:1367
CSG_Parameter_List::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:3140
CSG_Parameter_Choice::Get_Data
CSG_String Get_Data(void) const
Definition: parameter_data.cpp:1013
CSG_Parameter_Table_Field::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:2246
CSG_Parameter_Data_Type::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1246
CSG_Parameter_Data_Object::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2528
CSG_Parameter::asValue
class CSG_Parameter_Value * asValue(void) const
Definition: parameter.cpp:1091
CSG_Parameter_Font
Definition: parameters.h:896
CSG_String::Replace
size_t Replace(const CSG_String &sOld, const CSG_String &sNew, bool bReplaceAll=true)
Definition: api_string.cpp:563
CSG_Parameter_Color::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:1741
CSG_Parameter_Grid_List::Del_Items
virtual bool Del_Items(void)
Definition: parameter_data.cpp:3285
CSG_Parameter::Get_Parameters
CSG_Parameters * Get_Parameters(void) const
Definition: parameter.cpp:100
CSG_Parameter_Bool::Toggle_Value
virtual bool Toggle_Value(void)
Definition: parameter_data.cpp:244
CSG_Parameter_Choice::m_Items
CSG_Strings m_Items
Definition: parameters.h:692
CSG_Parameter::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter.cpp:793
CSG_String::Cmp
int Cmp(const CSG_String &String) const
Definition: api_string.cpp:515
CSG_Parameter_Choices::Add_Item
void Add_Item(const CSG_String &Item, const CSG_String &Data="")
Definition: parameter_data.cpp:1354
CSG_Parameter_Grid_List::m_Grids
CSG_Array_Pointer m_Grids
Definition: parameters.h:1431
SG_Parameter_Type_Get_Name
CSG_String SG_Parameter_Type_Get_Name(TSG_Parameter_Type Type)
Definition: parameter_data.cpp:64
CSG_Parameter_Double::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:578
PARAMETER_TYPE_Shapes_List
@ PARAMETER_TYPE_Shapes_List
Definition: parameters.h:157
CSG_Data_Object::Get_Owner
CSG_Data_Object * Get_Owner(void) const
Definition: dataobject.h:231
CSG_Parameter::asGridList
class CSG_Parameter_Grid_List * asGridList(void) const
Definition: parameter.cpp:1116
PARAMETER_TYPE_Grids
@ PARAMETER_TYPE_Grids
Definition: parameters.h:149
CSG_Parameter_Font::m_Color
int m_Color
Definition: parameters.h:908
SG_GET_R
#define SG_GET_R(rgb)
Definition: api_core.h:1265
CSG_Parameter_Range::m_pRange
CSG_Parameters * m_pRange
Definition: parameters.h:637
CSG_Parameters::has_GUI
bool has_GUI(void) const
Definition: parameters.cpp:311
SG_Data_Type_Get_Identifier
CSG_String SG_Data_Type_Get_Identifier(TSG_Data_Type Type)
Definition: api_core.cpp:147
CSG_Parameter::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const =0
CSG_String::BeforeLast
CSG_String BeforeLast(char Character) const
Definition: api_string.cpp:677
CSG_Parameter_Date::m_Date
CSG_DateTime m_Date
Definition: parameters.h:585
CSG_DateTime::Format_ISODate
CSG_String Format_ISODate(void) const
Definition: datetime.cpp:460
SG_DATATYPES_Table
#define SG_DATATYPES_Table
Definition: api_core.h:1036
CSG_Parameter_Data_Object::is_Valid
virtual bool is_Valid(void) const
Definition: parameter_data.cpp:2478
CSG_Parameter_Data_Type::Set_Data_Type
bool Set_Data_Type(TSG_Data_Type Value)
Definition: parameter_data.cpp:1216
CSG_Parameter_Data_Object_Output::CSG_Parameter_Data_Object_Output
CSG_Parameter_Data_Object_Output(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2614
CSG_Colors::Get_Predefined_Count
static int Get_Predefined_Count(void)
Definition: api_colors.cpp:435
CSG_Parameter::is_DataObject_List
bool is_DataObject_List(void) const
Definition: parameter.cpp:295
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
CSG_Parameter_Degree::CSG_Parameter_Degree
CSG_Parameter_Degree(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:608
PARAMETER_TYPE_Data_Type
@ PARAMETER_TYPE_Data_Type
Definition: parameters.h:131
CSG_Parameter_Shapes
Definition: parameters.h:1283
CSG_Parameter_List::Del_Items
virtual bool Del_Items(void)
Definition: parameter_data.cpp:3074
CSG_Parameter_Colors::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:1820
CSG_Parameter_Font::CSG_Parameter_Font
CSG_Parameter_Font(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1627
SG_File_Exists
SAGA_API_DLL_EXPORT bool SG_File_Exists(const CSG_String &FileName)
Definition: api_file.cpp:850
CSG_Grid_System::Get_Name
const SG_Char * Get_Name(bool bShort=true)
Definition: grid_system.cpp:264
CSG_Strings::Clear
void Clear(void)
Definition: api_core.h:734
PARAMETER_TYPE_Colors
@ PARAMETER_TYPE_Colors
Definition: parameters.h:140
SG_DATATYPE_Long
@ SG_DATATYPE_Long
Definition: api_core.h:1002
CSG_Colors::Get_Count
int Get_Count(void) const
Definition: api_core.h:1354
CSG_Parameter_File_Name::Set_Flag_Save
void Set_Flag_Save(bool bFlag)
Definition: parameter_data.cpp:1559
CSG_Parameter_Text::CSG_Parameter_Text
CSG_Parameter_Text(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1516
CSG_Parameter_Table_Field::Get_Choices
static CSG_String Get_Choices(const class CSG_Table &Table, bool bAllowNone=false)
Definition: parameter_data.cpp:2305
CSG_Parameter_Table_Fields::m_Fields
int * m_Fields
Definition: parameters.h:1115
CSG_Table_Record::asString
const SG_Char * asString(int Field, int Decimals=-99) const
Definition: table_record.cpp:461
CSG_Parameter_Data_Type::CSG_Parameter_Data_Type
CSG_Parameter_Data_Type(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1133
CSG_Colors::Create
bool Create(void)
Definition: api_colors.cpp:210
CSG_Data_Object
Definition: dataobject.h:180
CSG_Parameter_Int::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:497
CSG_Parameter
Definition: parameters.h:207
CSG_Parameter_Table_Fields::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:2348
CSG_Parameter_TIN::CSG_Parameter_TIN
CSG_Parameter_TIN(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2937
CSG_Table::Get_Field_Name
const SG_Char * Get_Field_Name(int iField) const
Definition: table.h:357
CSG_Array_Pointer::Del
bool Del(sLong Index)
Definition: api_memory.cpp:512
CSG_Parameter_Range::CSG_Parameter_Range
CSG_Parameter_Range(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:746
CSG_Rect::Get_YMin
double Get_YMin(void) const
Definition: geo_tools.h:504
CSG_Parameter_Grid_System
Definition: parameters.h:1024
PARAMETER_TYPE_Undefined
@ PARAMETER_TYPE_Undefined
Definition: parameters.h:165
CSG_String::Trim
int Trim(bool fromRight=false)
Definition: api_string.cpp:590
CSG_Parameter_Int::CSG_Parameter_Int
CSG_Parameter_Int(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:430
CSG_Data_Object::asGrids
class CSG_Grids * asGrids(bool bPolymorph=false) const
Definition: dataobject.cpp:561
PARAMETER_TYPE_Table
@ PARAMETER_TYPE_Table
Definition: parameters.h:150
CSG_Strings::Add
bool Add(const CSG_Strings &Strings)
Definition: api_string.cpp:1022
PARAMETER_TYPE_Bool
@ PARAMETER_TYPE_Bool
Definition: parameters.h:125
CSG_Parameter_Font::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1696
CSG_Array_Int::Dec_Array
bool Dec_Array(bool bShrink=true)
Definition: api_core.h:444
CSG_Parameters::Get_Count
int Get_Count(void) const
Definition: parameters.h:1725
SG_PARAMETER_DATA_SET_CHANGED
#define SG_PARAMETER_DATA_SET_CHANGED
Definition: parameters.h:196
CSG_Parameters::Restore_Defaults
bool Restore_Defaults(bool bClearData=false)
Definition: parameters.cpp:1478
SG_GET_G
#define SG_GET_G(rgb)
Definition: api_core.h:1266
CSG_Parameter_Date::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:692
DATAOBJECT_CREATE
#define DATAOBJECT_CREATE
Definition: dataobject.h:130
CSG_Grid_System::is_Equal
bool is_Equal(const CSG_Grid_System &System) const
Definition: grid_system.cpp:324
PARAMETER_TYPE_Table_Field
@ PARAMETER_TYPE_Table_Field
Definition: parameters.h:144
CSG_Colors::Set_Red
bool Set_Red(int Index, int Value)
Definition: api_colors.cpp:330
CSG_Parameter::Set_Default
bool Set_Default(int Value)
Definition: parameter.cpp:905
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_Parameter_Grid_System::CSG_Parameter_Grid_System
CSG_Parameter_Grid_System(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1996
CSG_Parameter_Fixed_Table::m_Table
CSG_Table m_Table
Definition: parameters.h:1001
CSG_Parameter_Grids_List::Add_Item
virtual bool Add_Item(CSG_Data_Object *pItem)
Definition: parameter_data.cpp:3354
CSG_Parameter_List::Del_Item
virtual bool Del_Item(CSG_Data_Object *pItem, bool bUpdateData=true)
Definition: parameter_data.cpp:3044
PARAMETER_TYPE_Choice
@ PARAMETER_TYPE_Choice
Definition: parameters.h:132
CSG_Parameter_File_Name
Definition: parameters.h:854
CSG_Parameter_Data_Object::CSG_Parameter_Data_Object
CSG_Parameter_Data_Object(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2471
CSG_Parameter_Parameters::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:3517
SG_Parameter_Type_Get_Identifier
CSG_String SG_Parameter_Type_Get_Identifier(TSG_Parameter_Type Type)
Definition: parameter_data.cpp:114
CSG_Parameter::asParameters
class CSG_Parameters * asParameters(void) const
Definition: parameter.cpp:1038
CSG_Parameter_Shapes_List::Set_Shape_Type
void Set_Shape_Type(TSG_Shape_Type Type)
Definition: parameter_data.cpp:3436
SG_DATATYPES_Bit
#define SG_DATATYPES_Bit
Definition: api_core.h:1015
CSG_Parameter_Range::~CSG_Parameter_Range
virtual ~CSG_Parameter_Range(void)
Definition: parameter_data.cpp:763
CSG_Parameter_Font::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:1647
CSG_Parameter_Shapes::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2922
CSG_Parameter_Grid::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2720
sLong
signed long long sLong
Definition: api_core.h:158
CSG_Parameter_Choice::Get_Count
int Get_Count(void) const
Definition: parameters.h:683
SG_UI_DataObject_Add
bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
Definition: api_callback.cpp:610
CSG_Parameter_File_Name::Set_Filter
void Set_Filter(const SG_Char *Filter)
Definition: parameter_data.cpp:1541
CSG_Parameter_Double::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:586
CSG_MetaData::Add_Property
bool Add_Property(const CSG_String &Name, const CSG_String &Value)
Definition: metadata.cpp:559
CSG_Parameter_Shapes::m_Type
TSG_Shape_Type m_Type
Definition: parameters.h:1296
CSG_Parameter_Table_Field::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2282
CSG_Parameter_Range::is_Default
virtual bool is_Default(void) const
Definition: parameter_data.cpp:838
CSG_Parameter::Get_Child
CSG_Parameter * Get_Child(int iChild) const
Definition: parameters.h:256
CSG_Parameter_File_Name::m_bMultiple
bool m_bMultiple
Definition: parameters.h:878
SG_Parameter_Type_Get_Type
TSG_Parameter_Type SG_Parameter_Type_Get_Type(const CSG_String &Identifier)
Definition: parameter_data.cpp:164
CSG_Parameter_Value::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:411
CSG_Grids::Get_Grid_Ptr
CSG_Grid * Get_Grid_Ptr(int i) const
Definition: grids.h:260
CSG_Colors::Set_Green
bool Set_Green(int Index, int Value)
Definition: api_colors.cpp:336
CSG_Table::Get_Count
sLong Get_Count(void) const
Definition: table.h:392
CSG_Grid_System::Destroy
bool Destroy(void)
Definition: grid_system.cpp:223
CSG_Parameter_Date::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:641
SG_DATATYPE_Float
@ SG_DATATYPE_Float
Definition: api_core.h:1003
CSG_Parameter_Data_Type::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1252
CSG_Colors::Set_Count
bool Set_Count(int nColors)
Definition: api_colors.cpp:264
CSG_DateTime::Get_JDN
double Get_JDN(void) const
Definition: datetime.cpp:411
SG_PARAMETER_DATA_SET_FALSE
#define SG_PARAMETER_DATA_SET_FALSE
Definition: parameters.h:194
PARAMETER_TYPE_Grid
@ PARAMETER_TYPE_Grid
Definition: parameters.h:148
CSG_Parameter_Table_Fields::CSG_Parameter_Table_Fields
CSG_Parameter_Table_Fields(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2334
CSG_Parameter_Range::Set_Range
bool Set_Range(double Min, double Max)
Definition: parameter_data.cpp:783
CSG_Table::Assign_Values
bool Assign_Values(const CSG_Table &Table)
Definition: table.cpp:395
SG_Get_Significant_Decimals
SAGA_API_DLL_EXPORT int SG_Get_Significant_Decimals(double Value, int maxDecimals=6)
Definition: api_string.cpp:1256
SG_String_Tokenize
SAGA_API_DLL_EXPORT CSG_Strings SG_String_Tokenize(const CSG_String &String, const CSG_String &Delimiters=SG_DEFAULT_DELIMITERS, TSG_String_Tokenizer_Mode Mode=SG_TOKEN_DEFAULT)
Definition: api_string.cpp:1540
CSG_Parameter_Bool::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:306
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:390
CSG_Parameter_Value::m_bMaximum
bool m_bMaximum
Definition: parameters.h:453
CSG_Parameter_Choices::m_Items
CSG_Strings m_Items[2]
Definition: parameters.h:777
PARAMETER_TYPE_Grid_List
@ PARAMETER_TYPE_Grid_List
Definition: parameters.h:154
CSG_Parameter_Value::m_Maximum
double m_Maximum
Definition: parameters.h:455
CSG_Parameter_Table::CSG_Parameter_Table
CSG_Parameter_Table(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2835
CSG_Parameter_Colors::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1826
CSG_Parameter_Choices::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1414
CSG_Parameter_Fixed_Table::CSG_Parameter_Fixed_Table
CSG_Parameter_Fixed_Table(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1875
CSG_Parameter::is_Optional
bool is_Optional(void) const
Definition: parameters.h:234
SG_DATAOBJECT_TYPE_TIN
@ SG_DATAOBJECT_TYPE_TIN
Definition: dataobject.h:122
CSG_Parameter_Choice::is_Default
virtual bool is_Default(void) const
Definition: parameter_data.cpp:898
SG_DATATYPES_Standard
#define SG_DATATYPES_Standard
Definition: api_core.h:1030
CSG_Parameter_Font::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter_data.cpp:1634
CSG_Strings
Definition: api_core.h:699
CSG_DateTime
Definition: datetime.h:183
CSG_Parameter_Choices::Del_Items
void Del_Items(void)
Definition: parameter_data.cpp:1345
SG_DATATYPE_Date
@ SG_DATATYPE_Date
Definition: api_core.h:1006
SG_DATATYPE_Word
@ SG_DATATYPE_Word
Definition: api_core.h:997
SG_DATAOBJECT_TYPE_Grid
@ SG_DATAOBJECT_TYPE_Grid
Definition: dataobject.h:118
CSG_Parameter_Range::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:778
CSG_Parameter::asFilePath
class CSG_Parameter_File_Name * asFilePath(void) const
Definition: parameter.cpp:1111
CSG_Data_Manager::Add
CSG_Data_Object * Add(CSG_Data_Object *pObject)
Definition: data_manager.cpp:310
SG_PARAMETER_DATA_SET_TRUE
#define SG_PARAMETER_DATA_SET_TRUE
Definition: parameters.h:195
CSG_Parameter_Table_Field::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2271
CSG_Parameter_Grid::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:2793
CSG_Parameter_Grid::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2805
CSG_Data_Object::Set_Name
void Set_Name(const CSG_String &Name)
Definition: dataobject.cpp:300
CSG_Parameter_File_Name::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1606
CSG_Parameter::is_Output
bool is_Output(void) const
Definition: parameters.h:233
CSG_Parameter_Choice::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:1089
parameters.h
CSG_Parameter_Data_Object_Output::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2621
CSG_Parameter_Grid_List::Get_System
CSG_Grid_System * Get_System(void) const
Definition: parameter_data.cpp:3203
CSG_String::Format
static CSG_String Format(const char *Format,...)
Definition: api_string.cpp:270
SG_DATATYPES_Numeric
#define SG_DATATYPES_Numeric
Definition: api_core.h:1035
CSG_Parameter_List::Get_Item_Count
int Get_Item_Count(void) const
Definition: parameters.h:1372
CSG_Parameter_Shapes_List
Definition: parameters.h:1493
CSG_Parameter_Shapes::Set_Shape_Type
void Set_Shape_Type(TSG_Shape_Type Type)
Definition: parameter_data.cpp:2916
CSG_Parameter_Grids::CSG_Parameter_Grids
CSG_Parameter_Grids(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2821
CSG_Parameter_Data_Object::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:2497
CSG_Parameter_Font::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1687
CSG_Parameter_Double::m_Value
double m_Value
Definition: parameters.h:521
CSG_Parameter_Date::Set_Date
void Set_Date(const CSG_DateTime &Date)
Definition: parameter_data.cpp:710
CSG_Parameter_Int
Definition: parameters.h:471
CSG_Parameter_String::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1494
CSG_Table::Add_Field
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
Definition: table.cpp:481
gSG_Data_Type_Identifier
const char gSG_Data_Type_Identifier[][32]
Definition: api_core.h:1039
CSG_Table
Definition: table.h:283
CSG_Parameter_Choice::m_Data
CSG_Strings m_Data
Definition: parameters.h:692
SG_Double_To_Degree
SAGA_API_DLL_EXPORT CSG_String SG_Double_To_Degree(double Value)
Definition: api_string.cpp:1206
SG_DATAOBJECT_TYPE_Shapes
@ SG_DATAOBJECT_TYPE_Shapes
Definition: dataobject.h:121
CSG_Parameter_String::m_bPassword
bool m_bPassword
Definition: parameters.h:815
CSG_Parameter_Shapes::CSG_Parameter_Shapes
CSG_Parameter_Shapes(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2876
CSG_Parameter_Range::Set_Max
bool Set_Max(double Max)
Definition: parameter_data.cpp:820
CSG_Parameter_File_Name::m_bDirectory
bool m_bDirectory
Definition: parameters.h:878
CSG_String::CmpNoCase
int CmpNoCase(const CSG_String &String) const
Definition: api_string.cpp:521
SG_DATAOBJECT_TYPE_Undefined
@ SG_DATAOBJECT_TYPE_Undefined
Definition: dataobject.h:124
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_Default
const CSG_String & Get_Default(void) const
Definition: parameter.cpp:929
CSG_Parameter::Get_Children_Count
int Get_Children_Count(void) const
Definition: parameters.h:255
CSG_Parameter_Choice::Get_Item
const SG_Char * Get_Item(int Index) const
Definition: parameter_data.cpp:992
CSG_Parameter_Grid::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1202
CSG_Parameter::Get_Parent
CSG_Parameter * Get_Parent(void) const
Definition: parameter.cpp:106
CSG_Parameter_Range::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter_data.cpp:844
CSG_Parameter_Double::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:532
CSG_Parameter_Choice::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1107
CSG_Parameter::is_DataObject
bool is_DataObject(void) const
Definition: parameter.cpp:276
CSG_Parameter_Double
Definition: parameters.h:509
CSG_Parameter_Range::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:859
CSG_Grid_System::Get_Extent
const CSG_Rect & Get_Extent(bool bCells=false) const
Definition: grid.h:238
CSG_Parameter_Table_Field::_asDouble
virtual double _asDouble(void) const
Definition: parameter_data.cpp:2265
CSG_Parameter_Data_Type::Get_Data_Type
TSG_Data_Type Get_Data_Type(TSG_Data_Type Default=SG_DATATYPE_Undefined) const
Definition: parameter_data.cpp:1238
SG_Char
#define SG_Char
Definition: api_core.h:536
TSG_Data_Object_Type
TSG_Data_Object_Type
Definition: dataobject.h:117
CSG_Parameter_Parameters::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:3505
CSG_Parameter_List::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:3156
CSG_Parameter_Grid::Add_Default
bool Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
Definition: parameter_data.cpp:2704
CSG_String
Definition: api_core.h:563
CSG_Parameter_Choices::Clr_Selection
bool Clr_Selection(void)
Definition: parameter_data.cpp:1406
CSG_Parameter_List::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:3128
CSG_Parameter_Parameters::m_pParameters
CSG_Parameters * m_pParameters
Definition: parameters.h:1583
CSG_Parameter::asChoice
class CSG_Parameter_Choice * asChoice(void) const
Definition: parameter.cpp:1107
CSG_Parameter_Date::_asDouble
virtual double _asDouble(void) const
Definition: parameter_data.cpp:704
CSG_Parameter_Data_Object::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2520
SG_DATAOBJECT_TYPE_Table
@ SG_DATAOBJECT_TYPE_Table
Definition: dataobject.h:120
CSG_Parameter_Table_Field::Get_Table
CSG_Table * Get_Table(void) const
Definition: parameter_data.cpp:2180
CSG_Colors::Get_Green
long Get_Green(int Index) const
Definition: api_core.h:1368
CSG_Parameter_Date::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:724
CSG_MetaData
Definition: metadata.h:88
CSG_Parameter_File_Name::m_bSave
bool m_bSave
Definition: parameters.h:878
CSG_Parameters::Serialize
bool Serialize(CSG_MetaData &Data, bool bSave)
Definition: parameters.h:1876
CSG_Parameter_Colors::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:1794
CSG_Parameter_String
Definition: parameters.h:800
CSG_Parameter_Degree::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:615
CSG_Parameter_Color::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1761
CSG_Parameter_Choice::m_Value
int m_Value
Definition: parameters.h:690
CSG_Parameter_Grid_List::Add_Item
virtual bool Add_Item(CSG_Data_Object *pItem)
Definition: parameter_data.cpp:3214
CSG_Parameter_Shapes::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1286
CSG_String::is_Empty
bool is_Empty(void) const
Definition: api_string.cpp:178
CSG_Parameter_Choices::m_Selection
CSG_Array_Int m_Selection
Definition: parameters.h:779
CSG_Parameter_Grid_List::Update_Data
virtual bool Update_Data(void)
Definition: parameter_data.cpp:3291
CSG_Parameter_TIN::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2944
CSG_Parameter::has_Changed
bool has_Changed(int Check_Flags=PARAMETER_CHECK_ALL)
Definition: parameter.cpp:886
CSG_Parameter_Date::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:698
CSG_Parameter::asDouble
double asDouble(void) const
Definition: parameters.h:284
CSG_Parameter_Choices::Select
bool Select(int Index, bool bSelect=true)
Definition: parameter_data.cpp:1375
CSG_Parameter_Table_Fields::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:2429
PARAMETER_TYPE_Grid_System
@ PARAMETER_TYPE_Grid_System
Definition: parameters.h:143
CSG_Table_Record::Set_Value
bool Set_Value(int Field, const CSG_String &Value)
Definition: table_record.cpp:270
CSG_Array_Pointer::Set_Array
bool Set_Array(sLong nValues, bool bShrink=true)
Definition: api_core.h:387
CSG_Parameter_File_Name::Set_Flag_Directory
void Set_Flag_Directory(bool bFlag)
Definition: parameter_data.cpp:1569
CSG_DateTime::Set
CSG_DateTime & Set(const CSG_DateTime &DateTime)
Definition: datetime.cpp:131
SG_DATATYPE_Short
@ SG_DATATYPE_Short
Definition: api_core.h:998
PARAMETER_TYPE_PointCloud_List
@ PARAMETER_TYPE_PointCloud_List
Definition: parameters.h:159
CSG_Parameter_PointCloud::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2985
CSG_Rect::Get_YMax
double Get_YMax(void) const
Definition: geo_tools.h:505
CSG_Parameter_Grid::m_Default
int m_Default
Definition: parameters.h:1216
CSG_Parameter_Grid_List::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1412
CSG_Parameter_Choices::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1425
CSG_Parameter_Fixed_Table::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:1893
CSG_Parameter_Grid::CSG_Parameter_Grid
CSG_Parameter_Grid(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:2685
CSG_Rect::Get_XMin
double Get_XMin(void) const
Definition: geo_tools.h:502
PARAMETER_TYPE_Table_List
@ PARAMETER_TYPE_Table_List
Definition: parameters.h:156
CSG_Array_Pointer::Add
bool Add(void *Value)
Definition: api_memory.cpp:485
CSG_Parameter::asRange
class CSG_Parameter_Range * asRange(void) const
Definition: parameter.cpp:1110
CSG_Data_Manager::Find
CSG_Data_Object * Find(const CSG_String &File, bool bNative=true) const
Definition: data_manager.cpp:263
CSG_Parameter::Get_Manager
class CSG_Data_Manager * Get_Manager(void) const
Definition: parameter.cpp:112
CSG_Grid
Definition: grid.h:475
CSG_Array_Pointer::Get_Array
void ** Get_Array(void) const
Definition: api_core.h:384
SG_DATATYPE_Bit
@ SG_DATATYPE_Bit
Definition: api_core.h:994
CSG_Parameter_Range::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:769
CSG_Parameter_Table_Fields::~CSG_Parameter_Table_Fields
virtual ~CSG_Parameter_Table_Fields(void)
Definition: parameter_data.cpp:2342
CSG_Parameter_Double::CSG_Parameter_Double
CSG_Parameter_Double(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:519
CSG_MetaData::Fmt_Content
void Fmt_Content(const char *Format,...)
Definition: metadata.cpp:510
CSG_Parameter_Colors::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1832
CSG_Parameter_Parameters::~CSG_Parameter_Parameters
virtual ~CSG_Parameter_Parameters(void)
Definition: parameter_data.cpp:3493
PARAMETER_TYPE_DataObject_Output
@ PARAMETER_TYPE_DataObject_Output
Definition: parameters.h:161
CSG_Parameter_Table_Fields::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:2423
CSG_Parameter_Choice
Definition: parameters.h:660
CSG_Parameter_Table_List::CSG_Parameter_Table_List
CSG_Parameter_Table_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3414
CSG_Parameter_Grid_List::Del_Item
virtual bool Del_Item(CSG_Data_Object *pItem, bool bUpdateData=true)
Definition: parameter_data.cpp:3273
CSG_Parameter_Bool::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:292
CSG_Parameter::Set_Enabled
bool Set_Enabled(bool bEnabled=true)
Definition: parameter.cpp:196
CSG_Table::Create
bool Create(void)
Definition: table.cpp:139
CSG_String::asDouble
double asDouble(void) const
Definition: api_string.cpp:760
CSG_Shapes
Definition: shapes.h:775
CSG_String::c_str
const SG_Char * c_str(void) const
Definition: api_string.cpp:236
ADD_TYPE
#define ADD_TYPE(type)
CSG_MetaData::Cmp_Content
bool Cmp_Content(const CSG_String &String, bool bNoCase=false) const
Definition: metadata.cpp:548
CSG_Strings::Get_Count
int Get_Count(void) const
Definition: api_core.h:712
CSG_Parameter_Int::m_Value
int m_Value
Definition: parameters.h:483
CSG_Parameter_Choices::is_Selected
bool is_Selected(int Index)
Definition: parameter_data.cpp:1361
CSG_Parameter_Grid::Get_System
CSG_Grid_System * Get_System(void) const
Definition: parameter_data.cpp:2698
CSG_Parameters
Definition: parameters.h:1690
SG_Data_Type_Get_Type
TSG_Data_Type SG_Data_Type_Get_Type(const CSG_String &Identifier)
Definition: api_core.cpp:153
TSG_Data_Type
TSG_Data_Type
Definition: api_core.h:993
CSG_Parameter_Range::Get_Min
double Get_Min(void) const
Definition: parameter_data.cpp:814
CSG_Array_Int::Get_uSize
size_t Get_uSize(void) const
Definition: api_core.h:437
SG_Realloc
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
Definition: api_memory.cpp:77
CSG_Parameter_Value::m_bMinimum
bool m_bMinimum
Definition: parameters.h:453
CSG_MetaData::Add_Child
CSG_MetaData * Add_Child(void)
Definition: metadata.cpp:166
CSG_Parameter_List
Definition: parameters.h:1364
CSG_Parameter::asGrid_System
CSG_Grid_System * asGrid_System(void) const
Definition: parameter.cpp:1037
CSG_Table::Get_Field_Type
TSG_Data_Type Get_Field_Type(int iField) const
Definition: table.h:358
CSG_Table::Add_Record
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
Definition: table.cpp:795
CSG_String_Tokenizer
Definition: api_core.h:760
CSG_Parameter_Table_Fields::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2449
CSG_Parameter_Shapes_List::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:3442
PARAMETER_TYPE_Range
@ PARAMETER_TYPE_Range
Definition: parameters.h:130
CSG_Parameter_Double::is_Default
virtual bool is_Default(void) const
Definition: parameter_data.cpp:526
CSG_Parameter_Bool::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:250
CSG_Grids
Definition: grids.h:119
CSG_Parameter_Choices::Get_Items
CSG_String Get_Items(void) const
Definition: parameter_data.cpp:1327
PARAMETER_TYPE_TIN_List
@ PARAMETER_TYPE_TIN_List
Definition: parameters.h:158
CSG_Parameter_Choice::Get_Item_Data
CSG_String Get_Item_Data(int Index) const
Definition: parameter_data.cpp:1003
TSG_Parameter_Type
TSG_Parameter_Type
Definition: parameters.h:122
CSG_Array_Int::Destroy
void Destroy(void)
Definition: api_core.h:431
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
CSG_Parameter_Value::m_Minimum
double m_Minimum
Definition: parameters.h:455
CSG_Parameter_Range::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:850
SG_DATATYPE_Char
@ SG_DATATYPE_Char
Definition: api_core.h:996
CSG_Parameter_List::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:3103
PARAMETER_TYPE_Font
@ PARAMETER_TYPE_Font
Definition: parameters.h:138
CSG_Parameter_Bool::m_Value
bool m_Value
Definition: parameters.h:410
CSG_Parameter_String::Set_Password
void Set_Password(bool bOn)
Definition: parameter_data.cpp:1460
CSG_Parameter::asList
class CSG_Parameter_List * asList(void) const
Definition: parameter.cpp:1115
CSG_Parameter_List::CSG_Parameter_List
CSG_Parameter_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3025
CSG_String_Tokenizer::Get_Next_Token
CSG_String Get_Next_Token(void)
Definition: api_string.cpp:1489
PARAMETER_TYPE_Color
@ PARAMETER_TYPE_Color
Definition: parameters.h:139
CSG_Colors::Assign
bool Assign(const CSG_Colors &Colors)
Definition: api_colors.cpp:1037
PARAMETER_TYPE_Shapes
@ PARAMETER_TYPE_Shapes
Definition: parameters.h:151
CSG_Parameter::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter.cpp:941
CSG_MetaData::Get_Property
const SG_Char * Get_Property(int Index) const
Definition: metadata.h:180
CSG_Parameter_Choice::Get_Items
CSG_String Get_Items(void) const
Definition: parameter_data.cpp:974
SG_DATATYPE_ULong
@ SG_DATATYPE_ULong
Definition: api_core.h:1001
SG_DATAOBJECT_TYPE_PointCloud
@ SG_DATAOBJECT_TYPE_PointCloud
Definition: dataobject.h:123
CSG_Parameter_Grids_List::CSG_Parameter_Grids_List
CSG_Parameter_Grids_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3336
SHAPE_TYPE_Undefined
@ SHAPE_TYPE_Undefined
Definition: shapes.h:101
CSG_Parameter_Table_Fields::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2443
CSG_Parameters::Set_Callback
bool Set_Callback(bool bActive=true)
Definition: parameters.cpp:1363
CSG_Data_Object::is_Valid
virtual bool is_Valid(void) const =0
CSG_Parameter::asChoices
class CSG_Parameter_Choices * asChoices(void) const
Definition: parameter.cpp:1109
CSG_Parameter_Int::is_Default
virtual bool is_Default(void) const
Definition: parameter_data.cpp:437
CSG_Parameter::is_Information
bool is_Information(void) const
Definition: parameters.h:235
CSG_Parameter_PointCloud_List::CSG_Parameter_PointCloud_List
CSG_Parameter_PointCloud_List(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:3473
CSG_Parameter_Fixed_Table::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1911
CSG_Grid_System::is_Valid
bool is_Valid(void) const
Definition: grid_system.cpp:258
CSG_Parameter::Get_Type_Identifier
CSG_String Get_Type_Identifier(void) const
Definition: parameter.cpp:123
CSG_Parameter_Range::CSG_Parameters
friend class CSG_Parameters
Definition: parameters.h:650
CSG_Parameter_Date::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:716
CSG_Parameter::asBool
bool asBool(void) const
Definition: parameters.h:281
CSG_Parameter_Grid_System::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2124
CSG_Grids::Get_NZ
int Get_NZ(void) const
Definition: grids.h:187
CSG_Parameter_Grid::Set_Preferred_Type
void Set_Preferred_Type(TSG_Data_Type Type)
Definition: parameter_data.cpp:2692
DATAOBJECT_NOTSET
#define DATAOBJECT_NOTSET
Definition: dataobject.h:129
PARAMETER_TYPE_Text
@ PARAMETER_TYPE_Text
Definition: parameters.h:135
CSG_Parameter_Data_Object::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:2514
CSG_Parameter_Choices::CSG_Parameter_Choices
CSG_Parameter_Choices(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:1265
CSG_Parameter_Date::CSG_Parameter_Date
CSG_Parameter_Date(CSG_Parameters *pOwner, CSG_Parameter *pParent, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, int Constraint)
Definition: parameter_data.cpp:634
SG_DATATYPE_Double
@ SG_DATATYPE_Double
Definition: api_core.h:1004