SAGA API  v9.9
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  Set_Collapsed();
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  Set_Collapsed();
763 }
764 
766 {
767  delete(m_pRange);
768 }
769 
770 //---------------------------------------------------------
772 {
773  m_String.Printf("%.*f; %.*f",
776  );
777 }
778 
779 //---------------------------------------------------------
781 {
783 }
784 
785 bool CSG_Parameter_Range::Set_Range(double Min, double Max)
786 {
787  bool bResult;
788 
789  if( Min > Max )
790  {
791  bResult = m_pMin->Set_Value(Max);
792  bResult |= m_pMax->Set_Value(Min);
793  }
794  else
795  {
796  bResult = m_pMin->Set_Value(Min);
797  bResult |= m_pMax->Set_Value(Max);
798  }
799 
800  return( bResult );
801 }
802 
803 //---------------------------------------------------------
805 {
806  if( m_pMin->Set_Value(Value) )
807  {
808  has_Changed();
809 
810  return( true );
811  }
812 
813  return( false );
814 }
815 
817 {
818  return( m_pMin->asDouble() );
819 }
820 
821 //---------------------------------------------------------
823 {
824  if( m_pMax->Set_Value(Value) )
825  {
826  has_Changed();
827 
828  return( true );
829  }
830 
831  return( false );
832 }
833 
835 {
836  return( m_pMax->asDouble() );
837 }
838 
839 //---------------------------------------------------------
841 {
842  return( m_pMin->is_Default() && m_pMax->is_Default() );
843 }
844 
845 //---------------------------------------------------------
847 {
848  return( m_pMin->Restore_Default() && m_pMax->Restore_Default() );
849 }
850 
851 //---------------------------------------------------------
853 {
854  m_pMin->Assign(pSource->asRange()->m_pMin);
855  m_pMax->Assign(pSource->asRange()->m_pMax);
856 
857  return( true );
858 }
859 
860 //---------------------------------------------------------
862 {
863  if( bSave )
864  {
865  Entry.Fmt_Content("%.*f; %.*f",
868  );
869 
870  return( true );
871  }
872  else
873  {
874  CSG_String s(Entry.Get_Content()); double Min, Max;
875 
876  if( s.BeforeFirst(';').asDouble(Min) && s.AfterFirst(';').asDouble(Max) )
877  {
878  return( Set_Range(Min, Max) );
879  }
880  }
881 
882  return( false );
883 }
884 
885 
887 // //
888 // Choice //
889 // //
891 
892 //---------------------------------------------------------
893 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)
894  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
895 {
896  m_Value = -1;
897 }
898 
899 //---------------------------------------------------------
901 {
902  return( m_Value == Get_Default().asInt() );
903 }
904 
905 //---------------------------------------------------------
907 {
908  return( Get_Count() > 1 && Set_Value((asInt() + 1) % Get_Count()) );
909 }
910 
911 //---------------------------------------------------------
913 {
914  m_Items.Clear(); m_Data.Clear();
915 
916  return( true );
917 }
918 
919 //---------------------------------------------------------
921 {
922  if( !Item.is_Empty() )
923  {
924  m_Items.Add(Item);
925  m_Data .Add(Data);
926 
927  _Set_String(); // items have changed
928 
929  return( true );
930  }
931 
932  return( false );
933 }
934 
935 //---------------------------------------------------------
937 {
938  m_Items.Clear(); m_Data.Clear();
939 
940  if( String && *String != '\0' )
941  {
942  CSG_Strings Items(SG_String_Tokenize(String, "|"));
943 
944  for(int i=0; i<Items.Get_Count(); i++)
945  {
946  if( Items[i].Find('{') == 0 && Items[i].Find('}') > 0 ) // data entry within leading curly brackets: '{data} item text'
947  {
948  CSG_String Data(Items[i].AfterFirst('{').BeforeFirst('}'));
949  CSG_String Item(Items[i].AfterFirst('}')); Item.Trim();
950 
951  Add_Item(Item, Data);
952  }
953  else
954  {
955  Add_Item(Items[i]);
956  }
957  }
958  }
959 
960  if( m_Value < 0 && m_Items.Get_Count() > 0 )
961  {
962  m_Value = 0;
963  }
964 
965  if( m_Value >= m_Items.Get_Count() )
966  {
967  m_Value = m_Items.Get_Count() - 1;
968  }
969 
970  _Set_String(); // items have changed
971 
972  return( Get_Count() > 0 );
973 }
974 
975 //---------------------------------------------------------
977 {
978  CSG_String Items;
979 
980  for(int i=0; i<Get_Count(); i++)
981  {
982  if( i > 0 )
983  {
984  Items += "|";
985  }
986 
987  Items += m_Items[i];
988  }
989 
990  return( Items );
991 }
992 
993 //---------------------------------------------------------
994 const SG_Char * CSG_Parameter_Choice::Get_Item(int Index) const
995 {
996  if( Index >= 0 && Index < Get_Count() )
997  {
998  return( m_Items[Index] );
999  }
1000 
1001  return( NULL );
1002 }
1003 
1004 //---------------------------------------------------------
1006 {
1007  if( Index >= 0 && Index < Get_Count() )
1008  {
1009  return( m_Data[Index] );
1010  }
1011 
1012  return( "" );
1013 }
1014 
1016 {
1017  return( Get_Item_Data(m_Value) );
1018 }
1019 
1021 {
1022  Value = Get_Item_Data(m_Value);
1023 
1024  return( !Value.is_Empty() );
1025 }
1026 
1027 bool CSG_Parameter_Choice::Get_Data(int &Value) const
1028 {
1029  CSG_String String;
1030 
1031  return( Get_Data(String) && String.asInt(Value) );
1032 }
1033 
1034 bool CSG_Parameter_Choice::Get_Data(double &Value) const
1035 {
1036  CSG_String String;
1037 
1038  return( Get_Data(String) && String.asDouble(Value) );
1039 }
1040 
1041 //---------------------------------------------------------
1043 {
1044  if( Value >= 0 && Value < m_Items.Get_Count() )
1045  {
1046  if( m_Value != Value )
1047  {
1048  m_Value = Value;
1049 
1051  }
1052 
1053  return( SG_PARAMETER_DATA_SET_TRUE );
1054  }
1055 
1056  return( SG_PARAMETER_DATA_SET_FALSE );
1057 }
1058 
1059 //---------------------------------------------------------
1061 {
1062  return( _Set_Value((int)Value) );
1063 }
1064 
1065 //---------------------------------------------------------
1067 {
1068  if( !Value.is_Empty() )
1069  {
1070  for(int i=0; i<m_Items.Get_Count(); i++)
1071  {
1072  if( !Value.Cmp(Get_Item_Data(i)) || !Value.Cmp(Get_Item(i)) )
1073  {
1074  return( _Set_Value(i) );
1075  }
1076  }
1077 
1078  int Index; // choice not found? then test, if value string is an integer specifying the index position
1079 
1080  if( Value.asInt(Index) && Index >= 0 && Index < m_Items.Get_Count() )
1081  {
1082  return( _Set_Value(Index) );
1083  }
1084 
1085  }
1086 
1087  return( SG_PARAMETER_DATA_SET_FALSE );
1088 }
1089 
1090 //---------------------------------------------------------
1092 {
1093  m_String = m_Value >= 0 && m_Value < Get_Count() ? Get_Item(m_Value) : _TL("<no choice available>");
1094 }
1095 
1096 //---------------------------------------------------------
1098 {
1099  m_Items = pSource->asChoice()->m_Items;
1100  m_Data = pSource->asChoice()->m_Data ;
1101  m_Value = pSource->asChoice()->m_Value;
1102 
1103  _Set_String(); // items have changed
1104 
1105  return( true );
1106 }
1107 
1108 //---------------------------------------------------------
1110 {
1111  if( bSave )
1112  {
1113  Entry.Add_Property("index", m_Value);
1114 
1115  Entry.Set_Content(asString());
1116 
1117  return( true );
1118  }
1119  else
1120  {
1121  int Index;
1122 
1123  return( (Entry.Get_Property("index", Index) || Entry.Get_Content().asInt(Index)) && _Set_Value(Index) );
1124  }
1125 }
1126 
1127 
1129 // //
1130 // Data Type //
1131 // //
1133 
1134 //---------------------------------------------------------
1135 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)
1136  : CSG_Parameter_Choice(pOwner, pParent, ID, Name, Description, Constraint)
1137 {
1138  // nop
1139 }
1140 
1141 //---------------------------------------------------------
1150 //---------------------------------------------------------
1151 bool CSG_Parameter_Data_Type::Set_Data_Types(int Data_Types, TSG_Data_Type Default, const CSG_String &User)
1152 {
1153  if( Data_Types <= SG_DATATYPES_Undefined )
1154  {
1155  Data_Types = SG_DATATYPES_Standard;
1156  }
1157 
1158  if( Default == SG_DATATYPE_Undefined && User.is_Empty() )
1159  {
1160  switch( Data_Types )
1161  {
1162  case (SG_DATATYPES_Integer ): Default = SG_DATATYPE_Int ; break;
1163  case (SG_DATATYPES_Integer|SG_DATATYPES_Bit): Default = SG_DATATYPE_Int ; break;
1164  case (SG_DATATYPES_Numeric ): Default = SG_DATATYPE_Float ; break;
1165  case (SG_DATATYPES_Numeric|SG_DATATYPES_Bit): Default = SG_DATATYPE_Float ; break;
1166  case (SG_DATATYPES_Table ): Default = SG_DATATYPE_String; break;
1167  case (SG_DATATYPES_Standard ): Default = SG_DATATYPE_String; break;
1168  }
1169  }
1170 
1171  #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)); }
1172 
1173  int _Default = -1;
1174 
1175  ADD_TYPE(SG_DATATYPE_String); // data types are added in this order to the choice item list
1190 
1191  if( !User.is_Empty() )
1192  {
1193  if( _Default < 0 )
1194  {
1195  _Default = Get_Count();
1196  }
1197 
1199  }
1200  else if( _Default < 0 )
1201  {
1202  _Default = 0;
1203  }
1204 
1205  Set_Default(_Default); Set_Value(_Default);
1206 
1207  return( true );
1208 }
1209 
1210 //---------------------------------------------------------
1217 //---------------------------------------------------------
1219 {
1220  for(int i=0; i<Get_Count(); i++)
1221  {
1222  if( Value == SG_Data_Type_Get_Type(Get_Item_Data(i)) )
1223  {
1224  return( Set_Value(i) );
1225  }
1226  }
1227 
1228  return( false );
1229 }
1230 
1231 //---------------------------------------------------------
1239 //---------------------------------------------------------
1241 {
1243 
1244  return( Type == SG_DATATYPE_Undefined ? Default : Type );
1245 }
1246 
1247 //---------------------------------------------------------
1249 {
1250  return( CSG_Parameter_Choice::_Assign(pSource) );
1251 }
1252 
1253 //---------------------------------------------------------
1255 {
1256  return( CSG_Parameter_Choice::_Serialize(Entry, bSave) );
1257 }
1258 
1259 
1261 // //
1262 // Choices //
1263 // //
1265 
1266 //---------------------------------------------------------
1267 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)
1268  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1269 {
1270  // nop
1271 }
1272 
1273 //---------------------------------------------------------
1275 {
1276  CSG_String_Tokenizer Tokens(Value, ";");
1277 
1278  m_Selection.Destroy();
1279 
1280  while( Tokens.Has_More_Tokens() )
1281  {
1282  int Index;
1283 
1284  if( Tokens.Get_Next_Token().asInt(Index) )
1285  {
1286  Select(Index);
1287  }
1288  }
1289 
1291 }
1292 
1293 //---------------------------------------------------------
1295 {
1296  m_String.Clear();
1297 
1298  for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1299  {
1300  m_String += CSG_String::Format("%d;", m_Selection[i]);
1301  }
1302 }
1303 
1304 //---------------------------------------------------------
1306 {
1307  Del_Items();
1308 
1309  CSG_String_Tokenizer Tokens(Items, "|");
1310 
1311  while( Tokens.Has_More_Tokens() )
1312  {
1313  Add_Item(Tokens.Get_Next_Token());
1314  }
1315 }
1316 
1317 //---------------------------------------------------------
1319 {
1320  Del_Items();
1321 
1322  for(int i=0; i<Items.Get_Count(); i++)
1323  {
1324  Add_Item(Items[i]);
1325  }
1326 }
1327 
1328 //---------------------------------------------------------
1330 {
1331  CSG_String Items;
1332 
1333  for(int i=0; i<m_Items[0].Get_Count(); i++)
1334  {
1335  if( i > 0 )
1336  {
1337  Items += "|";
1338  }
1339 
1340  Items += m_Items[0][i];
1341  }
1342 
1343  return( Items );
1344 }
1345 
1346 //---------------------------------------------------------
1348 {
1349  m_Items[0].Clear();
1350  m_Items[1].Clear();
1351 
1352  m_Selection.Destroy();
1353 }
1354 
1355 //---------------------------------------------------------
1357 {
1358  m_Items[0] += Item;
1359  m_Items[1] += Data;
1360 }
1361 
1362 //---------------------------------------------------------
1364 {
1365  for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1366  {
1367  if( Index == m_Selection[i] )
1368  {
1369  return( true );
1370  }
1371  }
1372 
1373  return( false );
1374 }
1375 
1376 //---------------------------------------------------------
1377 bool CSG_Parameter_Choices::Select(int Index, bool bSelect)
1378 {
1379  if( Index >= 0 && Index < Get_Item_Count() )
1380  {
1381  if( bSelect && !is_Selected(Index) )
1382  {
1383  m_Selection += Index;
1384  }
1385  else if( !bSelect )
1386  {
1387  for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1388  {
1389  if( Index == m_Selection[i] )
1390  {
1391  for(size_t j=i+1; j<m_Selection.Get_uSize(); i++, j++)
1392  {
1393  m_Selection[i] = m_Selection[j];
1394  }
1395 
1397  }
1398  }
1399  }
1400 
1401  return( true );
1402  }
1403 
1404  return( false );
1405 }
1406 
1407 //---------------------------------------------------------
1409 {
1410  m_Selection.Destroy();
1411 
1412  return( true );
1413 }
1414 
1415 //---------------------------------------------------------
1417 {
1418  m_Items[0] = pSource->asChoices()->m_Items[0];
1419  m_Items[1] = pSource->asChoices()->m_Items[1];
1420 
1421  m_Selection = pSource->asChoices()->m_Selection;
1422 
1423  return( true );
1424 }
1425 
1426 //---------------------------------------------------------
1428 {
1429  if( bSave )
1430  {
1431  Entry.Set_Content(asString());
1432 
1433  return( true );
1434  }
1435  else
1436  {
1437  return( _Set_Value(Entry.Get_Content()) != 0 );
1438  }
1439 }
1440 
1441 
1443 // //
1444 // String //
1445 // //
1447 
1448 //---------------------------------------------------------
1449 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)
1450  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1451 {
1452  m_bPassword = false;
1453 }
1454 
1455 //---------------------------------------------------------
1457 {
1458  return( !m_String.is_Empty() );
1459 }
1460 
1461 //---------------------------------------------------------
1463 {
1464  m_bPassword = bOn;
1465 }
1466 
1467 //---------------------------------------------------------
1469 {
1470  return( m_bPassword );
1471 }
1472 
1473 //---------------------------------------------------------
1475 {
1476  if( m_String.Cmp(Value) )
1477  {
1478  m_String = Value;
1479 
1481  }
1482 
1483  return( SG_PARAMETER_DATA_SET_TRUE );
1484 }
1485 
1486 //---------------------------------------------------------
1488 {
1489  m_String = ((CSG_Parameter_String *)pSource)->m_String;
1490  m_bPassword = ((CSG_Parameter_String *)pSource)->m_bPassword;
1491 
1492  return( true );
1493 }
1494 
1495 //---------------------------------------------------------
1497 {
1498  if( bSave )
1499  {
1500  Entry.Set_Content(m_String);
1501  }
1502  else
1503  {
1504  m_String = Entry.Get_Content();
1505  }
1506 
1507  return( true );
1508 }
1509 
1510 
1512 // //
1513 // Text //
1514 // //
1516 
1517 //---------------------------------------------------------
1518 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)
1519  : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1520 {
1521  // nop
1522 }
1523 
1524 
1526 // //
1527 // FilePath //
1528 // //
1530 
1531 //---------------------------------------------------------
1532 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)
1533  : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1534 {
1535  m_Filter.Printf("%s|*.*", _TL("All Files"));
1536 
1537  m_bSave = false;
1538  m_bMultiple = false;
1539  m_bDirectory = false;
1540 }
1541 
1542 //---------------------------------------------------------
1544 {
1545  if( Filter )
1546  {
1547  m_Filter = Filter;
1548  }
1549  else
1550  {
1551  m_Filter.Printf("%s|*.*", _TL("All Files"));
1552  }
1553 }
1554 
1556 {
1557  return( m_Filter.c_str() );
1558 }
1559 
1560 //---------------------------------------------------------
1562 {
1563  m_bSave = bFlag;
1564 }
1565 
1567 {
1568  m_bMultiple = bFlag;
1569 }
1570 
1572 {
1573  m_bDirectory = bFlag;
1574 }
1575 
1576 //---------------------------------------------------------
1578 {
1579  FilePaths.Clear();
1580 
1581  if( m_String.Length() > 0 )
1582  {
1583  if( !m_bMultiple )
1584  {
1585  FilePaths.Add(m_String);
1586  }
1587  else if( m_String[0] != '\"' )
1588  {
1589  FilePaths.Add(m_String);
1590  }
1591  else
1592  {
1593  CSG_String s(m_String);
1594 
1595  while( s.Length() > 2 )
1596  {
1597  s = s.AfterFirst('\"');
1598  FilePaths.Add(s.BeforeFirst('\"'));
1599  s = s.AfterFirst('\"');
1600  }
1601  }
1602  }
1603 
1604  return( FilePaths.Get_Count() > 0 );
1605 }
1606 
1607 //---------------------------------------------------------
1609 {
1611 
1613 
1614  m_bSave = pSource->asFilePath()->m_bSave;
1615  m_bMultiple = pSource->asFilePath()->m_bMultiple;
1616  m_bDirectory = pSource->asFilePath()->m_bDirectory;
1617 
1618  return( true );
1619 }
1620 
1621 
1623 // //
1624 // Font //
1625 // //
1627 
1628 //---------------------------------------------------------
1629 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)
1630  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1631 {
1632  Restore_Default();
1633 }
1634 
1635 //---------------------------------------------------------
1637 {
1638  m_Color = SG_GET_RGB(0, 0, 0);
1639 #ifdef __WXMAC__
1640  m_String = ".applesystemuifont 11 utf-8";
1641 #else
1642  m_String = "0;-12;0;0;0;400;0;0;0;0;3;2;1;34;Arial";
1643 #endif
1644 
1645  return( true );
1646 }
1647 
1648 //---------------------------------------------------------
1650 {
1651  if( m_Color != Value )
1652  {
1653  m_Color = Value;
1654 
1656  }
1657 
1658  return( SG_PARAMETER_DATA_SET_TRUE );
1659 }
1660 
1661 //---------------------------------------------------------
1663 {
1664  if( Value.is_Empty() )
1665  {
1666  Restore_Default();
1667 
1669  }
1670 
1671  m_String = Value;
1672 
1674 }
1675 
1676 //---------------------------------------------------------
1678 {
1679  return( m_Color );
1680 }
1681 
1682 //---------------------------------------------------------
1684 {
1685  return( (void *)m_String.c_str() );
1686 }
1687 
1688 //---------------------------------------------------------
1690 {
1691  m_Color = ((CSG_Parameter_Font *)pSource)->m_Color;
1692  m_String = ((CSG_Parameter_Font *)pSource)->m_String;
1693 
1694  return( true );
1695 }
1696 
1697 //---------------------------------------------------------
1699 {
1700  if( bSave )
1701  {
1702  Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1704  ));
1705 
1706  Entry.Add_Child("FONT", m_String);
1707  }
1708  else
1709  {
1710  if( Entry("COLOR") != NULL )
1711  {
1712  _Set_Value((int)SG_GET_RGB(
1713  Entry("COLOR")->Get_Content().AfterFirst('R').asInt(),
1714  Entry("COLOR")->Get_Content().AfterFirst('G').asInt(),
1715  Entry("COLOR")->Get_Content().AfterFirst('B').asInt()
1716  ));
1717  }
1718 
1719  if( Entry("FONT") != NULL )
1720  {
1721  _Set_Value(Entry("FONT")->Get_Content());
1722  }
1723  }
1724 
1725  return( true );
1726 }
1727 
1728 
1730 // //
1731 // Color //
1732 // //
1734 
1735 //---------------------------------------------------------
1736 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)
1737  : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
1738 {
1739  // nop
1740 }
1741 
1742 //---------------------------------------------------------
1744 {
1745  long l;
1746 
1747  if( SG_Color_From_Text(Value, l) )
1748  {
1749  return( CSG_Parameter_Int::_Set_Value((int)l) );
1750  }
1751 
1752  int i;
1753 
1754  if( Value.asInt(i) )
1755  {
1756  return( CSG_Parameter_Int::_Set_Value(i) );
1757  }
1758 
1759  return( SG_PARAMETER_DATA_SET_FALSE );
1760 }
1761 
1762 //---------------------------------------------------------
1764 {
1765  if( bSave )
1766  {
1767  Entry.Fmt_Content("R%03d G%03d B%03d", SG_GET_R(m_Value), SG_GET_G(m_Value), SG_GET_B(m_Value));
1768  }
1769  else
1770  {
1771  m_Value = SG_GET_RGB(
1772  Entry.Get_Content().AfterFirst('R').asInt(),
1773  Entry.Get_Content().AfterFirst('G').asInt(),
1774  Entry.Get_Content().AfterFirst('B').asInt()
1775  );
1776  }
1777 
1778  return( true );
1779 }
1780 
1781 
1783 // //
1784 // Colors //
1785 // //
1787 
1788 //---------------------------------------------------------
1789 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)
1790  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1791 {
1792  // nop
1793 }
1794 
1795 //---------------------------------------------------------
1797 {
1798  if( Value >= 0 && Value < CSG_Colors::Get_Predefined_Count() )
1799  {
1800  if( m_Colors.Create(m_Colors.Get_Count(), Value) )
1801  {
1803  }
1804  }
1805 
1806  return( SG_PARAMETER_DATA_SET_FALSE );
1807 }
1808 
1809 //---------------------------------------------------------
1811 {
1812  m_String.Printf("%d %s", m_Colors.Get_Count(), _TL("colors"));
1813 }
1814 
1815 //---------------------------------------------------------
1817 {
1818  return( m_Colors.Get_Count() );
1819 }
1820 
1821 //---------------------------------------------------------
1823 {
1824  return( (void *)&m_Colors );
1825 }
1826 
1827 //---------------------------------------------------------
1829 {
1830  return( m_Colors.Assign(pSource->asColors()) );
1831 }
1832 
1833 //---------------------------------------------------------
1835 {
1836  if( bSave )
1837  {
1838  for(int i=0; i<m_Colors.Get_Count(); i++)
1839  {
1840  Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1841  m_Colors.Get_Red (i),
1842  m_Colors.Get_Green(i),
1843  m_Colors.Get_Blue (i))
1844  );
1845  }
1846  }
1847  else
1848  {
1849  if( Entry.Get_Children_Count() <= 1 )
1850  {
1851  return( false );
1852  }
1853 
1855 
1856  for(int i=0; i<m_Colors.Get_Count(); i++)
1857  {
1858  CSG_String s(Entry(i)->Get_Content());
1859 
1860  m_Colors.Set_Red (i, s.AfterFirst('R').asInt());
1861  m_Colors.Set_Green(i, s.AfterFirst('G').asInt());
1862  m_Colors.Set_Blue (i, s.AfterFirst('B').asInt());
1863  }
1864  }
1865 
1866  return( true );
1867 }
1868 
1869 
1871 // //
1872 // FixedTable //
1873 // //
1875 
1876 //---------------------------------------------------------
1877 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)
1878  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1879 {
1880  m_Table.Set_Name(_TL("Table"));
1881 }
1882 
1883 //---------------------------------------------------------
1885 {
1886  if( Value && m_Table.Assign_Values((CSG_Table *)Value) )
1887  {
1889  }
1890 
1891  return( SG_PARAMETER_DATA_SET_TRUE );
1892 }
1893 
1894 //---------------------------------------------------------
1896 {
1897  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());
1898 }
1899 
1900 //---------------------------------------------------------
1902 {
1903  return( (void *)&m_Table );
1904 }
1905 
1906 //---------------------------------------------------------
1908 {
1909  return( m_Table.Create(*pSource->asTable()) );
1910 }
1911 
1912 //---------------------------------------------------------
1914 {
1915  int iField;
1916 
1917  if( bSave )
1918  {
1919  CSG_MetaData *pNode = Entry.Add_Child("FIELDS");
1920 
1921  for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
1922  {
1923  CSG_MetaData *pEntry = pNode->Add_Child("FIELD", m_Table.Get_Field_Name(iField));
1924 
1925  pEntry->Set_Property("type", gSG_Data_Type_Identifier[m_Table.Get_Field_Type(iField)]);
1926  }
1927 
1928  pNode = Entry.Add_Child("RECORDS");
1929 
1930  for(sLong iRecord=0; iRecord<m_Table.Get_Count(); iRecord++)
1931  {
1932  CSG_MetaData *pEntry = pNode->Add_Child("RECORD");
1933 
1934  CSG_Table_Record *pRecord = m_Table.Get_Record(iRecord);
1935 
1936  for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
1937  {
1938  pEntry->Add_Child("FIELD", pRecord->asString(iField));
1939  }
1940  }
1941  }
1942  else
1943  {
1944  CSG_MetaData *pNode;
1945 
1946  if( (pNode = Entry("FIELDS")) == NULL )
1947  {
1948  return( false );
1949  }
1950 
1951  CSG_Table Table;
1952 
1953  for(iField=0; iField<pNode->Get_Children_Count(); iField++)
1954  {
1956 
1957  CSG_String s;
1958 
1959  if( pNode->Get_Child(iField)->Get_Property("type", s) )
1960  {
1961  type = SG_Data_Type_Get_Type(s);
1962  }
1963 
1964  Table.Add_Field(pNode->Get_Child(iField)->Get_Content(), type == SG_DATATYPE_Undefined ? SG_DATATYPE_String : type);
1965  }
1966 
1967  if( (pNode = Entry("RECORDS")) == NULL )
1968  {
1969  return( false );
1970  }
1971 
1972  for(int iRecord=0; iRecord<pNode->Get_Children_Count(); iRecord++)
1973  {
1974  CSG_MetaData *pEntry = pNode->Get_Child(iRecord);
1975 
1976  CSG_Table_Record *pRecord = Table.Add_Record();
1977 
1978  for(iField=0; iField<pEntry->Get_Children_Count(); iField++)
1979  {
1980  pRecord->Set_Value(iField, pEntry->Get_Child(iField)->Get_Content());
1981  }
1982  }
1983 
1984  return( m_Table.Assign_Values(&Table) );
1985  }
1986 
1987  return( true );
1988 }
1989 
1990 
1992 // //
1993 // Grid_System //
1994 // //
1996 
1997 //---------------------------------------------------------
1998 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)
1999  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2000 {
2001  // nop
2002 }
2003 
2004 //---------------------------------------------------------
2006 {
2007  CSG_Grid_System System;
2008 
2009  return( System.Create(Value) ? _Set_Value(&System) : SG_PARAMETER_DATA_SET_FALSE );
2010 }
2011 
2012 //---------------------------------------------------------
2014 {
2015  CSG_Grid_System System;
2016 
2017  if( Value != NULL )
2018  {
2019  System.Create(*((CSG_Grid_System *)Value));
2020  }
2021 
2022  if( m_System == System )
2023  {
2024  return( SG_PARAMETER_DATA_SET_TRUE );
2025  }
2026 
2027  m_System = System;
2028 
2029  //-----------------------------------------------------
2030  bool bCallback = Get_Parameters()->Set_Callback(false); // only update grid parameter objects in 1st loop...
2031 
2032  for(int i=0; i<Get_Children_Count(); i++)
2033  {
2034  CSG_Parameter *pParameter = Get_Child(i);
2035 
2036  if( pParameter->is_DataObject() )
2037  {
2038  CSG_Data_Object *pObject = pParameter->asDataObject();
2039 
2040  if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2041  {
2042  bool bInvalid = !m_System.is_Valid() || !(Get_Manager() && Get_Manager()->Exists(pObject));
2043 
2044  if( !bInvalid )
2045  {
2046  switch( pObject->Get_ObjectType() )
2047  {
2048  case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2049  case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2050  default: break;
2051  }
2052  }
2053 
2054  if( bInvalid )
2055  {
2056  pParameter->Set_Value(DATAOBJECT_NOTSET);
2057  }
2058  }
2059  }
2060 
2061  //-------------------------------------------------
2062  else if( pParameter->is_DataObject_List() )
2063  {
2064  CSG_Parameter_List *pList = pParameter->asList();
2065 
2066  if( !m_System.is_Valid() )
2067  {
2068  pList->Del_Items();
2069  }
2070  else for(int j=pList->Get_Item_Count()-1; j>=0; j--)
2071  {
2072  CSG_Data_Object *pObject = pList->Get_Item(j);
2073 
2074  bool bInvalid = !(Get_Manager() && Get_Manager()->Exists(pObject));
2075 
2076  if( !bInvalid && pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2077  {
2078  switch( pObject->Get_ObjectType() )
2079  {
2080  case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2081  case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2082  default: break;
2083  }
2084  }
2085 
2086  if( bInvalid )
2087  {
2088  pList->Del_Item(j);
2089  }
2090  }
2091  }
2092  }
2093 
2094  Get_Parameters()->Set_Callback(bCallback);
2095 
2096  if( bCallback ) // ...process On_Parameter_Changed()/On_Parameters_Enable() in a 2nd loop!
2097  {
2098  for(int i=0; i<Get_Children_Count(); i++)
2099  {
2100  CSG_Parameter *pParameter = Get_Child(i);
2101 
2102  if( pParameter->is_DataObject() || pParameter->is_DataObject_List() )
2103  {
2104  pParameter->has_Changed();
2105  }
2106  }
2107  }
2108 
2109  //-----------------------------------------------------
2111 }
2112 
2113 //---------------------------------------------------------
2115 {
2117 }
2118 
2119 //---------------------------------------------------------
2121 {
2122  return( (void *)&m_System );
2123 }
2124 
2125 //---------------------------------------------------------
2127 {
2128  m_System = ((CSG_Parameter_Grid_System *)pSource)->m_System;
2129 
2130  return( true );
2131 }
2132 
2133 //---------------------------------------------------------
2135 {
2136  if( bSave )
2137  {
2138  Entry.Add_Child("CELLSIZE", m_System.Get_Cellsize());
2139  Entry.Add_Child("XMIN" , m_System.Get_Extent().Get_XMin());
2140  Entry.Add_Child("YMIN" , m_System.Get_Extent().Get_YMin());
2141  Entry.Add_Child("XMAX" , m_System.Get_Extent().Get_XMax());
2142  Entry.Add_Child("YMAX" , m_System.Get_Extent().Get_YMax());
2143  }
2144  else
2145  {
2146  m_System.Create(
2147  Entry("CELLSIZE")->Get_Content().asDouble(),
2148  Entry("XMIN" )->Get_Content().asDouble(),
2149  Entry("YMIN" )->Get_Content().asDouble(),
2150  Entry("XMAX" )->Get_Content().asDouble(),
2151  Entry("YMAX" )->Get_Content().asDouble()
2152  );
2153  }
2154 
2155  return( true );
2156 }
2157 
2158 
2160 // //
2161 // Table Field //
2162 // //
2164 
2165 //---------------------------------------------------------
2166 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)
2167  : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
2168 {
2169  m_Default = -1;
2170  m_Value = -1;
2171 }
2172 
2173 //---------------------------------------------------------
2174 bool CSG_Parameter_Table_Field::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2175 {
2176  if( m_Default < 0 && is_Optional() )
2177  {
2179 
2181  _TL("Default"), _TL("default value if no attribute has been selected"),
2182  Value, Minimum, bMinimum, Maximum, bMaximum
2183  );
2184  }
2185 
2186  return( m_Default >= 0 );
2187 }
2188 
2189 //---------------------------------------------------------
2191 {
2192  CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2193 
2194  return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2195 }
2196 
2197 //---------------------------------------------------------
2199 {
2200  CSG_Table *pTable = Get_Table();
2201 
2202  if( pTable != NULL && pTable->Get_Field_Count() > 0 && Value >= 0 )
2203  {
2204  if( Value >= pTable->Get_Field_Count() )
2205  {
2206  Value = !is_Optional() ? pTable->Get_Field_Count() - 1 : -1;
2207  }
2208  }
2209  else
2210  {
2211  Value = -1;
2212  }
2213 
2214  if( Get_Child(m_Default) )
2215  {
2216  Get_Child(m_Default)->Set_Enabled(Value < 0);
2217  }
2218 
2219  if( m_Value != Value )
2220  {
2221  m_Value = Value;
2222 
2224  }
2225 
2226  return( SG_PARAMETER_DATA_SET_TRUE );
2227 }
2228 
2229 //---------------------------------------------------------
2231 {
2232  CSG_Table *pTable = Get_Table();
2233 
2234  if( pTable != NULL )
2235  {
2236  int Index;
2237 
2238  for(Index=0; Index<pTable->Get_Field_Count(); Index++)
2239  {
2240  if( !Value.CmpNoCase(pTable->Get_Field_Name(Index)) )
2241  {
2242  return( _Set_Value(Index) );
2243  }
2244  }
2245 
2246  if( Value.asInt(Index) )
2247  {
2248  return( _Set_Value(Index) );
2249  }
2250  }
2251 
2252  return( _Set_Value(-1) );
2253 }
2254 
2255 //---------------------------------------------------------
2257 {
2258  CSG_Table *pTable = Get_Table();
2259 
2260  if( !pTable || pTable->Get_Field_Count() < 1 )
2261  {
2262  m_String = _TL("<no attributes>");
2263  }
2264  else if( m_Value < 0 || m_Value >= pTable->Get_Field_Count() )
2265  {
2266  m_String = _TL("<not set>");
2267  }
2268  else
2269  {
2270  m_String = pTable->Get_Field_Name(m_Value);
2271  }
2272 }
2273 
2274 //---------------------------------------------------------
2276 {
2277  return( Get_Child(m_Default) ? Get_Child(m_Default)->asDouble() : 0. );
2278 }
2279 
2280 //---------------------------------------------------------
2282 {
2283  m_Value = ((CSG_Parameter_Table_Field *)pSource)->m_Value;
2284  m_Default = ((CSG_Parameter_Table_Field *)pSource)->m_Default;
2285 
2286  _Set_String();
2287 
2288  return( true );
2289 }
2290 
2291 //---------------------------------------------------------
2293 {
2294  if( bSave )
2295  {
2296  Entry.Set_Property("index", asInt());
2297  Entry.Set_Content(asString());
2298 
2299  return( true );
2300  }
2301  else
2302  {
2303  int Index;
2304 
2305  if( Entry.Get_Property("index", Index) ) // we require this check for backward compatibility, "index" was first introduced with SAGA 2.2.3 (r2671)
2306  {
2307  return( _Set_Value(Index) != 0 );
2308  }
2309 
2310  return( _Set_Value(Entry.Get_Content()) != 0 );
2311  }
2312 }
2313 
2314 //---------------------------------------------------------
2316 {
2317  CSG_String Choices;
2318 
2319  for(int i=0; i<Table.Get_Field_Count(); i++)
2320  {
2321  if( i > 0 ) { Choices += "|"; }
2322 
2323  Choices += Table.Get_Field_Name(i);
2324  }
2325 
2326  if( bAllowNone )
2327  {
2328  if( Table.Get_Field_Count() ) { Choices += "|"; }
2329 
2330  Choices += _TL("<not set>");
2331  }
2332 
2333  return( Choices );
2334 }
2335 
2336 
2338 // //
2339 // Table Fields //
2340 // //
2342 
2343 //---------------------------------------------------------
2344 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)
2345  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2346 {
2347  m_nFields = 0;
2348  m_Fields = NULL;
2349 }
2350 
2351 //---------------------------------------------------------
2353 {
2355 }
2356 
2357 //---------------------------------------------------------
2359 {
2360  CSG_Table *pTable = Get_Table();
2361 
2362  if( !pTable || pTable->Get_Field_Count() <= 0 )
2363  {
2365  m_nFields = 0;
2366  m_String = _TL("<no attributes>");
2367 
2369  }
2370 
2371  m_Fields = (int *)SG_Realloc(m_Fields, pTable->Get_Field_Count() * sizeof(int));
2372 
2373  memset(m_Fields, 0, pTable->Get_Field_Count() * sizeof(int));
2374 
2375  //-----------------------------------------------------
2376  int iField;
2377 
2378  CSG_String List(Value); List.Replace(";", ",");
2379 
2380  while( List.Length() > 0 )
2381  {
2382  CSG_String sValue = List.BeforeFirst(',');
2383 
2384  if( sValue.asInt(iField) && iField >= 0 && iField < pTable->Get_Field_Count() )
2385  {
2386  m_Fields[iField] = 1;
2387  }
2388  else if( sValue.Length() > 0 )
2389  {
2390  sValue.Trim();
2391 
2392  if( sValue[0] == '[' )
2393  {
2394  sValue = sValue.AfterFirst('[').BeforeLast(']');
2395  }
2396 
2397  for(iField=0; iField<pTable->Get_Field_Count(); iField++)
2398  {
2399  if( sValue.CmpNoCase(pTable->Get_Field_Name(iField)) == 0 )
2400  {
2401  m_Fields[iField] = 1;
2402 
2403  break;
2404  }
2405  }
2406  }
2407 
2408  List = List.AfterFirst(',');
2409  }
2410 
2411  //-----------------------------------------------------
2412  m_String.Clear();
2413 
2414  for(iField=0, m_nFields=0; iField<pTable->Get_Field_Count(); iField++)
2415  {
2416  if( m_Fields[iField] != 0 )
2417  {
2418  m_Fields[m_nFields++] = iField;
2419 
2420  m_String += CSG_String::Format(m_String.is_Empty() ? "%d" : ",%d", iField);
2421  }
2422  }
2423 
2424  if( m_nFields <= 0 )
2425  {
2426  m_String = _TL("<no attributes>");
2427  }
2428 
2430 }
2431 
2432 //---------------------------------------------------------
2434 {
2435  return( m_nFields );
2436 }
2437 
2438 //---------------------------------------------------------
2440 {
2441  return( m_Fields );
2442 }
2443 
2444 //---------------------------------------------------------
2446 {
2447  CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2448 
2449  return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2450 }
2451 
2452 //---------------------------------------------------------
2454 {
2455  return( _Set_Value(pSource->asString()) != 0 );
2456 }
2457 
2458 //---------------------------------------------------------
2460 {
2461  if( bSave )
2462  {
2463  Entry.Set_Content(m_String);
2464  }
2465  else
2466  {
2467  m_String = Entry.Get_Content();
2468  }
2469 
2470  return( true );
2471 }
2472 
2473 
2475 // //
2476 // DataObject //
2477 // //
2479 
2480 //---------------------------------------------------------
2481 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)
2482  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2483 {
2484  m_pDataObject = NULL;
2485 }
2486 
2487 //---------------------------------------------------------
2489 {
2490  return( is_Optional() || (m_pDataObject && m_pDataObject->is_Valid()) );
2491 }
2492 
2493 //---------------------------------------------------------
2495 {
2496  if( m_pDataObject != Value )
2497  {
2498  m_pDataObject = (CSG_Data_Object *)Value;
2499 
2501  }
2502 
2503  return( SG_PARAMETER_DATA_SET_TRUE );
2504 }
2505 
2506 //---------------------------------------------------------
2508 {
2510  {
2511  m_String = is_Output() && !is_Optional() ? _TL("<create>") : _TL("<not set>");
2512  }
2513  else if( m_pDataObject == DATAOBJECT_CREATE )
2514  {
2515  m_String = _TL("<create>");
2516  }
2517  else
2518  {
2520  }
2521 }
2522 
2523 //---------------------------------------------------------
2525 {
2526  return( m_pDataObject );
2527 }
2528 
2529 //---------------------------------------------------------
2531 {
2532  m_pDataObject = ((CSG_Parameter_Data_Object *)pSource)->m_pDataObject;
2533 
2534  return( true );
2535 }
2536 
2537 //---------------------------------------------------------
2539 {
2540  if( bSave )
2541  {
2543  {
2544  Entry.Set_Content("CREATE");
2545 
2546  return( true );
2547  }
2548 
2549  if( m_pDataObject == DATAOBJECT_NOTSET )//|| !SG_File_Exists(m_pDataObject->Get_File_Name(false)) )
2550  {
2551  Entry.Set_Content("NOT SET");
2552 
2553  return( true );
2554  }
2555 
2556  if( !m_pDataObject->Get_Owner() )
2557  {
2558  Entry.Set_Content(m_pDataObject->Get_File_Name(false));
2559 
2560  return( true );
2561  }
2562 
2564  {
2565  CSG_Grids *pGrids = m_pDataObject->Get_Owner()->asGrids();
2566 
2567  for(int i=0; i<pGrids->Get_NZ(); i++)
2568  {
2569  if( pGrids->Get_Grid_Ptr(i) == m_pDataObject )
2570  {
2572 
2573  Entry.Add_Property("index", i);
2574 
2575  return( true );
2576  }
2577  }
2578  }
2579  }
2580  else
2581  {
2582  CSG_Data_Object *pDataObject = NULL; int Index = -1;
2583 
2584  if( Entry.Cmp_Content("CREATE") )
2585  {
2587 
2588  return( true );
2589  }
2590 
2591  if( Entry.Cmp_Content("NOT SET") || !Get_Manager() || !(pDataObject = Get_Manager()->Find(Entry.Get_Content(), false)) )
2592  {
2594 
2595  return( true );
2596  }
2597 
2598  if( !Entry.Get_Property("index", Index) )
2599  {
2600  _Set_Value(pDataObject);
2601 
2602  return( true );
2603  }
2604 
2605  if( pDataObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_Grids )
2606  {
2607  _Set_Value(pDataObject->asGrids()->Get_Grid_Ptr(Index));
2608 
2609  return( true );
2610  }
2611  }
2612 
2613  return( false );
2614 }
2615 
2616 
2618 // //
2619 // DataObject_Output //
2620 // //
2622 
2623 //---------------------------------------------------------
2624 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)
2625  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2626 {
2628 }
2629 
2630 //---------------------------------------------------------
2632 {
2633  CSG_Data_Object *pDataObject = (CSG_Data_Object *)Value;
2634 
2635  if( m_pDataObject != pDataObject )
2636  {
2637  if( pDataObject == DATAOBJECT_NOTSET || pDataObject == DATAOBJECT_CREATE )
2638  {
2639  m_pDataObject = pDataObject;
2640  }
2641  else if( pDataObject->Get_ObjectType() == m_Type )
2642  {
2643  m_pDataObject = pDataObject;
2644 
2645  if( Get_Manager() )
2646  {
2648 
2649  if( Get_Manager() == &SG_Get_Data_Manager() ) // prevent that local data manager send their data objects to gui
2650  {
2652  }
2653  }
2654  }
2655 
2657  }
2658 
2659  return( SG_PARAMETER_DATA_SET_TRUE );
2660 }
2661 
2662 //---------------------------------------------------------
2664 {
2665  if( m_Type == SG_DATAOBJECT_TYPE_Undefined ) // m_Type should not be changed after set once!!!...
2666  {
2667  switch( Type )
2668  {
2673  case SG_DATAOBJECT_TYPE_TIN :
2675  m_Type = Type;
2676 
2677  return( true );
2678 
2679  default:
2680  return( false );
2681  }
2682  }
2683 
2684  return( false );
2685 }
2686 
2687 
2689 // //
2690 // Grid //
2691 // //
2693 
2694 //---------------------------------------------------------
2695 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)
2696  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2697 {
2699 }
2700 
2701 //---------------------------------------------------------
2703 {
2704  m_Type = Type;
2705 }
2706 
2707 //---------------------------------------------------------
2709 {
2710  return( Get_Parent() ? Get_Parent()->asGrid_System() : NULL );
2711 }
2712 
2713 //---------------------------------------------------------
2714 bool CSG_Parameter_Grid::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2715 {
2716  if( m_Default < 0 && is_Input() && is_Optional() )
2717  {
2719 
2721  _TL("Default"), _TL("default value if no grid has been selected"),
2722  Value, Minimum, bMinimum, Maximum, bMaximum
2723  );
2724  }
2725 
2726  return( m_Default >= 0 );
2727 }
2728 
2729 //---------------------------------------------------------
2731 {
2732  if( Value == m_pDataObject ) // nothing to do
2733  {
2734  return( SG_PARAMETER_DATA_SET_TRUE );
2735  }
2736 
2737  //-----------------------------------------------------
2738  if( Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE && Get_System() ) // check grid system compatibility
2739  {
2741  ? ((CSG_Grid *)Value)->Get_System()
2742  : ((CSG_Grids *)Value)->Get_System();
2743 
2744  if( System.is_Valid() == false )
2745  {
2746  if( is_Input() )
2747  {
2748  return( SG_PARAMETER_DATA_SET_FALSE );
2749  }
2750  }
2751  else if( !Get_System()->is_Equal(System) )
2752  {
2753  if( Get_System()->is_Valid() )
2754  {
2755  for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
2756  {
2757  CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
2758 
2759  if( pChild->is_Output() && !Get_Parameters()->has_GUI() )
2760  {
2761  continue;
2762  }
2763 
2764  if( pChild->Get_Type() == PARAMETER_TYPE_Grid
2765  || pChild->Get_Type() == PARAMETER_TYPE_Grids )
2766  {
2767  if( pChild->asDataObject() != DATAOBJECT_NOTSET
2768  && pChild->asDataObject() != DATAOBJECT_CREATE
2769  && pChild->asDataObject() != m_pDataObject
2770  && pChild->asDataObject() != Value )
2771  {
2772  return( SG_PARAMETER_DATA_SET_FALSE );
2773  }
2774  }
2775 
2776  if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
2777  {
2778  if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
2779  || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
2780  {
2781  return( SG_PARAMETER_DATA_SET_FALSE );
2782  }
2783  }
2784  }
2785  }
2786 
2787  Get_Parent()->Set_Value((void *)&System);
2788  }
2789  }
2790 
2791  //-----------------------------------------------------
2792  m_pDataObject = (CSG_Data_Object *)Value;
2793 
2794  if( Get_Child(m_Default) )
2795  {
2797  }
2798 
2800 }
2801 
2802 //---------------------------------------------------------
2804 {
2806 }
2807 
2808 //---------------------------------------------------------
2810 {
2812 }
2813 
2814 //---------------------------------------------------------
2816 {
2817  m_Type = ((CSG_Parameter_Grid *)pSource)->m_Type;
2818  m_Default = ((CSG_Parameter_Grid *)pSource)->m_Default;
2819 
2820  return( _Set_Value(pSource->asPointer()) != 0 );
2821 }
2822 
2823 
2825 // //
2826 // Grids //
2827 // //
2829 
2830 //---------------------------------------------------------
2831 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)
2832  : CSG_Parameter_Grid(pOwner, pParent, ID, Name, Description, Constraint)
2833 {
2834  // nop
2835 }
2836 
2837 
2839 // //
2840 // Table //
2841 // //
2843 
2844 //---------------------------------------------------------
2845 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)
2846  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2847 {
2848  // nop
2849 }
2850 
2851 //---------------------------------------------------------
2853 {
2854  if( m_pDataObject == Value )
2855  {
2856  return( SG_PARAMETER_DATA_SET_TRUE );
2857  }
2858 
2859  m_pDataObject = (CSG_Data_Object *)Value;
2860 
2861  for(int i=0; i<Get_Children_Count(); i++)
2862  {
2863  CSG_Parameter *pChild = Get_Child(i);
2864 
2865  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2866  {
2867  pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2868  }
2869  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2870  {
2871  pChild->Set_Value(CSG_String(""));
2872  }
2873  }
2874 
2876 }
2877 
2878 
2880 // //
2881 // Shapes //
2882 // //
2884 
2885 //---------------------------------------------------------
2886 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)
2887  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2888 {
2890 }
2891 
2892 //---------------------------------------------------------
2894 {
2895  if( (is_Input() || Get_Parameters()->has_GUI()) && Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE
2896  && m_Type != SHAPE_TYPE_Undefined && m_Type != ((CSG_Shapes *)Value)->Get_Type() )
2897  {
2898  return( SG_PARAMETER_DATA_SET_FALSE );
2899  }
2900 
2901  if( m_pDataObject == Value )
2902  {
2903  return( SG_PARAMETER_DATA_SET_TRUE );
2904  }
2905 
2906  m_pDataObject = (CSG_Data_Object *)Value;
2907 
2908  for(int i=0; i<Get_Children_Count(); i++)
2909  {
2910  CSG_Parameter *pChild = Get_Child(i);
2911 
2912  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2913  {
2914  pChild->Set_Value(m_pDataObject && m_pDataObject != DATAOBJECT_CREATE && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2915  }
2916  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2917  {
2918  pChild->Set_Value("");
2919  }
2920  }
2921 
2923 }
2924 
2925 //---------------------------------------------------------
2927 {
2928  m_Type = Type;
2929 }
2930 
2931 //---------------------------------------------------------
2933 {
2934  m_Type = ((CSG_Parameter_Shapes *)pSource)->m_Type;
2935 
2936  return( CSG_Parameter_Data_Object::_Assign(pSource) );
2937 }
2938 
2939 
2941 // //
2942 // TIN //
2943 // //
2945 
2946 //---------------------------------------------------------
2947 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)
2948  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2949 {
2950  // nop
2951 }
2952 
2953 //---------------------------------------------------------
2955 {
2956  if( m_pDataObject == Value )
2957  {
2958  return( SG_PARAMETER_DATA_SET_TRUE );
2959  }
2960 
2961  m_pDataObject = (CSG_Data_Object *)Value;
2962 
2963  for(int i=0; i<Get_Children_Count(); i++)
2964  {
2965  CSG_Parameter *pChild = Get_Child(i);
2966 
2967  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2968  {
2969  pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2970  }
2971  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2972  {
2973  pChild->Set_Value("");
2974  }
2975  }
2976 
2978 }
2979 
2980 
2982 // //
2983 // PointCloud //
2984 // //
2986 
2987 //---------------------------------------------------------
2988 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)
2989  : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2990 {
2991  // nop
2992 }
2993 
2994 //---------------------------------------------------------
2996 {
2997  if( m_pDataObject == Value )
2998  {
2999  return( SG_PARAMETER_DATA_SET_TRUE );
3000  }
3001 
3002  m_pDataObject = (CSG_Data_Object *)Value;
3003 
3004  for(int i=0; i<Get_Children_Count(); i++)
3005  {
3006  CSG_Parameter *pChild = Get_Child(i);
3007 
3008  if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
3009  {
3010  pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
3011  }
3012  else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
3013  {
3014  pChild->Set_Value("");
3015  }
3016  }
3017 
3019 }
3020 
3021 //---------------------------------------------------------
3023 {
3024  return( CSG_Parameter_Data_Object::_Assign(pSource) );
3025 }
3026 
3027 
3029 // //
3030 // List //
3031 // //
3033 
3034 //---------------------------------------------------------
3035 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)
3036  : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
3037 {
3038  // nop
3039 }
3040 
3041 //---------------------------------------------------------
3043 {
3044  if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE && m_Objects.Add(pObject) )
3045  {
3046  _Set_String();
3047 
3048  return( true );
3049  }
3050 
3051  return( false );
3052 }
3053 
3054 bool CSG_Parameter_List::Del_Item(CSG_Data_Object *pObject, bool bUpdateData)
3055 {
3056  if( m_Objects.Del(pObject) > 0 )
3057  {
3058  if( bUpdateData )
3059  {
3060  _Set_String();
3061  }
3062 
3063  return( true );
3064  }
3065 
3066  return( false );
3067 }
3068 
3069 bool CSG_Parameter_List::Del_Item(int Index, bool bUpdateData)
3070 {
3071  if( m_Objects.Del(Index) )
3072  {
3073  if( bUpdateData )
3074  {
3075  _Set_String();
3076  }
3077 
3078  return( true );
3079  }
3080 
3081  return( false );
3082 }
3083 
3085 {
3086  if( m_Objects.Set_Array(0) )
3087  {
3088  _Set_String();
3089 
3090  return( true );
3091  }
3092 
3093  return( false );
3094 }
3095 
3096 //---------------------------------------------------------
3098 {
3099  if( Value == NULL && Get_Item_Count() > 0 && Del_Items() )
3100  {
3102  }
3103 
3104  if( Value != NULL && Add_Item((CSG_Data_Object *)Value) )
3105  {
3107  }
3108 
3109  return( SG_PARAMETER_DATA_SET_TRUE );
3110 }
3111 
3112 //---------------------------------------------------------
3114 {
3115  if( Get_Item_Count() > 0 )
3116  {
3117  m_String.Printf("%d %s (", Get_Item_Count(), Get_Item_Count() == 1 ? _TL("object") : _TL("objects"));
3118 
3119  for(int i=0; i<Get_Item_Count(); i++)
3120  {
3121  if( i > 0 )
3122  {
3123  m_String += ", ";
3124  }
3125 
3126  m_String += Get_Item(i)->Get_Name();
3127  }
3128 
3129  m_String += ")";
3130  }
3131  else
3132  {
3133  m_String = _TL("No objects");
3134  }
3135 }
3136 
3137 //---------------------------------------------------------
3139 {
3140  return( Get_Item_Count() );
3141 }
3142 
3143 //---------------------------------------------------------
3145 {
3146  return( m_Objects.Get_Array() );
3147 }
3148 
3149 //---------------------------------------------------------
3151 {
3152  Del_Items();
3153 
3154  for(int i=0; i<((CSG_Parameter_List *)pSource)->Get_Item_Count(); i++)
3155  {
3157  {
3158  Add_Item(((CSG_Parameter_List *)pSource)->Get_Item(i));
3159  }
3160  }
3161 
3162  return( true );
3163 }
3164 
3165 //---------------------------------------------------------
3167 {
3168  if( bSave )
3169  {
3170  for(int i=0; i<Get_Item_Count(); i++)
3171  {
3172  CSG_String File = Get_Item(i)->Get_File_Name(false);
3173 
3174  if( File.BeforeFirst(':').Cmp("PGSQL") || SG_File_Exists(File) )
3175  {
3176  Entry.Add_Child("DATA", File);
3177  }
3178  }
3179  }
3180  else
3181  {
3182  Del_Items();
3183 
3184  for(int i=0; i<Entry.Get_Children_Count(); i++)
3185  {
3186  CSG_Data_Object *pObject = Get_Manager() ? Get_Manager()->Find(Entry.Get_Content(i), false) : NULL;
3187 
3188  if( pObject )
3189  {
3190  Add_Item(pObject);
3191  }
3192  }
3193  }
3194 
3195  return( true );
3196 }
3197 
3198 
3200 // //
3201 // Grid_List //
3202 // //
3204 
3205 //---------------------------------------------------------
3206 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)
3207  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3208 {
3209  // nop
3210 }
3211 
3212 //---------------------------------------------------------
3214 {
3216  {
3217  return( Get_Parent()->asGrid_System() );
3218  }
3219 
3220  return( NULL );
3221 }
3222 
3223 //---------------------------------------------------------
3225 {
3226  if( pObject == DATAOBJECT_NOTSET || pObject == DATAOBJECT_CREATE
3227  || (pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grid
3228  && pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids) )
3229  {
3230  return( false );
3231  }
3232 
3233  //-----------------------------------------------------
3234  if( Get_System() ) // check grid system compatibility
3235  {
3237  ? ((CSG_Grid *)pObject)->Get_System()
3238  : ((CSG_Grids *)pObject)->Get_System();
3239 
3240  if( System.is_Valid() == false && is_Input() )
3241  {
3242  return( false );
3243  }
3244 
3245  if( !Get_System()->is_Valid() )
3246  {
3247  Get_Parent()->Set_Value((void *)&System);
3248  }
3249  else if( !Get_System()->is_Equal(System) )
3250  {
3251  for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3252  {
3253  CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3254 
3255  if( pChild->Get_Type() == PARAMETER_TYPE_Grid
3256  || pChild->Get_Type() == PARAMETER_TYPE_Grids )
3257  {
3258  if( pChild->asDataObject() != DATAOBJECT_NOTSET
3259  && pChild->asDataObject() != DATAOBJECT_CREATE )
3260  {
3261  return( false );
3262  }
3263  }
3264 
3265  if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3266  {
3267  if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
3268  || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3269  {
3270  return( false );
3271  }
3272  }
3273  }
3274 
3275  Get_Parent()->Set_Value((void *)&System);
3276  }
3277  }
3278 
3279  return( CSG_Parameter_List::Add_Item(pObject) && Update_Data() );
3280 }
3281 
3282 //---------------------------------------------------------
3284 {
3285  return( CSG_Parameter_List::Del_Item(pItem, bUpdateData) );
3286 }
3287 
3288 //---------------------------------------------------------
3289 bool CSG_Parameter_Grid_List::Del_Item(int Index, bool bUpdateData)
3290 {
3291  return( CSG_Parameter_List::Del_Item(Index, bUpdateData) );
3292 }
3293 
3294 //---------------------------------------------------------
3296 {
3297  return( CSG_Parameter_List::Del_Items() && Update_Data() );
3298 }
3299 
3300 //---------------------------------------------------------
3302 {
3303  m_Grids.Set_Array(0);
3304 
3305  for(int i=0; i<Get_Item_Count(); i++)
3306  {
3307  switch( Get_Item(i)->Get_ObjectType() )
3308  {
3309  case SG_DATAOBJECT_TYPE_Grid: {
3310  m_Grids.Add(Get_Item(i));
3311  break; }
3312 
3313  case SG_DATAOBJECT_TYPE_Grids: {
3314  CSG_Grids *pGrids = (CSG_Grids *)Get_Item(i);
3315 
3316  for(int j=0; j<pGrids->Get_Grid_Count(); j++)
3317  {
3318  m_Grids.Add(pGrids->Get_Grid_Ptr(j));
3319  }
3320  break; }
3321 
3322  default: {
3323  break; }
3324  }
3325  }
3326 
3327  if( !m_Grids.Get_Size() && !Get_Parameters()->has_GUI() )
3328  {
3330  {
3332  }
3333  }
3334 
3335  return( true );
3336 }
3337 
3338 
3340 // //
3341 // Grids_List //
3342 // //
3344 
3345 //---------------------------------------------------------
3346 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)
3347  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3348 {
3349  // nop
3350 }
3351 
3352 //---------------------------------------------------------
3354 {
3356  {
3357  return( Get_Parent()->asGrid_System() );
3358  }
3359 
3360  return( NULL );
3361 }
3362 
3363 //---------------------------------------------------------
3365 {
3366  if( pObject == NULL || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids )
3367  {
3368  return( false );
3369  }
3370 
3371  //-----------------------------------------------------
3372  CSG_Grid_System *pSystem = Get_System();
3373 
3374  if( pSystem ) // check grid system compatibility
3375  {
3377  ? ((CSG_Grid *)pObject)->Get_System()
3378  : ((CSG_Grids *)pObject)->Get_System();
3379 
3380  if( !pSystem->is_Valid() )
3381  {
3382  Get_Parent()->Set_Value((void *)&System);
3383  }
3384  else if( !pSystem->is_Equal(System) )
3385  {
3386  for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3387  {
3388  CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3389 
3390  if( pChild->Get_Type() == PARAMETER_TYPE_Grids )
3391  {
3392  if( pChild->asDataObject() != DATAOBJECT_NOTSET
3393  && pChild->asDataObject() != DATAOBJECT_CREATE )
3394  {
3395  return( false );
3396  }
3397  }
3398 
3399  if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3400  {
3401  if( (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3402  {
3403  return( false );
3404  }
3405  }
3406  }
3407 
3408  Get_Parent()->Set_Value((void *)&System);
3409  }
3410  }
3411 
3412  return( CSG_Parameter_List::Add_Item(pObject) );
3413 }
3414 
3415 
3417 // //
3418 // Table_List //
3419 // //
3421 
3422 
3423 //---------------------------------------------------------
3424 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)
3425  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3426 {
3427  // nop
3428 }
3429 
3430 
3432 // //
3433 // Shapes_List //
3434 // //
3436 
3437 
3438 //---------------------------------------------------------
3439 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)
3440  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3441 {
3443 }
3444 
3445 //---------------------------------------------------------
3447 {
3448  m_Type = Type;
3449 }
3450 
3451 //---------------------------------------------------------
3453 {
3454  m_Type = ((CSG_Parameter_Shapes_List *)pSource)->m_Type;
3455 
3456  return( CSG_Parameter_List::_Assign(pSource) );
3457 }
3458 
3459 
3461 // //
3462 // TIN_List //
3463 // //
3465 
3466 
3467 //---------------------------------------------------------
3468 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)
3469  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3470 {
3471  // nop
3472 }
3473 
3474 
3476 // //
3477 // PointCloud_List //
3478 // //
3480 
3481 
3482 //---------------------------------------------------------
3483 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)
3484  : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3485 {
3486  // nop
3487 }
3488 
3489 
3491 // //
3492 // Parameters //
3493 // //
3495 
3496 //---------------------------------------------------------
3497 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)
3498  : CSG_Parameter(pParameters, pParent, ID, Name, Description, Constraint)
3499 {
3500  m_pParameters = new CSG_Parameters(pParameters->Get_Owner(), Name, Description, ID);
3501 }
3502 
3504 {
3505  delete(m_pParameters);
3506 }
3507 
3508 //---------------------------------------------------------
3510 {
3511  return( m_pParameters->Restore_Defaults() );
3512 }
3513 
3514 //---------------------------------------------------------
3516 {
3517  m_String.Printf("%d %s", m_pParameters->Get_Count(), _TL("parameters"));
3518 }
3519 
3520 //---------------------------------------------------------
3522 {
3523  return( m_pParameters );
3524 }
3525 
3526 //---------------------------------------------------------
3528 {
3529  m_pParameters->Assign(pSource->asParameters());
3530 
3531  return( true );
3532 }
3533 
3534 //---------------------------------------------------------
3536 {
3537  if( m_pParameters->Serialize(Entry, bSave) )
3538  {
3539  if( bSave )
3540  {
3541  Entry.Set_Property("id" , Get_Identifier ());
3542  Entry.Set_Property("type", Get_Type_Identifier());
3543  }
3544 
3545  return( true );
3546  }
3547 
3548  return( false );
3549 }
3550 
3551 
3553 // //
3554 // //
3555 // //
3557 
3558 //---------------------------------------------------------
CSG_Parameter::asColors
CSG_Colors * asColors(void) const
Definition: parameter.cpp:1050
CSG_Parameter_Grid_System::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:2120
CSG_Parameter::asGridsList
class CSG_Parameter_Grids_List * asGridsList(void) const
Definition: parameter.cpp:1156
CSG_Parameter_Grids_List::Get_System
CSG_Grid_System * Get_System(void) const
Definition: parameter_data.cpp:3353
CSG_Parameter_Grid_System::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:2005
CSG_String::BeforeFirst
CSG_String BeforeFirst(char Character) const
Definition: api_string.cpp:713
CSG_Parameter_Data_Object
Definition: parameters.h:1143
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:1545
CSG_Parameter_Date
Definition: parameters.h:577
SG_DATATYPE_Color
@ SG_DATATYPE_Color
Definition: api_core.h:1011
SG_DATATYPE_Int
@ SG_DATATYPE_Int
Definition: api_core.h:1004
CSG_Parameter::Set_Value
virtual bool Set_Value(int Value)
Definition: parameter.cpp:814
CSG_Parameter_Range::Set_Min
bool Set_Min(double Min)
Definition: parameter_data.cpp:804
CSG_Parameter_List::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:3144
CSG_Parameter_Grid::m_Type
TSG_Data_Type m_Type
Definition: parameters.h:1224
CSG_Parameter::asPointer
void * asPointer(void) const
Definition: parameters.h:290
PARAMETER_TYPE_Double
@ PARAMETER_TYPE_Double
Definition: parameters.h:128
CSG_Parameter_File_Name::Get_Filter
const SG_Char * Get_Filter(void) const
Definition: parameter_data.cpp:1555
CSG_Parameter_Fixed_Table::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:1901
CSG_Parameter_Bool::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:298
PARAMETER_TYPE_FilePath
@ PARAMETER_TYPE_FilePath
Definition: parameters.h:137
SG_DATATYPE_Undefined
@ SG_DATATYPE_Undefined
Definition: api_core.h:1013
PARAMETER_TYPE_Degree
@ PARAMETER_TYPE_Degree
Definition: parameters.h:129
CSG_Parameter_String::is_Valid
virtual bool is_Valid(void) const
Definition: parameter_data.cpp:1456
SG_GET_RGB
#define SG_GET_RGB(r, g, b)
Definition: api_core.h:1297
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:1039
CSG_Parameter_Choice::Set_Items
bool Set_Items(const SG_Char *String)
Definition: parameter_data.cpp:936
CSG_Parameter_File_Name::Get_FilePaths
bool Get_FilePaths(CSG_Strings &FilePaths) const
Definition: parameter_data.cpp:1577
CSG_Parameter_Grid
Definition: parameters.h:1205
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:1568
CSG_Table::Get_Field_Type
TSG_Data_Type Get_Field_Type(int Field) const
Definition: table.h:363
CSG_Grid_System::Get_Cellsize
double Get_Cellsize(void) const
Definition: grid.h:255
SG_DATATYPE_String
@ SG_DATATYPE_String
Definition: api_core.h:1009
_TL
#define _TL(s)
Definition: api_core.h:1559
SG_DATATYPE_DWord
@ SG_DATATYPE_DWord
Definition: api_core.h:1003
CSG_Parameter_Grid_System::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:2114
SG_DATATYPE_Binary
@ SG_DATATYPE_Binary
Definition: api_core.h:1012
CSG_Parameter_List::Add_Item
virtual bool Add_Item(CSG_Data_Object *pItem)
Definition: parameter_data.cpp:3042
SG_GET_B
#define SG_GET_B(rgb)
Definition: api_core.h:1302
CSG_Parameter_Table_Fields::Get_Table
CSG_Table * Get_Table(void) const
Definition: parameter_data.cpp:2445
CSG_Parameter_Choice::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1097
CSG_Parameter::Set_Collapsed
bool Set_Collapsed(bool bOn=true)
Definition: parameter.cpp:140
CSG_Parameter_Data_Object_Output::Set_DataObject_Type
bool Set_DataObject_Type(TSG_Data_Object_Type Type)
Definition: parameter_data.cpp:2663
PARAMETER_TYPE_Table_Fields
@ PARAMETER_TYPE_Table_Fields
Definition: parameters.h:146
CSG_String::Length
size_t Length(void) const
Definition: api_string.cpp:172
CSG_Parameter::m_String
CSG_String m_String
Definition: parameters.h:336
CSG_Parameter_Parameters::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:3535
CSG_Parameter_Range::m_pMax
CSG_Parameter_Double * m_pMax
Definition: parameters.h:644
CSG_Parameter_Data_Object::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2494
SG_DATATYPES_Undefined
#define SG_DATATYPES_Undefined
Definition: api_core.h:1018
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:3022
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:1816
CSG_Parameter_Table_Fields::m_nFields
int m_nFields
Definition: parameters.h:1121
CSG_Parameter_Range::Get_Max
double Get_Max(void) const
Definition: parameter_data.cpp:834
CSG_Parameter_Data_Object_Output::m_Type
TSG_Data_Object_Type m_Type
Definition: parameters.h:1189
CSG_Parameter_Grids_List::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1452
CSG_MetaData::Get_Children_Count
int Get_Children_Count(void) const
Definition: metadata.h:148
CSG_Parameter::Get_Identifier
const SG_Char * Get_Identifier(void) const
Definition: parameter.cpp:562
CSG_Parameter::asInt
int asInt(void) const
Definition: parameters.h:286
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:124
CSG_Parameter::asString
const SG_Char * asString(void) const
Definition: parameters.h:289
SG_Degree_To_Double
SAGA_API_DLL_EXPORT double SG_Degree_To_Double(const CSG_String &String)
Definition: api_string.cpp:1273
CSG_Parameter::asTable
CSG_Table * asTable(void) const
Definition: parameter.cpp:1102
CSG_MetaData::Get_Content
const CSG_String & Get_Content(void) const
Definition: metadata.h:133
CSG_Parameter_Fixed_Table::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:1884
CSG_Parameters::Get_Owner
void * Get_Owner(void) const
Definition: parameters.h:1716
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:1449
CSG_MetaData::Set_Content
void Set_Content(const CSG_String &Content)
Definition: metadata.h:140
CSG_Parameter_Choice::Add_Item
bool Add_Item(const CSG_String &Item, const CSG_String &Data="")
Definition: parameter_data.cpp:920
CSG_Parameter_Choices::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:1294
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:3439
CSG_Parameter_String::is_Password
bool is_Password(void) const
Definition: parameter_data.cpp:1468
data_manager.h
CSG_Parameter_List::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:3097
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:506
CSG_Parameter_Grid_System::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2126
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:1439
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:893
CSG_Parameter_Choices::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:1274
CSG_Parameter_Table_Field::m_Default
int m_Default
Definition: parameters.h:1079
PARAMETER_TYPE_Grids_List
@ PARAMETER_TYPE_Grids_List
Definition: parameters.h:156
PARAMETER_TYPE_String
@ PARAMETER_TYPE_String
Definition: parameters.h:135
CSG_Grid_System
Definition: grid.h:220
CSG_String::asInt
int asInt(void) const
Definition: api_string.cpp:769
CSG_Table::Get_Record
virtual CSG_Table_Record * Get_Record(sLong Index) const
Definition: table.h:402
PARAMETER_TYPE_Int
@ PARAMETER_TYPE_Int
Definition: parameters.h:127
CSG_Parameter_Parameters::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:3521
CSG_Parameter_Shapes_List::m_Type
TSG_Shape_Type m_Type
Definition: parameters.h:1514
CSG_Parameter_Grid::_asDouble
virtual double _asDouble(void) const
Definition: parameter_data.cpp:2809
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:3468
CSG_Parameter_Parameters::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter_data.cpp:3509
CSG_Parameter_List::Get_Item
CSG_Data_Object * Get_Item(int Index) const
Definition: parameters.h:1379
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:2988
CSG_Grids::Get_Grid_Count
int Get_Grid_Count(void) const
Definition: grids.h:252
CSG_Parameter_Choice::Del_Items
bool Del_Items(void)
Definition: parameter_data.cpp:912
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:1042
CSG_Parameter_Range::m_pMin
CSG_Parameter_Double * m_pMin
Definition: parameters.h:644
CSG_Parameter_Font::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:1677
CSG_Parameter::is_Input
bool is_Input(void) const
Definition: parameters.h:236
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:1683
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:1736
SG_DATATYPE_Byte
@ SG_DATATYPE_Byte
Definition: api_core.h:999
CSG_Parameter_Fixed_Table::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1907
PARAMETER_TYPE_TIN
@ PARAMETER_TYPE_TIN
Definition: parameters.h:153
CSG_Parameter_Colors::m_Colors
CSG_Colors m_Colors
Definition: parameters.h:972
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:1532
CSG_Parameter_Choice::Toggle_Value
virtual bool Toggle_Value(void)
Definition: parameter_data.cpp:906
CSG_Parameter_Shapes::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2893
CSG_Parameter_String::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:1474
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:2166
CSG_Parameter_Data_Object::m_pDataObject
CSG_Data_Object * m_pDataObject
Definition: parameters.h:1153
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:1037
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:1810
CSG_Grid_System::Create
bool Create(const CSG_Grid_System &System, int Precision=-1)
Definition: grid_system.cpp:146
CSG_Parameter_Choices::Get_Item_Count
int Get_Item_Count(void) const
Definition: parameters.h:764
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:3497
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:2198
PARAMETER_TYPE_FixedTable
@ PARAMETER_TYPE_FixedTable
Definition: parameters.h:142
CSG_Parameter_Bool::is_Default
virtual bool is_Default(void) const
Definition: parameter_data.cpp:238
CSG_Parameter_Table_Field
Definition: parameters.h:1063
CSG_Parameter_Table::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2852
CSG_Table::Get_Field_Count
int Get_Field_Count(void) const
Definition: table.h:361
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:885
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:1080
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:1789
CSG_Parameter::Assign
bool Assign(CSG_Parameter *pSource)
Definition: parameter.cpp:1180
CSG_Parameter_Value
Definition: parameters.h:440
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:3206
CSG_Parameter_Table_Field::Add_Default
bool Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
Definition: parameter_data.cpp:2174
CSG_MetaData::Get_Child
CSG_MetaData * Get_Child(int Index) const
Definition: metadata.h:149
CSG_Parameter_Parameters::CSG_Parameters
friend class CSG_Parameters
Definition: parameters.h:1600
CSG_Parameter_String::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1487
CSG_Colors::Set_Blue
bool Set_Blue(int Index, int Value)
Definition: api_colors.cpp:333
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:148
CSG_Colors::Get_Red
long Get_Red(int Index) const
Definition: api_core.h:1437
CSG_Parameter_List::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:3150
CSG_Parameter_Choice::Get_Data
CSG_String Get_Data(void) const
Definition: parameter_data.cpp:1015
CSG_Parameter_Table_Field::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:2256
CSG_Parameter_Data_Type::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1248
CSG_Parameter_Data_Object::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2538
CSG_Parameter::asValue
class CSG_Parameter_Value * asValue(void) const
Definition: parameter.cpp:1130
CSG_Parameter_Font
Definition: parameters.h:901
CSG_Parameter_Color::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:1743
CSG_Parameter_Grid_List::Del_Items
virtual bool Del_Items(void)
Definition: parameter_data.cpp:3295
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:697
CSG_Parameter::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter.cpp:808
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:1356
CSG_Parameter_Grid_List::m_Grids
CSG_Array_Pointer m_Grids
Definition: parameters.h:1437
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:158
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:1155
PARAMETER_TYPE_Grids
@ PARAMETER_TYPE_Grids
Definition: parameters.h:150
CSG_Parameter_Font::m_Color
int m_Color
Definition: parameters.h:913
SG_GET_R
#define SG_GET_R(rgb)
Definition: api_core.h:1300
CSG_Parameter_Range::m_pRange
CSG_Parameters * m_pRange
Definition: parameters.h:642
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:724
CSG_Parameter_Date::m_Date
CSG_DateTime m_Date
Definition: parameters.h:590
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:1040
CSG_Parameter_Data_Object::is_Valid
virtual bool is_Valid(void) const
Definition: parameter_data.cpp:2488
CSG_Parameter_Data_Type::Set_Data_Type
bool Set_Data_Type(TSG_Data_Type Value)
Definition: parameter_data.cpp:1218
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:2624
CSG_Colors::Get_Predefined_Count
static int Get_Predefined_Count(void)
Definition: api_colors.cpp:426
CSG_Parameter::is_DataObject_List
bool is_DataObject_List(void) const
Definition: parameter.cpp:310
CSG_Parameter_File_Name::Set_Flag_Multiple
void Set_Flag_Multiple(bool bFlag)
Definition: parameter_data.cpp:1566
PARAMETER_TYPE_Choices
@ PARAMETER_TYPE_Choices
Definition: parameters.h:134
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:132
CSG_Parameter_Shapes
Definition: parameters.h:1289
CSG_Parameter_List::Del_Items
virtual bool Del_Items(void)
Definition: parameter_data.cpp:3084
CSG_Parameter_Colors::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:1822
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:1629
SG_File_Exists
SAGA_API_DLL_EXPORT bool SG_File_Exists(const CSG_String &FileName)
Definition: api_file.cpp:1078
CSG_Grid_System::Get_Name
const SG_Char * Get_Name(bool bShort=true)
Definition: grid_system.cpp:311
CSG_Strings::Clear
void Clear(void)
Definition: api_core.h:736
PARAMETER_TYPE_Colors
@ PARAMETER_TYPE_Colors
Definition: parameters.h:141
SG_DATATYPE_Long
@ SG_DATATYPE_Long
Definition: api_core.h:1006
CSG_Colors::Get_Count
int Get_Count(void) const
Definition: api_core.h:1424
CSG_Parameter_File_Name::Set_Flag_Save
void Set_Flag_Save(bool bFlag)
Definition: parameter_data.cpp:1561
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:1518
CSG_Parameter_Table_Field::Get_Choices
static CSG_String Get_Choices(const class CSG_Table &Table, bool bAllowNone=false)
Definition: parameter_data.cpp:2315
CSG_Parameter_Table_Fields::m_Fields
int * m_Fields
Definition: parameters.h:1121
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:1135
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:208
CSG_Parameter_Table_Fields::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:2358
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:2947
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:507
CSG_Parameter_Grid_System
Definition: parameters.h:1029
PARAMETER_TYPE_Undefined
@ PARAMETER_TYPE_Undefined
Definition: parameters.h:166
CSG_String::Trim
int Trim(bool fromRight=false)
Definition: api_string.cpp:637
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:151
CSG_Strings::Add
bool Add(const CSG_Strings &Strings)
Definition: api_string.cpp:1069
PARAMETER_TYPE_Bool
@ PARAMETER_TYPE_Bool
Definition: parameters.h:126
CSG_Parameter_Font::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1698
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:1731
SG_PARAMETER_DATA_SET_CHANGED
#define SG_PARAMETER_DATA_SET_CHANGED
Definition: parameters.h:197
CSG_Parameters::Restore_Defaults
bool Restore_Defaults(bool bClearData=false)
Definition: parameters.cpp:1513
SG_GET_G
#define SG_GET_G(rgb)
Definition: api_core.h:1301
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:393
PARAMETER_TYPE_Table_Field
@ PARAMETER_TYPE_Table_Field
Definition: parameters.h:145
CSG_Colors::Set_Red
bool Set_Red(int Index, int Value)
Definition: api_colors.cpp:321
CSG_Parameter::Set_Default
bool Set_Default(int Value)
Definition: parameter.cpp:920
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:1151
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:1998
CSG_Parameter_Fixed_Table::m_Table
CSG_Table m_Table
Definition: parameters.h:1006
CSG_Parameter_Grids_List::Add_Item
virtual bool Add_Item(CSG_Data_Object *pItem)
Definition: parameter_data.cpp:3364
CSG_Parameter_List::Del_Item
virtual bool Del_Item(CSG_Data_Object *pItem, bool bUpdateData=true)
Definition: parameter_data.cpp:3054
PARAMETER_TYPE_Choice
@ PARAMETER_TYPE_Choice
Definition: parameters.h:133
CSG_Parameter_File_Name
Definition: parameters.h:859
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:2481
CSG_Parameter_Parameters::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:3527
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:1052
CSG_Parameter_Shapes_List::Set_Shape_Type
void Set_Shape_Type(TSG_Shape_Type Type)
Definition: parameter_data.cpp:3446
SG_DATATYPES_Bit
#define SG_DATATYPES_Bit
Definition: api_core.h:1019
CSG_Parameter_Range::~CSG_Parameter_Range
virtual ~CSG_Parameter_Range(void)
Definition: parameter_data.cpp:765
CSG_Parameter_Font::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:1649
CSG_Table::Get_Field_Name
const SG_Char * Get_Field_Name(int Field) const
Definition: table.h:362
CSG_Parameter_Shapes::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2932
CSG_Parameter_Grid::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2730
sLong
signed long long sLong
Definition: api_core.h:158
CSG_Parameter_Choice::Get_Count
int Get_Count(void) const
Definition: parameters.h:688
SG_UI_DataObject_Add
bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
Definition: api_callback.cpp:607
CSG_Parameter_File_Name::Set_Filter
void Set_Filter(const SG_Char *Filter)
Definition: parameter_data.cpp:1543
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:1302
CSG_Parameter_Table_Field::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2292
CSG_Parameter_Range::is_Default
virtual bool is_Default(void) const
Definition: parameter_data.cpp:840
CSG_Parameter::Get_Child
CSG_Parameter * Get_Child(int iChild) const
Definition: parameters.h:260
CSG_Parameter_File_Name::m_bMultiple
bool m_bMultiple
Definition: parameters.h:883
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:263
CSG_Colors::Set_Green
bool Set_Green(int Index, int Value)
Definition: api_colors.cpp:327
CSG_Table::Get_Count
sLong Get_Count(void) const
Definition: table.h:400
CSG_Grid_System::Destroy
bool Destroy(void)
Definition: grid_system.cpp:270
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:1007
CSG_Parameter_Data_Type::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1254
CSG_Colors::Set_Count
bool Set_Count(int nColors)
Definition: api_colors.cpp:255
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:195
PARAMETER_TYPE_Grid
@ PARAMETER_TYPE_Grid
Definition: parameters.h:149
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:2344
CSG_Parameter_Range::Set_Range
bool Set_Range(double Min, double Max)
Definition: parameter_data.cpp:785
CSG_Table::Assign_Values
bool Assign_Values(const CSG_Table &Table)
Definition: table.cpp:378
SG_Get_Significant_Decimals
SAGA_API_DLL_EXPORT int SG_Get_Significant_Decimals(double Value, int maxDecimals=6)
Definition: api_string.cpp:1303
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:1597
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:130
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:458
CSG_Parameter_Choices::m_Items
CSG_Strings m_Items[2]
Definition: parameters.h:782
PARAMETER_TYPE_Grid_List
@ PARAMETER_TYPE_Grid_List
Definition: parameters.h:155
CSG_Parameter_Value::m_Maximum
double m_Maximum
Definition: parameters.h:460
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:2845
CSG_Parameter_Colors::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1828
CSG_Parameter_Choices::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1416
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:1877
CSG_Parameter::is_Optional
bool is_Optional(void) const
Definition: parameters.h:238
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:900
SG_DATATYPES_Standard
#define SG_DATATYPES_Standard
Definition: api_core.h:1034
CSG_Parameter_Font::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter_data.cpp:1636
CSG_Strings
Definition: api_core.h:701
CSG_DateTime
Definition: datetime.h:183
CSG_Parameter_Choices::Del_Items
void Del_Items(void)
Definition: parameter_data.cpp:1347
SG_DATATYPE_Date
@ SG_DATATYPE_Date
Definition: api_core.h:1010
SG_DATATYPE_Word
@ SG_DATATYPE_Word
Definition: api_core.h:1001
SG_DATAOBJECT_TYPE_Grid
@ SG_DATAOBJECT_TYPE_Grid
Definition: dataobject.h:118
CSG_String::Replace
size_t Replace(const CSG_String &Old, const CSG_String &New, bool bReplaceAll=true)
Definition: api_string.cpp:563
CSG_Parameter_Range::_Set_Value
virtual int _Set_Value(const CSG_String &Value)
Definition: parameter_data.cpp:780
CSG_Parameter::asFilePath
class CSG_Parameter_File_Name * asFilePath(void) const
Definition: parameter.cpp:1150
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:196
CSG_Parameter_Table_Field::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2281
CSG_Parameter_Grid::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:2803
CSG_Parameter_Grid::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:2815
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:1608
CSG_Parameter::is_Output
bool is_Output(void) const
Definition: parameters.h:237
CSG_Parameter_Choice::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:1091
parameters.h
CSG_Parameter_Data_Object_Output::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2631
CSG_Parameter_Grid_List::Get_System
CSG_Grid_System * Get_System(void) const
Definition: parameter_data.cpp:3213
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:1039
CSG_Parameter_List::Get_Item_Count
int Get_Item_Count(void) const
Definition: parameters.h:1378
CSG_Parameter_Shapes_List
Definition: parameters.h:1499
CSG_Parameter_Shapes::Set_Shape_Type
void Set_Shape_Type(TSG_Shape_Type Type)
Definition: parameter_data.cpp:2926
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:2831
CSG_Parameter_Data_Object::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:2507
CSG_Parameter_Font::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:1689
CSG_Parameter_Double::m_Value
double m_Value
Definition: parameters.h:526
CSG_Parameter_Date::Set_Date
void Set_Date(const CSG_DateTime &Date)
Definition: parameter_data.cpp:710
CSG_Parameter_Int
Definition: parameters.h:476
CSG_Parameter_String::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1496
CSG_Table::Add_Field
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
Definition: table.cpp:479
gSG_Data_Type_Identifier
const char gSG_Data_Type_Identifier[][32]
Definition: api_core.h:1043
CSG_Table
Definition: table.h:285
CSG_Parameter_Choice::m_Data
CSG_Strings m_Data
Definition: parameters.h:697
SG_Double_To_Degree
SAGA_API_DLL_EXPORT CSG_String SG_Double_To_Degree(double Value)
Definition: api_string.cpp:1253
SG_DATAOBJECT_TYPE_Shapes
@ SG_DATAOBJECT_TYPE_Shapes
Definition: dataobject.h:121
CSG_Parameter_String::m_bPassword
bool m_bPassword
Definition: parameters.h:820
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:2886
CSG_Parameter_Range::Set_Max
bool Set_Max(double Max)
Definition: parameter_data.cpp:822
CSG_Parameter_File_Name::m_bDirectory
bool m_bDirectory
Definition: parameters.h:883
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:691
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:944
CSG_Parameter::Get_Children_Count
int Get_Children_Count(void) const
Definition: parameters.h:259
CSG_Parameter_Choice::Get_Item
const SG_Char * Get_Item(int Index) const
Definition: parameter_data.cpp:994
CSG_Parameter_Grid::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1208
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:846
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:1109
CSG_Parameter::is_DataObject
bool is_DataObject(void) const
Definition: parameter.cpp:291
CSG_Parameter_Double
Definition: parameters.h:514
CSG_Parameter_Range::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:861
CSG_Grid_System::Get_Extent
const CSG_Rect & Get_Extent(bool bCells=false) const
Definition: grid.h:262
CSG_Parameter_Table_Field::_asDouble
virtual double _asDouble(void) const
Definition: parameter_data.cpp:2275
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:1240
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:3515
CSG_Parameter_List::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:3166
CSG_Parameter_Grid::Add_Default
bool Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
Definition: parameter_data.cpp:2714
CSG_String
Definition: api_core.h:563
CSG_Parameter_Choices::Clr_Selection
bool Clr_Selection(void)
Definition: parameter_data.cpp:1408
CSG_Parameter_List::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:3138
CSG_Parameter_Parameters::m_pParameters
CSG_Parameters * m_pParameters
Definition: parameters.h:1589
CSG_Parameter::asChoice
class CSG_Parameter_Choice * asChoice(void) const
Definition: parameter.cpp:1146
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:2530
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:2190
CSG_Colors::Get_Green
long Get_Green(int Index) const
Definition: api_core.h:1438
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:883
CSG_Parameters::Serialize
bool Serialize(CSG_MetaData &Data, bool bSave)
Definition: parameters.h:1883
CSG_Parameter_Colors::_Set_Value
virtual int _Set_Value(int Value)
Definition: parameter_data.cpp:1796
CSG_Parameter_String
Definition: parameters.h:805
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:1763
CSG_Parameter_Choice::m_Value
int m_Value
Definition: parameters.h:695
CSG_Parameter_Grid_List::Add_Item
virtual bool Add_Item(CSG_Data_Object *pItem)
Definition: parameter_data.cpp:3224
CSG_Parameter_Shapes::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1292
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:784
CSG_Parameter_Grid_List::Update_Data
virtual bool Update_Data(void)
Definition: parameter_data.cpp:3301
CSG_Parameter_TIN::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2954
CSG_Parameter::has_Changed
bool has_Changed(int Check_Flags=PARAMETER_CHECK_ALL)
Definition: parameter.cpp:901
CSG_Parameter_Date::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:698
CSG_Parameter::asDouble
double asDouble(void) const
Definition: parameters.h:288
CSG_Parameter_Choices::Select
bool Select(int Index, bool bSelect=true)
Definition: parameter_data.cpp:1377
CSG_Parameter_Table_Fields::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:2439
PARAMETER_TYPE_Grid_System
@ PARAMETER_TYPE_Grid_System
Definition: parameters.h:144
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:1571
CSG_DateTime::Set
CSG_DateTime & Set(const CSG_DateTime &DateTime)
Definition: datetime.cpp:131
SG_DATATYPE_Short
@ SG_DATATYPE_Short
Definition: api_core.h:1002
PARAMETER_TYPE_PointCloud_List
@ PARAMETER_TYPE_PointCloud_List
Definition: parameters.h:160
CSG_Parameter_PointCloud::_Set_Value
virtual int _Set_Value(void *Value)
Definition: parameter_data.cpp:2995
CSG_Rect::Get_YMax
double Get_YMax(void) const
Definition: geo_tools.h:508
CSG_Parameter_Grid::m_Default
int m_Default
Definition: parameters.h:1222
CSG_Parameter_Grid_List::Get_Type
virtual TSG_Parameter_Type Get_Type(void) const
Definition: parameters.h:1418
CSG_Parameter_Choices::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1427
CSG_Parameter_Fixed_Table::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:1895
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:2695
CSG_Rect::Get_XMin
double Get_XMin(void) const
Definition: geo_tools.h:505
PARAMETER_TYPE_Table_List
@ PARAMETER_TYPE_Table_List
Definition: parameters.h:157
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:1149
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:501
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:998
CSG_Parameter_Range::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:771
CSG_Parameter_Table_Fields::~CSG_Parameter_Table_Fields
virtual ~CSG_Parameter_Table_Fields(void)
Definition: parameter_data.cpp:2352
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:1834
CSG_Parameter_Parameters::~CSG_Parameter_Parameters
virtual ~CSG_Parameter_Parameters(void)
Definition: parameter_data.cpp:3503
PARAMETER_TYPE_DataObject_Output
@ PARAMETER_TYPE_DataObject_Output
Definition: parameters.h:162
CSG_Parameter_Table_Fields::_asInt
virtual int _asInt(void) const
Definition: parameter_data.cpp:2433
CSG_Parameter_Choice
Definition: parameters.h:665
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:3424
CSG_Parameter_Grid_List::Del_Item
virtual bool Del_Item(CSG_Data_Object *pItem, bool bUpdateData=true)
Definition: parameter_data.cpp:3283
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:211
CSG_Table::Create
bool Create(void)
Definition: table.cpp:153
CSG_String::asDouble
double asDouble(void) const
Definition: api_string.cpp:807
CSG_Shapes
Definition: shapes.h:772
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:714
CSG_Parameter_Int::m_Value
int m_Value
Definition: parameters.h:488
CSG_Parameter_Choices::is_Selected
bool is_Selected(int Index)
Definition: parameter_data.cpp:1363
CSG_Parameter_Grid::Get_System
CSG_Grid_System * Get_System(void) const
Definition: parameter_data.cpp:2708
CSG_Parameters
Definition: parameters.h:1696
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:997
CSG_Parameter_Range::Get_Min
double Get_Min(void) const
Definition: parameter_data.cpp:816
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:458
CSG_MetaData::Add_Child
CSG_MetaData * Add_Child(void)
Definition: metadata.cpp:166
CSG_Parameter_List
Definition: parameters.h:1370
CSG_Parameter::asGrid_System
CSG_Grid_System * asGrid_System(void) const
Definition: parameter.cpp:1053
CSG_Table::Add_Record
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
Definition: table.cpp:823
CSG_String_Tokenizer
Definition: api_core.h:762
CSG_Parameter_Table_Fields::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2459
CSG_Parameter_Shapes_List::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:3452
PARAMETER_TYPE_Range
@ PARAMETER_TYPE_Range
Definition: parameters.h:131
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:1329
PARAMETER_TYPE_TIN_List
@ PARAMETER_TYPE_TIN_List
Definition: parameters.h:159
CSG_Parameter_Choice::Get_Item_Data
CSG_String Get_Item_Data(int Index) const
Definition: parameter_data.cpp:1005
TSG_Parameter_Type
TSG_Parameter_Type
Definition: parameters.h:123
CSG_Array_Int::Destroy
void Destroy(void)
Definition: api_core.h:431
PARAMETER_TYPE_Parameters
@ PARAMETER_TYPE_Parameters
Definition: parameters.h:164
CSG_Parameter_Choices::Set_Items
void Set_Items(const CSG_String &Items)
Definition: parameter_data.cpp:1305
CSG_Parameter_Value::m_Minimum
double m_Minimum
Definition: parameters.h:460
CSG_Parameter_Range::_Assign
virtual bool _Assign(CSG_Parameter *pSource)
Definition: parameter_data.cpp:852
SG_DATATYPE_Char
@ SG_DATATYPE_Char
Definition: api_core.h:1000
CSG_Parameter_List::_Set_String
virtual void _Set_String(void)
Definition: parameter_data.cpp:3113
PARAMETER_TYPE_Font
@ PARAMETER_TYPE_Font
Definition: parameters.h:139
CSG_Parameter_Bool::m_Value
bool m_Value
Definition: parameters.h:415
CSG_Parameter_String::Set_Password
void Set_Password(bool bOn)
Definition: parameter_data.cpp:1462
CSG_Parameter::asList
class CSG_Parameter_List * asList(void) const
Definition: parameter.cpp:1154
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:3035
CSG_String_Tokenizer::Get_Next_Token
CSG_String Get_Next_Token(void)
Definition: api_string.cpp:1546
PARAMETER_TYPE_Color
@ PARAMETER_TYPE_Color
Definition: parameters.h:140
CSG_Colors::Assign
bool Assign(const CSG_Colors &Colors)
Definition: api_colors.cpp:1189
PARAMETER_TYPE_Shapes
@ PARAMETER_TYPE_Shapes
Definition: parameters.h:152
CSG_Parameter::Restore_Default
virtual bool Restore_Default(void)
Definition: parameter.cpp:956
CSG_MetaData::Get_Property
const SG_Char * Get_Property(int Index) const
Definition: metadata.h:181
CSG_Parameter_Choice::Get_Items
CSG_String Get_Items(void) const
Definition: parameter_data.cpp:976
SG_DATATYPE_ULong
@ SG_DATATYPE_ULong
Definition: api_core.h:1005
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:3346
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:2453
CSG_Parameters::Set_Callback
bool Set_Callback(bool bActive=true)
Definition: parameters.cpp:1398
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:1148
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:239
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:3483
CSG_Parameter_Fixed_Table::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:1913
CSG_Grid_System::is_Valid
bool is_Valid(void) const
Definition: grid_system.cpp:305
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:655
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:285
CSG_Parameter_Grid_System::_Serialize
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
Definition: parameter_data.cpp:2134
CSG_Grids::Get_NZ
int Get_NZ(void) const
Definition: grids.h:190
CSG_Parameter_Grid::Set_Preferred_Type
void Set_Preferred_Type(TSG_Data_Type Type)
Definition: parameter_data.cpp:2702
DATAOBJECT_NOTSET
#define DATAOBJECT_NOTSET
Definition: dataobject.h:129
PARAMETER_TYPE_Text
@ PARAMETER_TYPE_Text
Definition: parameters.h:136
CSG_Parameter_Data_Object::_asPointer
virtual void * _asPointer(void) const
Definition: parameter_data.cpp:2524
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:1267
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:1008