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