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