SAGA API v9.10
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
1329 for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1330 {
1332 }
1333}
1334
1335//---------------------------------------------------------
1337{
1338 Del_Items();
1339
1340 CSG_String_Tokenizer Tokens(Items, "|");
1341
1342 while( Tokens.Has_More_Tokens() )
1343 {
1344 Add_Item(Tokens.Get_Next_Token());
1345 }
1346}
1347
1348//---------------------------------------------------------
1350{
1351 Del_Items();
1352
1353 for(int i=0; i<Items.Get_Count(); i++)
1354 {
1355 Add_Item(Items[i]);
1356 }
1357}
1358
1359//---------------------------------------------------------
1361{
1362 CSG_String Items;
1363
1364 for(int i=0; i<m_Items[0].Get_Count(); i++)
1365 {
1366 if( i > 0 )
1367 {
1368 Items += "|";
1369 }
1370
1371 Items += m_Items[0][i];
1372 }
1373
1374 return( Items );
1375}
1376
1377//---------------------------------------------------------
1379{
1380 m_Items[0].Clear();
1381 m_Items[1].Clear();
1382
1383 m_Selection.Destroy();
1384}
1385
1386//---------------------------------------------------------
1388{
1389 m_Items[0] += Item;
1390 m_Items[1] += Data;
1391}
1392
1393//---------------------------------------------------------
1395{
1396 for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1397 {
1398 if( Index == m_Selection[i] )
1399 {
1400 return( true );
1401 }
1402 }
1403
1404 return( false );
1405}
1406
1407//---------------------------------------------------------
1408bool CSG_Parameter_Choices::Select(int Index, bool bSelect)
1409{
1410 if( Index >= 0 && Index < Get_Item_Count() )
1411 {
1412 if( bSelect && !is_Selected(Index) )
1413 {
1414 m_Selection += Index;
1415 }
1416 else if( !bSelect )
1417 {
1418 for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1419 {
1420 if( Index == m_Selection[i] )
1421 {
1422 for(size_t j=i+1; j<m_Selection.Get_uSize(); i++, j++)
1423 {
1424 m_Selection[i] = m_Selection[j];
1425 }
1426
1427 m_Selection.Dec_Array();
1428 }
1429 }
1430 }
1431
1432 return( true );
1433 }
1434
1435 return( false );
1436}
1437
1438//---------------------------------------------------------
1440{
1441 m_Selection.Destroy();
1442
1443 return( true );
1444}
1445
1446//---------------------------------------------------------
1448{
1449 m_Items[0] = pSource->asChoices()->m_Items[0];
1450 m_Items[1] = pSource->asChoices()->m_Items[1];
1451
1452 m_Selection = pSource->asChoices()->m_Selection;
1453
1454 return( true );
1455}
1456
1457//---------------------------------------------------------
1459{
1460 if( bSave )
1461 {
1462 Entry.Set_Content(asString());
1463
1464 return( true );
1465 }
1466 else
1467 {
1468 return( _Set_Value(Entry.Get_Content()) != 0 );
1469 }
1470}
1471
1472
1474// //
1475// String //
1476// //
1478
1479//---------------------------------------------------------
1480CSG_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)
1481 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1482{
1483 m_bPassword = false;
1484}
1485
1486//---------------------------------------------------------
1488{
1489 return( !m_String.is_Empty() );
1490}
1491
1492//---------------------------------------------------------
1494{
1495 m_bPassword = bOn;
1496}
1497
1498//---------------------------------------------------------
1500{
1501 return( m_bPassword );
1502}
1503
1504//---------------------------------------------------------
1506{
1507 if( m_String.Cmp(Value) )
1508 {
1509 m_String = Value;
1510
1512 }
1513
1515}
1516
1517//---------------------------------------------------------
1519{
1520 m_String = ((CSG_Parameter_String *)pSource)->m_String;
1521 m_bPassword = ((CSG_Parameter_String *)pSource)->m_bPassword;
1522
1523 return( true );
1524}
1525
1526//---------------------------------------------------------
1528{
1529 if( bSave )
1530 {
1531 Entry.Set_Content(m_String);
1532 }
1533 else
1534 {
1535 m_String = Entry.Get_Content();
1536 }
1537
1538 return( true );
1539}
1540
1541
1543// //
1544// Text //
1545// //
1547
1548//---------------------------------------------------------
1549CSG_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)
1550 : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1551{
1552 // nop
1553}
1554
1555
1557// //
1558// FilePath //
1559// //
1561
1562//---------------------------------------------------------
1563CSG_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)
1564 : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1565{
1566 m_Filter.Printf("%s|*.*", _TL("All Files"));
1567
1568 m_bSave = false;
1569 m_bMultiple = false;
1570 m_bDirectory = false;
1571}
1572
1573//---------------------------------------------------------
1575{
1576 if( Filter )
1577 {
1578 m_Filter = Filter;
1579 }
1580 else
1581 {
1582 m_Filter.Printf("%s|*.*", _TL("All Files"));
1583 }
1584}
1585
1587{
1588 return( m_Filter.c_str() );
1589}
1590
1591//---------------------------------------------------------
1593{
1594 m_bSave = bFlag;
1595}
1596
1598{
1599 m_bMultiple = bFlag;
1600}
1601
1603{
1604 m_bDirectory = bFlag;
1605}
1606
1607//---------------------------------------------------------
1609{
1610 FilePaths.Clear();
1611
1612 if( m_String.Length() > 0 )
1613 {
1614 if( !m_bMultiple )
1615 {
1616 FilePaths.Add(m_String);
1617 }
1618 else if( m_String[0] != '\"' )
1619 {
1620 FilePaths.Add(m_String);
1621 }
1622 else
1623 {
1625
1626 while( s.Length() > 2 )
1627 {
1628 s = s.AfterFirst('\"');
1629 FilePaths.Add(s.BeforeFirst('\"'));
1630 s = s.AfterFirst('\"');
1631 }
1632 }
1633 }
1634
1635 return( FilePaths.Get_Count() > 0 );
1636}
1637
1638//---------------------------------------------------------
1640{
1642
1643 Set_Filter(((CSG_Parameter_File_Name *)pSource)->m_Filter.c_str());
1644
1645 m_bSave = pSource->asFilePath()->m_bSave;
1646 m_bMultiple = pSource->asFilePath()->m_bMultiple;
1647 m_bDirectory = pSource->asFilePath()->m_bDirectory;
1648
1649 return( true );
1650}
1651
1652
1654// //
1655// Font //
1656// //
1658
1659//---------------------------------------------------------
1660CSG_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)
1661 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1662{
1664}
1665
1666//---------------------------------------------------------
1668{
1669 m_Color = SG_GET_RGB(0, 0, 0);
1670#ifdef __WXMAC__
1671 m_String = ".applesystemuifont 11 utf-8";
1672#else
1673 m_String = "0;-12;0;0;0;400;0;0;0;0;3;2;1;34;Arial";
1674#endif
1675
1676 return( true );
1677}
1678
1679//---------------------------------------------------------
1681{
1682 if( m_Color != Value )
1683 {
1684 m_Color = Value;
1685
1687 }
1688
1690}
1691
1692//---------------------------------------------------------
1694{
1695 if( Value.is_Empty() )
1696 {
1698
1700 }
1701
1702 m_String = Value;
1703
1705}
1706
1707//---------------------------------------------------------
1709{
1710 return( m_Color );
1711}
1712
1713//---------------------------------------------------------
1715{
1716 return( (void *)m_String.c_str() );
1717}
1718
1719//---------------------------------------------------------
1721{
1722 m_Color = ((CSG_Parameter_Font *)pSource)->m_Color;
1723 m_String = ((CSG_Parameter_Font *)pSource)->m_String;
1724
1725 return( true );
1726}
1727
1728//---------------------------------------------------------
1730{
1731 if( bSave )
1732 {
1733 Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1735 ));
1736
1737 Entry.Add_Child("FONT", m_String);
1738 }
1739 else
1740 {
1741 if( Entry("COLOR") != NULL )
1742 {
1744 Entry("COLOR")->Get_Content().AfterFirst('R').asInt(),
1745 Entry("COLOR")->Get_Content().AfterFirst('G').asInt(),
1746 Entry("COLOR")->Get_Content().AfterFirst('B').asInt()
1747 ));
1748 }
1749
1750 if( Entry("FONT") != NULL )
1751 {
1752 _Set_Value(Entry("FONT")->Get_Content());
1753 }
1754 }
1755
1756 return( true );
1757}
1758
1759
1761// //
1762// Color //
1763// //
1765
1766//---------------------------------------------------------
1767CSG_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)
1768 : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
1769{
1770 // nop
1771}
1772
1773//---------------------------------------------------------
1775{
1776 long l;
1777
1778 if( SG_Color_From_Text(Value, l) )
1779 {
1780 return( CSG_Parameter_Int::_Set_Value((int)l) );
1781 }
1782
1783 int i;
1784
1785 if( Value.asInt(i) )
1786 {
1787 return( CSG_Parameter_Int::_Set_Value(i) );
1788 }
1789
1791}
1792
1793//---------------------------------------------------------
1795{
1796 if( bSave )
1797 {
1798 Entry.Fmt_Content("R%03d G%03d B%03d", SG_GET_R(m_Value), SG_GET_G(m_Value), SG_GET_B(m_Value));
1799 }
1800 else
1801 {
1803 Entry.Get_Content().AfterFirst('R').asInt(),
1804 Entry.Get_Content().AfterFirst('G').asInt(),
1805 Entry.Get_Content().AfterFirst('B').asInt()
1806 );
1807 }
1808
1809 return( true );
1810}
1811
1812
1814// //
1815// Colors //
1816// //
1818
1819//---------------------------------------------------------
1820CSG_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)
1821 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1822{
1823 // nop
1824}
1825
1826//---------------------------------------------------------
1828{
1829 if( Value >= 0 && Value < CSG_Colors::Get_Predefined_Count() )
1830 {
1831 if( m_Colors.Create(0, Value) )
1832 {
1834 }
1835 }
1836
1838}
1839
1840//---------------------------------------------------------
1842{
1843 CSG_Colors Colors;
1844
1845 if( Colors.Load(Value) )
1846 {
1847 m_Colors = Colors;
1848
1850 }
1851
1853}
1854
1855//---------------------------------------------------------
1857{
1858 try
1859 {
1860 if( Value && m_Colors.Create(*(CSG_Colors *)Value) )
1861 {
1863 }
1864 }
1865 catch(...)
1866 {
1867 }
1868
1870}
1871
1872//---------------------------------------------------------
1874{
1875 m_String.Printf("%d %s", m_Colors.Get_Count(), _TL("colors"));
1876}
1877
1878//---------------------------------------------------------
1880{
1881 return( m_Colors.Get_Count() );
1882}
1883
1884//---------------------------------------------------------
1886{
1887 return( (void *)&m_Colors );
1888}
1889
1890//---------------------------------------------------------
1892{
1893 return( m_Colors.Assign(pSource->asColors()) );
1894}
1895
1896//---------------------------------------------------------
1898{
1899 if( bSave )
1900 {
1901 for(int i=0; i<m_Colors.Get_Count(); i++)
1902 {
1903 Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1904 m_Colors.Get_Red (i),
1905 m_Colors.Get_Green(i),
1906 m_Colors.Get_Blue (i))
1907 );
1908 }
1909 }
1910 else
1911 {
1912 if( Entry.Get_Children_Count() <= 1 )
1913 {
1914 return( false );
1915 }
1916
1917 m_Colors.Set_Count(Entry.Get_Children_Count());
1918
1919 for(int i=0; i<m_Colors.Get_Count(); i++)
1920 {
1921 CSG_String s(Entry(i)->Get_Content());
1922
1923 m_Colors.Set_Red (i, s.AfterFirst('R').asInt());
1924 m_Colors.Set_Green(i, s.AfterFirst('G').asInt());
1925 m_Colors.Set_Blue (i, s.AfterFirst('B').asInt());
1926 }
1927 }
1928
1929 return( true );
1930}
1931
1932
1934// //
1935// FixedTable //
1936// //
1938
1939//---------------------------------------------------------
1940CSG_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)
1941 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1942{
1943 m_Table.Set_Name(_TL("Table"));
1944}
1945
1946//---------------------------------------------------------
1948{
1949 if( Value && m_Table.Assign_Values((CSG_Table *)Value) )
1950 {
1952 }
1953
1955}
1956
1957//---------------------------------------------------------
1959{
1960 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());
1961}
1962
1963//---------------------------------------------------------
1965{
1966 return( (void *)&m_Table );
1967}
1968
1969//---------------------------------------------------------
1971{
1972 return( m_Table.Create(*pSource->asTable()) );
1973}
1974
1975//---------------------------------------------------------
1977{
1978 int iField;
1979
1980 if( bSave )
1981 {
1982 CSG_MetaData *pNode = Entry.Add_Child("FIELDS");
1983
1984 for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
1985 {
1986 CSG_MetaData *pEntry = pNode->Add_Child("FIELD", m_Table.Get_Field_Name(iField));
1987
1988 pEntry->Set_Property("type", gSG_Data_Type_Identifier[m_Table.Get_Field_Type(iField)]);
1989 }
1990
1991 pNode = Entry.Add_Child("RECORDS");
1992
1993 for(sLong iRecord=0; iRecord<m_Table.Get_Count(); iRecord++)
1994 {
1995 CSG_MetaData *pEntry = pNode->Add_Child("RECORD");
1996
1997 CSG_Table_Record *pRecord = m_Table.Get_Record(iRecord);
1998
1999 for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
2000 {
2001 pEntry->Add_Child("FIELD", pRecord->asString(iField));
2002 }
2003 }
2004 }
2005 else
2006 {
2007 CSG_MetaData *pNode;
2008
2009 if( (pNode = Entry("FIELDS")) == NULL )
2010 {
2011 return( false );
2012 }
2013
2014 CSG_Table Table;
2015
2016 for(iField=0; iField<pNode->Get_Children_Count(); iField++)
2017 {
2019
2020 CSG_String s;
2021
2022 if( pNode->Get_Child(iField)->Get_Property("type", s) )
2023 {
2024 type = SG_Data_Type_Get_Type(s);
2025 }
2026
2027 Table.Add_Field(pNode->Get_Child(iField)->Get_Content(), type == SG_DATATYPE_Undefined ? SG_DATATYPE_String : type);
2028 }
2029
2030 if( (pNode = Entry("RECORDS")) == NULL )
2031 {
2032 return( false );
2033 }
2034
2035 for(int iRecord=0; iRecord<pNode->Get_Children_Count(); iRecord++)
2036 {
2037 CSG_MetaData *pEntry = pNode->Get_Child(iRecord);
2038
2039 CSG_Table_Record *pRecord = Table.Add_Record();
2040
2041 for(iField=0; iField<pEntry->Get_Children_Count(); iField++)
2042 {
2043 pRecord->Set_Value(iField, pEntry->Get_Child(iField)->Get_Content());
2044 }
2045 }
2046
2047 return( m_Table.Assign_Values(&Table) );
2048 }
2049
2050 return( true );
2051}
2052
2053
2055// //
2056// Grid_System //
2057// //
2059
2060//---------------------------------------------------------
2061CSG_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)
2062 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2063{
2064 // nop
2065}
2066
2067//---------------------------------------------------------
2069{
2070 CSG_Grid_System System;
2071
2072 return( System.Create(Value) ? _Set_Value(&System) : SG_PARAMETER_DATA_SET_FALSE );
2073}
2074
2075//---------------------------------------------------------
2077{
2078 CSG_Grid_System System;
2079
2080 if( Value != NULL )
2081 {
2082 System.Create(*((CSG_Grid_System *)Value));
2083 }
2084
2085 if( m_System == System )
2086 {
2088 }
2089
2090 m_System = System;
2091
2092 //-----------------------------------------------------
2093 bool bCallback = Get_Parameters()->Set_Callback(false); // only update grid parameter objects in 1st loop...
2094
2095 for(int i=0; i<Get_Children_Count(); i++)
2096 {
2097 CSG_Parameter *pParameter = Get_Child(i);
2098
2099 if( pParameter->is_DataObject() )
2100 {
2101 CSG_Data_Object *pObject = pParameter->asDataObject();
2102
2103 if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2104 {
2105 bool bInvalid = !m_System.is_Valid() || !(Get_Manager() && Get_Manager()->Exists(pObject));
2106
2107 if( !bInvalid )
2108 {
2109 switch( pObject->Get_ObjectType() )
2110 {
2111 case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2112 case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2113 default: break;
2114 }
2115 }
2116
2117 if( bInvalid )
2118 {
2119 pParameter->Set_Value(DATAOBJECT_NOTSET);
2120 }
2121 }
2122 }
2123
2124 //-------------------------------------------------
2125 else if( pParameter->is_DataObject_List() )
2126 {
2127 CSG_Parameter_List *pList = pParameter->asList();
2128
2129 if( !m_System.is_Valid() )
2130 {
2131 pList->Del_Items();
2132 }
2133 else for(int j=pList->Get_Item_Count()-1; j>=0; j--)
2134 {
2135 CSG_Data_Object *pObject = pList->Get_Item(j);
2136
2137 bool bInvalid = !(Get_Manager() && Get_Manager()->Exists(pObject));
2138
2139 if( !bInvalid && pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2140 {
2141 switch( pObject->Get_ObjectType() )
2142 {
2143 case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2144 case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2145 default: break;
2146 }
2147 }
2148
2149 if( bInvalid )
2150 {
2151 pList->Del_Item(j);
2152 }
2153 }
2154 }
2155 }
2156
2157 Get_Parameters()->Set_Callback(bCallback);
2158
2159 if( bCallback ) // ...process On_Parameter_Changed()/On_Parameters_Enable() in a 2nd loop!
2160 {
2161 for(int i=0; i<Get_Children_Count(); i++)
2162 {
2163 CSG_Parameter *pParameter = Get_Child(i);
2164
2165 if( pParameter->is_DataObject() || pParameter->is_DataObject_List() )
2166 {
2167 pParameter->has_Changed();
2168 }
2169 }
2170 }
2171
2172 //-----------------------------------------------------
2174}
2175
2176//---------------------------------------------------------
2178{
2179 m_String = m_System.Get_Name();
2180}
2181
2182//---------------------------------------------------------
2184{
2185 return( (void *)&m_System );
2186}
2187
2188//---------------------------------------------------------
2190{
2191 m_System = ((CSG_Parameter_Grid_System *)pSource)->m_System;
2192
2193 return( true );
2194}
2195
2196//---------------------------------------------------------
2198{
2199 if( bSave )
2200 {
2201 Entry.Add_Child("CELLSIZE", m_System.Get_Cellsize());
2202 Entry.Add_Child("XMIN" , m_System.Get_Extent().Get_XMin());
2203 Entry.Add_Child("YMIN" , m_System.Get_Extent().Get_YMin());
2204 Entry.Add_Child("XMAX" , m_System.Get_Extent().Get_XMax());
2205 Entry.Add_Child("YMAX" , m_System.Get_Extent().Get_YMax());
2206 }
2207 else
2208 {
2209 m_System.Create(
2210 Entry("CELLSIZE")->Get_Content().asDouble(),
2211 Entry("XMIN" )->Get_Content().asDouble(),
2212 Entry("YMIN" )->Get_Content().asDouble(),
2213 Entry("XMAX" )->Get_Content().asDouble(),
2214 Entry("YMAX" )->Get_Content().asDouble()
2215 );
2216 }
2217
2218 return( true );
2219}
2220
2221
2223// //
2224// Table Field //
2225// //
2227
2228//---------------------------------------------------------
2229CSG_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)
2230 : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
2231{
2232 m_Default = -1;
2233 m_Value = -1;
2234}
2235
2236//---------------------------------------------------------
2237bool CSG_Parameter_Table_Field::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2238{
2239 if( m_Default < 0 && is_Optional() )
2240 {
2242
2244 _TL("Default"), _TL("default value if no attribute has been selected"),
2245 Value, Minimum, bMinimum, Maximum, bMaximum
2246 );
2247 }
2248
2249 return( m_Default >= 0 );
2250}
2251
2252//---------------------------------------------------------
2254{
2255 CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2256
2257 return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2258}
2259
2260//---------------------------------------------------------
2262{
2263 CSG_Table *pTable = Get_Table();
2264
2265 if( pTable != NULL && pTable->Get_Field_Count() > 0 && Value >= 0 )
2266 {
2267 if( Value >= pTable->Get_Field_Count() )
2268 {
2269 Value = !is_Optional() ? pTable->Get_Field_Count() - 1 : -1;
2270 }
2271 }
2272 else
2273 {
2274 Value = -1;
2275 }
2276
2277 if( Get_Child(m_Default) )
2278 {
2279 Get_Child(m_Default)->Set_Enabled(Value < 0);
2280 }
2281
2282 if( m_Value != Value )
2283 {
2284 m_Value = Value;
2285
2287 }
2288
2290}
2291
2292//---------------------------------------------------------
2294{
2295 CSG_Table *pTable = Get_Table();
2296
2297 if( pTable != NULL )
2298 {
2299 int Index;
2300
2301 for(Index=0; Index<pTable->Get_Field_Count(); Index++)
2302 {
2303 if( !Value.CmpNoCase(pTable->Get_Field_Name(Index)) )
2304 {
2305 return( _Set_Value(Index) );
2306 }
2307 }
2308
2309 if( Value.asInt(Index) )
2310 {
2311 return( _Set_Value(Index) );
2312 }
2313 }
2314
2315 return( _Set_Value(-1) );
2316}
2317
2318//---------------------------------------------------------
2320{
2321 CSG_Table *pTable = Get_Table();
2322
2323 if( !pTable || pTable->Get_Field_Count() < 1 )
2324 {
2325 m_String = _TL("<no attributes>");
2326 }
2327 else if( m_Value < 0 || m_Value >= pTable->Get_Field_Count() )
2328 {
2329 m_String = _TL("<not set>");
2330 }
2331 else
2332 {
2333 m_String = pTable->Get_Field_Name(m_Value);
2334 }
2335}
2336
2337//---------------------------------------------------------
2339{
2340 return( Get_Child(m_Default) ? Get_Child(m_Default)->asDouble() : 0. );
2341}
2342
2343//---------------------------------------------------------
2345{
2346 m_Value = ((CSG_Parameter_Table_Field *)pSource)->m_Value;
2347 m_Default = ((CSG_Parameter_Table_Field *)pSource)->m_Default;
2348
2349 _Set_String();
2350
2351 return( true );
2352}
2353
2354//---------------------------------------------------------
2356{
2357 if( bSave )
2358 {
2359 Entry.Set_Property("index", asInt());
2360 Entry.Set_Content(asString());
2361
2362 return( true );
2363 }
2364 else
2365 {
2366 int Index;
2367
2368 if( Entry.Get_Property("index", Index) ) // we require this check for backward compatibility, "index" was first introduced with SAGA 2.2.3 (r2671)
2369 {
2370 return( _Set_Value(Index) != 0 );
2371 }
2372
2373 return( _Set_Value(Entry.Get_Content()) != 0 );
2374 }
2375}
2376
2377//---------------------------------------------------------
2379{
2380 CSG_String Choices;
2381
2382 for(int i=0; i<Table.Get_Field_Count(); i++)
2383 {
2384 if( i > 0 ) { Choices += "|"; }
2385
2386 Choices += Table.Get_Field_Name(i);
2387 }
2388
2389 if( bAllowNone )
2390 {
2391 if( Table.Get_Field_Count() ) { Choices += "|"; }
2392
2393 Choices += _TL("<not set>");
2394 }
2395
2396 return( Choices );
2397}
2398
2399
2401// //
2402// Table Fields //
2403// //
2405
2406//---------------------------------------------------------
2407CSG_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)
2408 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2409{
2410 m_nFields = 0;
2411 m_Fields = NULL;
2412}
2413
2414//---------------------------------------------------------
2419
2420//---------------------------------------------------------
2422{
2423 CSG_Table *pTable = Get_Table();
2424
2425 if( !pTable || pTable->Get_Field_Count() <= 0 )
2426 {
2428 m_nFields = 0;
2429 m_String = _TL("<no attributes>");
2430
2432 }
2433
2434 m_Fields = (int *)SG_Realloc(m_Fields, pTable->Get_Field_Count() * sizeof(int));
2435
2436 memset(m_Fields, 0, pTable->Get_Field_Count() * sizeof(int));
2437
2438 //-----------------------------------------------------
2439 int iField;
2440
2441 CSG_String List(Value); List.Replace(";", ",");
2442
2443 while( List.Length() > 0 )
2444 {
2445 CSG_String sValue = List.BeforeFirst(',');
2446
2447 if( sValue.asInt(iField) && iField >= 0 && iField < pTable->Get_Field_Count() )
2448 {
2449 m_Fields[iField] = 1;
2450 }
2451 else if( sValue.Length() > 0 )
2452 {
2453 sValue.Trim();
2454
2455 if( sValue[0] == '[' )
2456 {
2457 sValue = sValue.AfterFirst('[').BeforeLast(']');
2458 }
2459
2460 for(iField=0; iField<pTable->Get_Field_Count(); iField++)
2461 {
2462 if( sValue.CmpNoCase(pTable->Get_Field_Name(iField)) == 0 )
2463 {
2464 m_Fields[iField] = 1;
2465
2466 break;
2467 }
2468 }
2469 }
2470
2471 List = List.AfterFirst(',');
2472 }
2473
2474 //-----------------------------------------------------
2475 m_String.Clear();
2476
2477 for(iField=0, m_nFields=0; iField<pTable->Get_Field_Count(); iField++)
2478 {
2479 if( m_Fields[iField] != 0 )
2480 {
2481 m_Fields[m_nFields++] = iField;
2482
2483 m_String += CSG_String::Format(m_String.is_Empty() ? "%d" : ",%d", iField);
2484 }
2485 }
2486
2487 if( m_nFields <= 0 )
2488 {
2489 m_String = _TL("<no attributes>");
2490 }
2491
2493}
2494
2495//---------------------------------------------------------
2497{
2498 return( m_nFields );
2499}
2500
2501//---------------------------------------------------------
2503{
2504 return( m_Fields );
2505}
2506
2507//---------------------------------------------------------
2509{
2510 CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2511
2512 return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2513}
2514
2515//---------------------------------------------------------
2517{
2518 return( _Set_Value(pSource->asString()) != 0 );
2519}
2520
2521//---------------------------------------------------------
2523{
2524 if( bSave )
2525 {
2526 Entry.Set_Content(m_String);
2527 }
2528 else
2529 {
2530 m_String = Entry.Get_Content();
2531 }
2532
2533 return( true );
2534}
2535
2536
2538// //
2539// DataObject //
2540// //
2542
2543//---------------------------------------------------------
2544CSG_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)
2545 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2546{
2547 m_pDataObject = NULL;
2548}
2549
2550//---------------------------------------------------------
2552{
2553 return( is_Optional() || (m_pDataObject && m_pDataObject->is_Valid()) );
2554}
2555
2556//---------------------------------------------------------
2558{
2559 if( m_pDataObject != Value )
2560 {
2561 m_pDataObject = (CSG_Data_Object *)Value;
2562
2564 }
2565
2567}
2568
2569//---------------------------------------------------------
2571{
2573 {
2574 m_String = is_Output() && !is_Optional() ? _TL("<create>") : _TL("<not set>");
2575 }
2576 else if( m_pDataObject == DATAOBJECT_CREATE )
2577 {
2578 m_String = _TL("<create>");
2579 }
2580 else
2581 {
2582 m_String = m_pDataObject->Get_Name();
2583 }
2584}
2585
2586//---------------------------------------------------------
2588{
2589 return( m_pDataObject );
2590}
2591
2592//---------------------------------------------------------
2594{
2595 m_pDataObject = ((CSG_Parameter_Data_Object *)pSource)->m_pDataObject;
2596
2597 return( true );
2598}
2599
2600//---------------------------------------------------------
2602{
2603 if( bSave )
2604 {
2606 {
2607 Entry.Set_Content("CREATE");
2608
2609 return( true );
2610 }
2611
2612 if( m_pDataObject == DATAOBJECT_NOTSET )//|| !SG_File_Exists(m_pDataObject->Get_File_Name(false)) )
2613 {
2614 Entry.Set_Content("NOT SET");
2615
2616 return( true );
2617 }
2618
2619 if( !m_pDataObject->Get_Owner() )
2620 {
2621 Entry.Set_Content(m_pDataObject->Get_File_Name(false));
2622
2623 return( true );
2624 }
2625
2626 if( m_pDataObject->Get_Owner()->Get_ObjectType() == SG_DATAOBJECT_TYPE_Grids )
2627 {
2628 CSG_Grids *pGrids = m_pDataObject->Get_Owner()->asGrids();
2629
2630 for(int i=0; i<pGrids->Get_NZ(); i++)
2631 {
2632 if( pGrids->Get_Grid_Ptr(i) == m_pDataObject )
2633 {
2634 Entry.Set_Content(m_pDataObject->Get_Owner()->Get_File_Name(false));
2635
2636 Entry.Add_Property("index", i);
2637
2638 return( true );
2639 }
2640 }
2641 }
2642 }
2643 else
2644 {
2645 CSG_Data_Object *pDataObject = NULL; int Index = -1;
2646
2647 if( Entry.Cmp_Content("CREATE") )
2648 {
2650
2651 return( true );
2652 }
2653
2654 if( Entry.Cmp_Content("NOT SET") || !Get_Manager() || !(pDataObject = Get_Manager()->Find(Entry.Get_Content(), false)) )
2655 {
2657
2658 return( true );
2659 }
2660
2661 if( !Entry.Get_Property("index", Index) )
2662 {
2663 _Set_Value(pDataObject);
2664
2665 return( true );
2666 }
2667
2668 if( pDataObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_Grids )
2669 {
2670 _Set_Value(pDataObject->asGrids()->Get_Grid_Ptr(Index));
2671
2672 return( true );
2673 }
2674 }
2675
2676 return( false );
2677}
2678
2679
2681// //
2682// DataObject_Output //
2683// //
2685
2686//---------------------------------------------------------
2688 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2689{
2691}
2692
2693//---------------------------------------------------------
2695{
2696 CSG_Data_Object *pDataObject = (CSG_Data_Object *)Value;
2697
2698 if( m_pDataObject != pDataObject )
2699 {
2700 if( pDataObject == DATAOBJECT_NOTSET || pDataObject == DATAOBJECT_CREATE )
2701 {
2702 m_pDataObject = pDataObject;
2703 }
2704 else if( pDataObject->Get_ObjectType() == m_Type )
2705 {
2706 m_pDataObject = pDataObject;
2707
2708 if( Get_Manager() )
2709 {
2711
2712 if( Get_Manager() == &SG_Get_Data_Manager() ) // prevent that local data manager send their data objects to gui
2713 {
2715 }
2716 }
2717 }
2718
2720 }
2721
2723}
2724
2725//---------------------------------------------------------
2727{
2728 if( m_Type == SG_DATAOBJECT_TYPE_Undefined ) // m_Type should not be changed after set once!!!...
2729 {
2730 switch( Type )
2731 {
2738 m_Type = Type;
2739
2740 return( true );
2741
2742 default:
2743 return( false );
2744 }
2745 }
2746
2747 return( false );
2748}
2749
2750
2752// //
2753// Grid //
2754// //
2756
2757//---------------------------------------------------------
2758CSG_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)
2759 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2760{
2762}
2763
2764//---------------------------------------------------------
2769
2770//---------------------------------------------------------
2772{
2773 return( Get_Parent() ? Get_Parent()->asGrid_System() : NULL );
2774}
2775
2776//---------------------------------------------------------
2777bool CSG_Parameter_Grid::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2778{
2779 if( m_Default < 0 && is_Input() && is_Optional() )
2780 {
2782
2784 _TL("Default"), _TL("default value if no grid has been selected"),
2785 Value, Minimum, bMinimum, Maximum, bMaximum
2786 );
2787 }
2788
2789 return( m_Default >= 0 );
2790}
2791
2792//---------------------------------------------------------
2794{
2795 if( Value == m_pDataObject ) // nothing to do
2796 {
2798 }
2799
2800 //-----------------------------------------------------
2801 if( Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE && Get_System() ) // check grid system compatibility
2802 {
2804 ? ((CSG_Grid *)Value)->Get_System()
2805 : ((CSG_Grids *)Value)->Get_System();
2806
2807 if( System.is_Valid() == false )
2808 {
2809 if( is_Input() )
2810 {
2812 }
2813 }
2814 else if( !Get_System()->is_Equal(System) )
2815 {
2816 if( Get_System()->is_Valid() )
2817 {
2818 for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
2819 {
2820 CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
2821
2822 if( pChild->is_Output() && !Get_Parameters()->has_GUI() )
2823 {
2824 continue;
2825 }
2826
2827 if( pChild->Get_Type() == PARAMETER_TYPE_Grid
2828 || pChild->Get_Type() == PARAMETER_TYPE_Grids )
2829 {
2830 if( pChild->asDataObject() != DATAOBJECT_NOTSET
2831 && pChild->asDataObject() != DATAOBJECT_CREATE
2832 && pChild->asDataObject() != m_pDataObject
2833 && pChild->asDataObject() != Value )
2834 {
2836 }
2837 }
2838
2839 if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
2840 {
2841 if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
2842 || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
2843 {
2845 }
2846 }
2847 }
2848 }
2849
2850 Get_Parent()->Set_Value((void *)&System);
2851 }
2852 }
2853
2854 //-----------------------------------------------------
2855 m_pDataObject = (CSG_Data_Object *)Value;
2856
2857 if( Get_Child(m_Default) )
2858 {
2860 }
2861
2863}
2864
2865//---------------------------------------------------------
2867{
2868 return( Get_Child(m_Default) ? Get_Child(m_Default)->asInt () : 0 );
2869}
2870
2871//---------------------------------------------------------
2873{
2874 return( Get_Child(m_Default) ? Get_Child(m_Default)->asDouble() : 0. );
2875}
2876
2877//---------------------------------------------------------
2879{
2880 m_Type = ((CSG_Parameter_Grid *)pSource)->m_Type;
2881 m_Default = ((CSG_Parameter_Grid *)pSource)->m_Default;
2882
2883 return( _Set_Value(pSource->asPointer()) != 0 );
2884}
2885
2886
2888// //
2889// Grids //
2890// //
2892
2893//---------------------------------------------------------
2894CSG_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)
2895 : CSG_Parameter_Grid(pOwner, pParent, ID, Name, Description, Constraint)
2896{
2897 // nop
2898}
2899
2900
2902// //
2903// Table //
2904// //
2906
2907//---------------------------------------------------------
2908CSG_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)
2909 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2910{
2911 // nop
2912}
2913
2914//---------------------------------------------------------
2916{
2917 if( m_pDataObject == Value )
2918 {
2920 }
2921
2922 m_pDataObject = (CSG_Data_Object *)Value;
2923
2924 for(int i=0; i<Get_Children_Count(); i++)
2925 {
2926 CSG_Parameter *pChild = Get_Child(i);
2927
2928 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2929 {
2930 pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2931 }
2932 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2933 {
2934 pChild->Set_Value(CSG_String(""));
2935 }
2936 }
2937
2939}
2940
2941
2943// //
2944// Shapes //
2945// //
2947
2948//---------------------------------------------------------
2949CSG_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)
2950 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2951{
2953}
2954
2955//---------------------------------------------------------
2957{
2958 if( (is_Input() || Get_Parameters()->has_GUI()) && Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE
2959 && m_Type != SHAPE_TYPE_Undefined && m_Type != ((CSG_Shapes *)Value)->Get_Type() )
2960 {
2962 }
2963
2964 if( m_pDataObject == Value )
2965 {
2967 }
2968
2969 m_pDataObject = (CSG_Data_Object *)Value;
2970
2971 for(int i=0; i<Get_Children_Count(); i++)
2972 {
2973 CSG_Parameter *pChild = Get_Child(i);
2974
2975 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2976 {
2977 pChild->Set_Value(m_pDataObject && m_pDataObject != DATAOBJECT_CREATE && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2978 }
2979 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2980 {
2981 pChild->Set_Value("");
2982 }
2983 }
2984
2986}
2987
2988//---------------------------------------------------------
2993
2994//---------------------------------------------------------
2996{
2997 m_Type = ((CSG_Parameter_Shapes *)pSource)->m_Type;
2998
2999 return( CSG_Parameter_Data_Object::_Assign(pSource) );
3000}
3001
3002
3004// //
3005// TIN //
3006// //
3008
3009//---------------------------------------------------------
3010CSG_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)
3011 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
3012{
3013 // nop
3014}
3015
3016//---------------------------------------------------------
3018{
3019 if( m_pDataObject == Value )
3020 {
3022 }
3023
3024 m_pDataObject = (CSG_Data_Object *)Value;
3025
3026 for(int i=0; i<Get_Children_Count(); i++)
3027 {
3028 CSG_Parameter *pChild = Get_Child(i);
3029
3030 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
3031 {
3032 pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
3033 }
3034 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
3035 {
3036 pChild->Set_Value("");
3037 }
3038 }
3039
3041}
3042
3043
3045// //
3046// PointCloud //
3047// //
3049
3050//---------------------------------------------------------
3051CSG_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)
3052 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
3053{
3054 // nop
3055}
3056
3057//---------------------------------------------------------
3059{
3060 if( m_pDataObject == Value )
3061 {
3063 }
3064
3065 m_pDataObject = (CSG_Data_Object *)Value;
3066
3067 for(int i=0; i<Get_Children_Count(); i++)
3068 {
3069 CSG_Parameter *pChild = Get_Child(i);
3070
3071 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
3072 {
3073 pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
3074 }
3075 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
3076 {
3077 pChild->Set_Value("");
3078 }
3079 }
3080
3082}
3083
3084//---------------------------------------------------------
3089
3090
3092// //
3093// List //
3094// //
3096
3097//---------------------------------------------------------
3098CSG_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)
3099 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
3100{
3101 // nop
3102}
3103
3104//---------------------------------------------------------
3106{
3107 if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE && m_Objects.Add(pObject) )
3108 {
3109 _Set_String();
3110
3111 return( true );
3112 }
3113
3114 return( false );
3115}
3116
3117bool CSG_Parameter_List::Del_Item(CSG_Data_Object *pObject, bool bUpdateData)
3118{
3119 if( m_Objects.Del(pObject) > 0 )
3120 {
3121 if( bUpdateData )
3122 {
3123 _Set_String();
3124 }
3125
3126 return( true );
3127 }
3128
3129 return( false );
3130}
3131
3132bool CSG_Parameter_List::Del_Item(int Index, bool bUpdateData)
3133{
3134 if( m_Objects.Del(Index) )
3135 {
3136 if( bUpdateData )
3137 {
3138 _Set_String();
3139 }
3140
3141 return( true );
3142 }
3143
3144 return( false );
3145}
3146
3148{
3149 if( m_Objects.Set_Array(0) )
3150 {
3151 _Set_String();
3152
3153 return( true );
3154 }
3155
3156 return( false );
3157}
3158
3159//---------------------------------------------------------
3161{
3162 if( Value == NULL && Get_Item_Count() > 0 && Del_Items() )
3163 {
3165 }
3166
3167 if( Value != NULL && Add_Item((CSG_Data_Object *)Value) )
3168 {
3170 }
3171
3173}
3174
3175//---------------------------------------------------------
3177{
3178 if( Get_Item_Count() > 0 )
3179 {
3180 m_String.Printf("%d %s (", Get_Item_Count(), Get_Item_Count() == 1 ? _TL("object") : _TL("objects"));
3181
3182 for(int i=0; i<Get_Item_Count(); i++)
3183 {
3184 if( i > 0 )
3185 {
3186 m_String += ", ";
3187 }
3188
3189 m_String += Get_Item(i)->Get_Name();
3190 }
3191
3192 m_String += ")";
3193 }
3194 else
3195 {
3196 m_String = _TL("No objects");
3197 }
3198}
3199
3200//---------------------------------------------------------
3202{
3203 return( Get_Item_Count() );
3204}
3205
3206//---------------------------------------------------------
3208{
3209 return( m_Objects.Get_Array() );
3210}
3211
3212//---------------------------------------------------------
3214{
3215 Del_Items();
3216
3217 for(int i=0; i<((CSG_Parameter_List *)pSource)->Get_Item_Count(); i++)
3218 {
3219 if( Get_Manager() != &SG_Get_Data_Manager() || SG_Get_Data_Manager().Exists(((CSG_Parameter_List *)pSource)->Get_Item(i)) )
3220 {
3221 Add_Item(((CSG_Parameter_List *)pSource)->Get_Item(i));
3222 }
3223 }
3224
3225 return( true );
3226}
3227
3228//---------------------------------------------------------
3230{
3231 if( bSave )
3232 {
3233 for(int i=0; i<Get_Item_Count(); i++)
3234 {
3235 CSG_String File = Get_Item(i)->Get_File_Name(false);
3236
3237 if( File.BeforeFirst(':').Cmp("PGSQL") || SG_File_Exists(File) )
3238 {
3239 Entry.Add_Child("DATA", File);
3240 }
3241 }
3242 }
3243 else
3244 {
3245 Del_Items();
3246
3247 for(int i=0; i<Entry.Get_Children_Count(); i++)
3248 {
3249 CSG_Data_Object *pObject = Get_Manager() ? Get_Manager()->Find(Entry.Get_Content(i), false) : NULL;
3250
3251 if( pObject )
3252 {
3253 Add_Item(pObject);
3254 }
3255 }
3256 }
3257
3258 return( true );
3259}
3260
3261
3263// //
3264// Grid_List //
3265// //
3267
3268//---------------------------------------------------------
3269CSG_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)
3270 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3271{
3272 // nop
3273}
3274
3275//---------------------------------------------------------
3277{
3279 {
3280 return( Get_Parent()->asGrid_System() );
3281 }
3282
3283 return( NULL );
3284}
3285
3286//---------------------------------------------------------
3288{
3289 if( pObject == DATAOBJECT_NOTSET || pObject == DATAOBJECT_CREATE
3290 || (pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grid
3291 && pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids) )
3292 {
3293 return( false );
3294 }
3295
3296 //-----------------------------------------------------
3297 if( Get_System() ) // check grid system compatibility
3298 {
3300 ? ((CSG_Grid *)pObject)->Get_System()
3301 : ((CSG_Grids *)pObject)->Get_System();
3302
3303 if( System.is_Valid() == false && is_Input() )
3304 {
3305 return( false );
3306 }
3307
3308 if( !Get_System()->is_Valid() )
3309 {
3310 Get_Parent()->Set_Value((void *)&System);
3311 }
3312 else if( !Get_System()->is_Equal(System) )
3313 {
3314 for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3315 {
3316 CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3317
3318 if( pChild->Get_Type() == PARAMETER_TYPE_Grid
3319 || pChild->Get_Type() == PARAMETER_TYPE_Grids )
3320 {
3321 if( pChild->asDataObject() != DATAOBJECT_NOTSET
3322 && pChild->asDataObject() != DATAOBJECT_CREATE )
3323 {
3324 return( false );
3325 }
3326 }
3327
3328 if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3329 {
3330 if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
3331 || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3332 {
3333 return( false );
3334 }
3335 }
3336 }
3337
3338 Get_Parent()->Set_Value((void *)&System);
3339 }
3340 }
3341
3342 return( CSG_Parameter_List::Add_Item(pObject) && Update_Data() );
3343}
3344
3345//---------------------------------------------------------
3347{
3348 return( CSG_Parameter_List::Del_Item(pItem, bUpdateData) );
3349}
3350
3351//---------------------------------------------------------
3352bool CSG_Parameter_Grid_List::Del_Item(int Index, bool bUpdateData)
3353{
3354 return( CSG_Parameter_List::Del_Item(Index, bUpdateData) );
3355}
3356
3357//---------------------------------------------------------
3362
3363//---------------------------------------------------------
3365{
3366 m_Grids.Set_Array(0);
3367
3368 for(int i=0; i<Get_Item_Count(); i++)
3369 {
3370 switch( Get_Item(i)->Get_ObjectType() )
3371 {
3373 m_Grids.Add(Get_Item(i));
3374 break; }
3375
3377 CSG_Grids *pGrids = (CSG_Grids *)Get_Item(i);
3378
3379 for(int j=0; j<pGrids->Get_Grid_Count(); j++)
3380 {
3381 m_Grids.Add(pGrids->Get_Grid_Ptr(j));
3382 }
3383 break; }
3384
3385 default: {
3386 break; }
3387 }
3388 }
3389
3390 if( !m_Grids.Get_Size() && !Get_Parameters()->has_GUI() )
3391 {
3393 {
3395 }
3396 }
3397
3398 return( true );
3399}
3400
3401
3403// //
3404// Grids_List //
3405// //
3407
3408//---------------------------------------------------------
3409CSG_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)
3410 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3411{
3412 // nop
3413}
3414
3415//---------------------------------------------------------
3417{
3419 {
3420 return( Get_Parent()->asGrid_System() );
3421 }
3422
3423 return( NULL );
3424}
3425
3426//---------------------------------------------------------
3428{
3429 if( pObject == NULL || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids )
3430 {
3431 return( false );
3432 }
3433
3434 //-----------------------------------------------------
3435 CSG_Grid_System *pSystem = Get_System();
3436
3437 if( pSystem ) // check grid system compatibility
3438 {
3440 ? ((CSG_Grid *)pObject)->Get_System()
3441 : ((CSG_Grids *)pObject)->Get_System();
3442
3443 if( !pSystem->is_Valid() )
3444 {
3445 Get_Parent()->Set_Value((void *)&System);
3446 }
3447 else if( !pSystem->is_Equal(System) )
3448 {
3449 for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3450 {
3451 CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3452
3453 if( pChild->Get_Type() == PARAMETER_TYPE_Grids )
3454 {
3455 if( pChild->asDataObject() != DATAOBJECT_NOTSET
3456 && pChild->asDataObject() != DATAOBJECT_CREATE )
3457 {
3458 return( false );
3459 }
3460 }
3461
3462 if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3463 {
3464 if( (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3465 {
3466 return( false );
3467 }
3468 }
3469 }
3470
3471 Get_Parent()->Set_Value((void *)&System);
3472 }
3473 }
3474
3475 return( CSG_Parameter_List::Add_Item(pObject) );
3476}
3477
3478
3480// //
3481// Table_List //
3482// //
3484
3485
3486//---------------------------------------------------------
3487CSG_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)
3488 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3489{
3490 // nop
3491}
3492
3493
3495// //
3496// Shapes_List //
3497// //
3499
3500
3501//---------------------------------------------------------
3502CSG_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)
3503 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3504{
3506}
3507
3508//---------------------------------------------------------
3513
3514//---------------------------------------------------------
3516{
3517 m_Type = ((CSG_Parameter_Shapes_List *)pSource)->m_Type;
3518
3519 return( CSG_Parameter_List::_Assign(pSource) );
3520}
3521
3522
3524// //
3525// TIN_List //
3526// //
3528
3529
3530//---------------------------------------------------------
3531CSG_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)
3532 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3533{
3534 // nop
3535}
3536
3537
3539// //
3540// PointCloud_List //
3541// //
3543
3544
3545//---------------------------------------------------------
3546CSG_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)
3547 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3548{
3549 // nop
3550}
3551
3552
3554// //
3555// Parameters //
3556// //
3558
3559//---------------------------------------------------------
3560CSG_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)
3561 : CSG_Parameter(pParameters, pParent, ID, Name, Description, Constraint)
3562{
3563 m_pParameters = new CSG_Parameters(pParameters->Get_Owner(), Name, Description, ID);
3564}
3565
3570
3571//---------------------------------------------------------
3573{
3574 return( m_pParameters->Restore_Defaults() );
3575}
3576
3577//---------------------------------------------------------
3579{
3580 m_String.Printf("%d %s", m_pParameters->Get_Count(), _TL("parameters"));
3581}
3582
3583//---------------------------------------------------------
3585{
3586 return( m_pParameters );
3587}
3588
3589//---------------------------------------------------------
3591{
3592 m_pParameters->Assign(pSource->asParameters());
3593
3594 return( true );
3595}
3596
3597//---------------------------------------------------------
3599{
3600 if( m_pParameters->Serialize(Entry, bSave) )
3601 {
3602 if( bSave )
3603 {
3604 Entry.Set_Property("id" , Get_Identifier ());
3605 Entry.Set_Property("type", Get_Type_Identifier());
3606 }
3607
3608 return( true );
3609 }
3610
3611 return( false );
3612}
3613
3614
3616// //
3617// //
3618// //
3620
3621//---------------------------------------------------------
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:1302
#define SG_GET_G(rgb)
Definition api_core.h:1301
#define SG_DATATYPES_Bit
Definition api_core.h:1019
#define SG_DATATYPES_Numeric
Definition api_core.h:1039
#define SG_DATATYPES_Table
Definition api_core.h:1040
signed long long sLong
Definition api_core.h:158
#define SG_DATATYPES_Integer
Definition api_core.h:1037
#define SG_GET_R(rgb)
Definition api_core.h:1300
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:1043
#define SG_DATATYPES_Standard
Definition api_core.h:1034
#define SG_DATATYPES_Undefined
Definition api_core.h:1018
#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:997
@ SG_DATATYPE_Long
Definition api_core.h:1006
@ SG_DATATYPE_Byte
Definition api_core.h:999
@ SG_DATATYPE_Bit
Definition api_core.h:998
@ SG_DATATYPE_Short
Definition api_core.h:1002
@ SG_DATATYPE_Word
Definition api_core.h:1001
@ SG_DATATYPE_ULong
Definition api_core.h:1005
@ SG_DATATYPE_Float
Definition api_core.h:1007
@ SG_DATATYPE_Undefined
Definition api_core.h:1013
@ SG_DATATYPE_Binary
Definition api_core.h:1012
@ SG_DATATYPE_Double
Definition api_core.h:1008
@ SG_DATATYPE_Color
Definition api_core.h:1011
@ SG_DATATYPE_Int
Definition api_core.h:1004
@ SG_DATATYPE_Char
Definition api_core.h:1000
@ SG_DATATYPE_String
Definition api_core.h:1009
@ SG_DATATYPE_DWord
Definition api_core.h:1003
@ SG_DATATYPE_Date
Definition api_core.h:1010
#define SG_Char
Definition api_core.h:536
#define SG_GET_RGB(r, g, b)
Definition api_core.h:1297
#define _TL(s)
Definition api_core.h:1568
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:480
static CSG_DateTime Now(void)
Definition datetime.cpp:585
bool Parse_ISODate(const CSG_String &date)
Definition datetime.cpp:511
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:252
CSG_Grid * Get_Grid_Ptr(int i) const
Definition grids.h:263
void Fmt_Content(const char *Format,...)
Definition metadata.cpp:510
int Get_Children_Count(void) const
Definition metadata.h:148
CSG_MetaData * Get_Child(int Index) const
Definition metadata.h:149
bool Set_Property(const CSG_String &Name, const CSG_String &Value, bool bAddIfNotExists=true)
Definition metadata.cpp:615
bool Cmp_Content(const CSG_String &String, bool bNoCase=false) const
Definition metadata.cpp:548
const CSG_String & Get_Content(void) const
Definition metadata.h:133
const SG_Char * Get_Property(int Index) const
Definition metadata.h:181
void Set_Content(const CSG_String &Content)
Definition metadata.h:140
CSG_MetaData * Add_Child(void)
Definition metadata.cpp:166
bool Add_Property(const CSG_String &Name, const CSG_String &Value)
Definition metadata.cpp:559
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)
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
int CmpNoCase(const CSG_String &String) const
int Cmp(const CSG_String &String) const
CSG_String BeforeFirst(char Character) const
size_t Replace(const CSG_String &Old, const CSG_String &New, bool bReplaceAll=true)
CSG_String BeforeLast(char Character) const
static CSG_String Format(const char *Format,...)
int Trim(bool fromRight=false)
int asInt(void) const
bool is_Empty(void) const
double asDouble(void) const
bool Add(const CSG_Strings &Strings)
int Get_Count(void) const
Definition api_core.h:714
void Clear(void)
Definition api_core.h:736
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:362
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
Definition table.cpp:823
int Get_Field_Count(void) const
Definition table.h:361
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