SAGA API Version 9.14
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 = SG_Get_String(Get_Min(), -16) + "; " + SG_Get_String(Get_Max(), -16);
774}
775
776//---------------------------------------------------------
781
782bool CSG_Parameter_Range::Set_Range(double Min, double Max)
783{
784 bool bResult;
785
786 if( Min > Max )
787 {
788 bResult = m_pMin->Set_Value(Max);
789 bResult |= m_pMax->Set_Value(Min);
790 }
791 else
792 {
793 bResult = m_pMin->Set_Value(Min);
794 bResult |= m_pMax->Set_Value(Max);
795 }
796
797 return( bResult );
798}
799
800//---------------------------------------------------------
802{
803 if( m_pMin->Set_Value(Value) )
804 {
805 has_Changed();
806
807 return( true );
808 }
809
810 return( false );
811}
812
814{
815 return( m_pMin->asDouble() );
816}
817
818//---------------------------------------------------------
820{
821 if( m_pMax->Set_Value(Value) )
822 {
823 has_Changed();
824
825 return( true );
826 }
827
828 return( false );
829}
830
832{
833 return( m_pMax->asDouble() );
834}
835
836//---------------------------------------------------------
838{
839 return( m_pMin->is_Default() && m_pMax->is_Default() );
840}
841
842//---------------------------------------------------------
844{
845 return( m_pMin->Restore_Default() && m_pMax->Restore_Default() );
846}
847
848//---------------------------------------------------------
850{
851 m_pMin->Assign(pSource->asRange()->m_pMin);
852 m_pMax->Assign(pSource->asRange()->m_pMax);
853
854 return( true );
855}
856
857//---------------------------------------------------------
859{
860 if( bSave )
861 {
862 Entry.Set_Content(SG_Get_String(Get_Min(), -16) + "; " + SG_Get_String(Get_Max(), -16));
863
864 return( true );
865 }
866 else
867 {
868 CSG_String s(Entry.Get_Content()); double Min, Max;
869
870 if( s.BeforeFirst(';').asDouble(Min) && s.AfterFirst(';').asDouble(Max) )
871 {
872 return( Set_Range(Min, Max) );
873 }
874 }
875
876 return( false );
877}
878
879
881// //
882// Choice //
883// //
885
886//---------------------------------------------------------
887CSG_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)
888 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
889{
890 m_Value = -1;
891}
892
893//---------------------------------------------------------
895{
896 return( m_Value == Get_Default().asInt() );
897}
898
899//---------------------------------------------------------
901{
902 return( Set_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 )
1050 {
1051 Value = m_Items.Get_Count() - 1 - Value;
1052 }
1053
1054 if( Value >= 0 && Value < m_Items.Get_Count() )
1055 {
1056 if( m_Value != Value )
1057 {
1058 m_Value = Value;
1059
1061 }
1062
1064 }
1065
1067}
1068
1069//---------------------------------------------------------
1071{
1072 return( _Set_Value((int)Value) );
1073}
1074
1075//---------------------------------------------------------
1077{
1079
1080 if( Resampling != CSG_Grid_Resampling::Undefined )
1081 {
1082 if( Resampling == Value )
1083 {
1085 }
1086
1087 for(int i=0, Data; i<m_Data.Get_Count(); i++)
1088 {
1089 if( m_Data[i].asInt(Data) && Data == (int)Value )
1090 {
1091 m_Value = i;
1092
1094 }
1095 }
1096 }
1097
1099}
1100
1101//---------------------------------------------------------
1103{
1104 if( !Value.is_Empty() )
1105 {
1106 for(int i=0; i<m_Items.Get_Count(); i++)
1107 {
1108 if( !Value.Cmp(Get_Item_Data(i)) || !Value.Cmp(Get_Item(i)) )
1109 {
1110 return( _Set_Value(i) );
1111 }
1112 }
1113
1114 int Index; // choice not found? then test, if value string is an integer specifying the index position
1115
1116 if( Value.asInt(Index) && Index >= 0 && Index < m_Items.Get_Count() )
1117 {
1118 return( _Set_Value(Index) );
1119 }
1120
1121 }
1122
1124}
1125
1126//---------------------------------------------------------
1128{
1129 m_String = m_Value >= 0 && m_Value < Get_Count() ? Get_Item(m_Value) : _TL("<no choice available>");
1130}
1131
1132//---------------------------------------------------------
1134{
1135 m_Items = pSource->asChoice()->m_Items;
1136 m_Data = pSource->asChoice()->m_Data ;
1137 m_Value = pSource->asChoice()->m_Value;
1138
1139 _Set_String(); // items have changed
1140
1141 return( true );
1142}
1143
1144//---------------------------------------------------------
1146{
1147 if( bSave )
1148 {
1149 Entry.Add_Property("index", m_Value);
1150
1151 Entry.Set_Content(asString());
1152
1153 return( true );
1154 }
1155 else
1156 {
1157 int Index;
1158
1159 return( (Entry.Get_Property("index", Index) || Entry.Get_Content().asInt(Index)) && _Set_Value(Index) );
1160 }
1161}
1162
1163
1165// //
1166// Data Type //
1167// //
1169
1170//---------------------------------------------------------
1171CSG_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)
1172 : CSG_Parameter_Choice(pOwner, pParent, ID, Name, Description, Constraint)
1173{
1174 // nop
1175}
1176
1177//---------------------------------------------------------
1186//---------------------------------------------------------
1187bool CSG_Parameter_Data_Type::Set_Data_Types(int Data_Types, TSG_Data_Type Default, const CSG_String &User)
1188{
1189 if( Data_Types <= SG_DATATYPES_Undefined )
1190 {
1191 Data_Types = SG_DATATYPES_Standard;
1192 }
1193
1194 if( Default == SG_DATATYPE_Undefined && User.is_Empty() )
1195 {
1196 switch( Data_Types )
1197 {
1198 case (SG_DATATYPES_Integer ): Default = SG_DATATYPE_Int ; break;
1199 case (SG_DATATYPES_Integer|SG_DATATYPES_Bit): Default = SG_DATATYPE_Int ; break;
1200 case (SG_DATATYPES_Numeric ): Default = SG_DATATYPE_Float ; break;
1202 case (SG_DATATYPES_Table ): Default = SG_DATATYPE_String; break;
1203 case (SG_DATATYPES_Standard ): Default = SG_DATATYPE_String; break;
1204 }
1205 }
1206
1207 #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)); }
1208
1209 int _Default = -1;
1210
1211 ADD_TYPE(SG_DATATYPE_String); // data types are added in this order to the choice item list
1226
1227 if( !User.is_Empty() )
1228 {
1229 if( _Default < 0 )
1230 {
1231 _Default = Get_Count();
1232 }
1233
1235 }
1236 else if( _Default < 0 )
1237 {
1238 _Default = 0;
1239 }
1240
1241 Set_Default(_Default); Set_Value(_Default);
1242
1243 return( true );
1244}
1245
1246//---------------------------------------------------------
1253//---------------------------------------------------------
1255{
1256 for(int i=0; i<Get_Count(); i++)
1257 {
1258 if( Value == SG_Data_Type_Get_Type(Get_Item_Data(i)) )
1259 {
1260 return( Set_Value(i) );
1261 }
1262 }
1263
1264 return( false );
1265}
1266
1267//---------------------------------------------------------
1275//---------------------------------------------------------
1277{
1279
1280 return( Type == SG_DATATYPE_Undefined ? Default : Type );
1281}
1282
1283//---------------------------------------------------------
1285{
1286 return( CSG_Parameter_Choice::_Assign(pSource) );
1287}
1288
1289//---------------------------------------------------------
1291{
1292 return( CSG_Parameter_Choice::_Serialize(Entry, bSave) );
1293}
1294
1295
1297// //
1298// Choices //
1299// //
1301
1302//---------------------------------------------------------
1303CSG_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)
1304 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1305{
1306 // nop
1307}
1308
1309//---------------------------------------------------------
1311{
1312 CSG_String_Tokenizer Tokens(Value, ";");
1313
1314 m_Selection.Destroy();
1315
1316 while( Tokens.Has_More_Tokens() )
1317 {
1318 int Index;
1319
1320 if( Tokens.Get_Next_Token().asInt(Index) )
1321 {
1322 Select(Index);
1323 }
1324 }
1325
1327}
1328
1329//---------------------------------------------------------
1331{
1332 m_String.Clear();
1333
1335 {
1336 m_String = _TL("All items selected");
1337 return;
1338 }
1339
1340 for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1341 {
1343 }
1344
1345 if( m_String.is_Empty() )
1346 {
1347 if( Get_Item_Count() == 0 )
1348 {
1349 m_String = _TL("No items");
1350 }
1351 else
1352 {
1353 m_String.Printf("%d %s", Get_Item_Count(), Get_Item_Count() == 1 ? _TL("item") : _TL("items"));
1354 }
1355 }
1356}
1357
1358//---------------------------------------------------------
1360{
1361 Del_Items();
1362
1363 CSG_String_Tokenizer Tokens(Items, "|");
1364
1365 while( Tokens.Has_More_Tokens() )
1366 {
1367 Add_Item(Tokens.Get_Next_Token());
1368 }
1369}
1370
1371//---------------------------------------------------------
1373{
1374 Del_Items();
1375
1376 for(int i=0; i<Items.Get_Count(); i++)
1377 {
1378 Add_Item(Items[i]);
1379 }
1380}
1381
1382//---------------------------------------------------------
1384{
1385 CSG_String Items;
1386
1387 for(int i=0; i<m_Items[0].Get_Count(); i++)
1388 {
1389 if( i > 0 )
1390 {
1391 Items += "|";
1392 }
1393
1394 Items += m_Items[0][i];
1395 }
1396
1397 return( Items );
1398}
1399
1400//---------------------------------------------------------
1402{
1403 m_Items[0].Clear();
1404 m_Items[1].Clear();
1405
1406 m_Selection.Destroy();
1407}
1408
1409//---------------------------------------------------------
1411{
1412 m_Items[0] += Item;
1413 m_Items[1] += Data;
1414}
1415
1416//---------------------------------------------------------
1418{
1419 for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1420 {
1421 if( Index == m_Selection[i] )
1422 {
1423 return( true );
1424 }
1425 }
1426
1427 return( false );
1428}
1429
1430//---------------------------------------------------------
1431bool CSG_Parameter_Choices::Select(int Index, bool bSelect)
1432{
1433 if( Index >= 0 && Index < Get_Item_Count() )
1434 {
1435 if( bSelect && !is_Selected(Index) )
1436 {
1437 m_Selection += Index;
1438 }
1439 else if( !bSelect )
1440 {
1441 for(size_t i=0; i<m_Selection.Get_uSize(); i++)
1442 {
1443 if( Index == m_Selection[i] )
1444 {
1445 for(size_t j=i+1; j<m_Selection.Get_uSize(); i++, j++)
1446 {
1447 m_Selection[i] = m_Selection[j];
1448 }
1449
1450 m_Selection.Dec_Array();
1451 }
1452 }
1453 }
1454
1455 return( true );
1456 }
1457
1458 return( false );
1459}
1460
1461//---------------------------------------------------------
1463{
1464 m_Selection.Destroy();
1465
1466 return( true );
1467}
1468
1469//---------------------------------------------------------
1471{
1472 m_Items[0] = pSource->asChoices()->m_Items[0];
1473 m_Items[1] = pSource->asChoices()->m_Items[1];
1474
1475 m_Selection = pSource->asChoices()->m_Selection;
1476
1477 return( true );
1478}
1479
1480//---------------------------------------------------------
1482{
1483 if( bSave )
1484 {
1485 Entry.Set_Content(asString());
1486
1487 return( true );
1488 }
1489 else
1490 {
1491 return( _Set_Value(Entry.Get_Content()) != 0 );
1492 }
1493}
1494
1495
1497// //
1498// String //
1499// //
1501
1502//---------------------------------------------------------
1503CSG_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)
1504 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1505{
1506 m_bPassword = false;
1507}
1508
1509//---------------------------------------------------------
1511{
1512 return( !m_String.is_Empty() );
1513}
1514
1515//---------------------------------------------------------
1517{
1518 m_bPassword = bOn;
1519}
1520
1521//---------------------------------------------------------
1523{
1524 return( m_bPassword );
1525}
1526
1527//---------------------------------------------------------
1529{
1530 if( m_String.Cmp(Value) )
1531 {
1532 m_String = Value;
1533
1535 }
1536
1538}
1539
1540//---------------------------------------------------------
1542{
1543 m_String = ((CSG_Parameter_String *)pSource)->m_String;
1544 m_bPassword = ((CSG_Parameter_String *)pSource)->m_bPassword;
1545
1546 return( true );
1547}
1548
1549//---------------------------------------------------------
1551{
1552 if( bSave )
1553 {
1554 Entry.Set_Content(m_String);
1555 }
1556 else
1557 {
1558 m_String = Entry.Get_Content();
1559 }
1560
1561 return( true );
1562}
1563
1564
1566// //
1567// Text //
1568// //
1570
1571//---------------------------------------------------------
1572CSG_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)
1573 : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1574{
1575 // nop
1576}
1577
1578
1580// //
1581// FilePath //
1582// //
1584
1585//---------------------------------------------------------
1586CSG_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)
1587 : CSG_Parameter_String(pOwner, pParent, ID, Name, Description, Constraint)
1588{
1589 m_Filter.Printf("%s|*.*", _TL("All Files"));
1590
1591 m_bSave = false;
1592 m_bMultiple = false;
1593 m_bDirectory = false;
1594}
1595
1596//---------------------------------------------------------
1598{
1599 if( Filter )
1600 {
1601 m_Filter = Filter;
1602 }
1603 else
1604 {
1605 m_Filter.Printf("%s|*.*", _TL("All Files"));
1606 }
1607}
1608
1610{
1611 return( m_Filter.c_str() );
1612}
1613
1614//---------------------------------------------------------
1616{
1617 m_bSave = bFlag;
1618}
1619
1621{
1622 m_bMultiple = bFlag;
1623}
1624
1626{
1627 m_bDirectory = bFlag;
1628}
1629
1630//---------------------------------------------------------
1632{
1633 FilePaths.Clear();
1634
1635 if( m_String.Length() > 0 )
1636 {
1637 if( !m_bMultiple )
1638 {
1639 FilePaths.Add(m_String);
1640 }
1641 else if( m_String[0] != '\"' )
1642 {
1643 FilePaths.Add(m_String);
1644 }
1645 else
1646 {
1648
1649 while( s.Length() > 2 )
1650 {
1651 s = s.AfterFirst('\"');
1652 FilePaths.Add(s.BeforeFirst('\"'));
1653 s = s.AfterFirst('\"');
1654 }
1655 }
1656 }
1657
1658 return( FilePaths.Get_Count() > 0 );
1659}
1660
1661//---------------------------------------------------------
1663{
1665
1666 Set_Filter(((CSG_Parameter_File_Name *)pSource)->m_Filter.c_str());
1667
1668 m_bSave = pSource->asFilePath()->m_bSave;
1669 m_bMultiple = pSource->asFilePath()->m_bMultiple;
1670 m_bDirectory = pSource->asFilePath()->m_bDirectory;
1671
1672 return( true );
1673}
1674
1675
1677// //
1678// Font //
1679// //
1681
1682//---------------------------------------------------------
1683CSG_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)
1684 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1685{
1687}
1688
1689//---------------------------------------------------------
1691{
1692 m_Color = SG_GET_RGB(0, 0, 0);
1693#ifdef __WXMAC__
1694 m_String = ".applesystemuifont 11 utf-8";
1695#else
1696 m_String = "0;-12;0;0;0;400;0;0;0;0;3;2;1;34;Arial";
1697#endif
1698
1699 return( true );
1700}
1701
1702//---------------------------------------------------------
1704{
1705 if( m_Color != Value )
1706 {
1707 m_Color = Value;
1708
1710 }
1711
1713}
1714
1715//---------------------------------------------------------
1717{
1718 if( Value.is_Empty() )
1719 {
1721
1723 }
1724
1725 m_String = Value;
1726
1728}
1729
1730//---------------------------------------------------------
1732{
1733 return( m_Color );
1734}
1735
1736//---------------------------------------------------------
1738{
1739 return( (void *)m_String.c_str() );
1740}
1741
1742//---------------------------------------------------------
1744{
1745 m_Color = ((CSG_Parameter_Font *)pSource)->m_Color;
1746 m_String = ((CSG_Parameter_Font *)pSource)->m_String;
1747
1748 return( true );
1749}
1750
1751//---------------------------------------------------------
1753{
1754 if( bSave )
1755 {
1756 Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1758 ));
1759
1760 Entry.Add_Child("FONT", m_String);
1761 }
1762 else
1763 {
1764 if( Entry("COLOR") != NULL )
1765 {
1767 Entry("COLOR")->Get_Content().AfterFirst('R').asInt(),
1768 Entry("COLOR")->Get_Content().AfterFirst('G').asInt(),
1769 Entry("COLOR")->Get_Content().AfterFirst('B').asInt()
1770 ));
1771 }
1772
1773 if( Entry("FONT") != NULL )
1774 {
1775 _Set_Value(Entry("FONT")->Get_Content());
1776 }
1777 }
1778
1779 return( true );
1780}
1781
1782
1784// //
1785// Color //
1786// //
1788
1789//---------------------------------------------------------
1790CSG_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)
1791 : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
1792{
1793 // nop
1794}
1795
1796//---------------------------------------------------------
1798{
1799 long l;
1800
1801 if( SG_Color_From_Text(Value, l) )
1802 {
1803 return( CSG_Parameter_Int::_Set_Value((int)l) );
1804 }
1805
1806 int i;
1807
1808 if( Value.asInt(i) )
1809 {
1810 return( CSG_Parameter_Int::_Set_Value(i) );
1811 }
1812
1814}
1815
1816//---------------------------------------------------------
1818{
1819 if( bSave )
1820 {
1821 Entry.Fmt_Content("R%03d G%03d B%03d", SG_GET_R(m_Value), SG_GET_G(m_Value), SG_GET_B(m_Value));
1822 }
1823 else
1824 {
1826 Entry.Get_Content().AfterFirst('R').asInt(),
1827 Entry.Get_Content().AfterFirst('G').asInt(),
1828 Entry.Get_Content().AfterFirst('B').asInt()
1829 );
1830 }
1831
1832 return( true );
1833}
1834
1835
1837// //
1838// Colors //
1839// //
1841
1842//---------------------------------------------------------
1843CSG_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)
1844 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1845{
1846 // nop
1847}
1848
1849//---------------------------------------------------------
1851{
1852 if( Value >= 0 && Value < CSG_Colors::Get_Predefined_Count() )
1853 {
1854 if( m_Colors.Create(0, Value) )
1855 {
1857 }
1858 }
1859
1861}
1862
1863//---------------------------------------------------------
1865{
1866 CSG_Colors Colors;
1867
1868 if( Colors.Load(Value) )
1869 {
1870 m_Colors = Colors;
1871
1873 }
1874
1876}
1877
1878//---------------------------------------------------------
1880{
1881 try
1882 {
1883 if( Value && m_Colors.Create(*(CSG_Colors *)Value) )
1884 {
1886 }
1887 }
1888 catch(...)
1889 {
1890 }
1891
1893}
1894
1895//---------------------------------------------------------
1897{
1898 m_String.Printf("%d %s", m_Colors.Get_Count(), _TL("colors"));
1899}
1900
1901//---------------------------------------------------------
1903{
1904 return( m_Colors.Get_Count() );
1905}
1906
1907//---------------------------------------------------------
1909{
1910 return( (void *)&m_Colors );
1911}
1912
1913//---------------------------------------------------------
1915{
1916 return( m_Colors.Assign(pSource->asColors()) );
1917}
1918
1919//---------------------------------------------------------
1921{
1922 if( bSave )
1923 {
1924 for(int i=0; i<m_Colors.Get_Count(); i++)
1925 {
1926 Entry.Add_Child("COLOR", CSG_String::Format("R%03d G%03d B%03d",
1927 m_Colors.Get_Red (i),
1928 m_Colors.Get_Green(i),
1929 m_Colors.Get_Blue (i))
1930 );
1931 }
1932 }
1933 else
1934 {
1935 if( Entry.Get_Children_Count() <= 1 )
1936 {
1937 return( false );
1938 }
1939
1940 m_Colors.Set_Count(Entry.Get_Children_Count());
1941
1942 for(int i=0; i<m_Colors.Get_Count(); i++)
1943 {
1944 CSG_String s(Entry(i)->Get_Content());
1945
1946 m_Colors.Set_Red (i, s.AfterFirst('R').asInt());
1947 m_Colors.Set_Green(i, s.AfterFirst('G').asInt());
1948 m_Colors.Set_Blue (i, s.AfterFirst('B').asInt());
1949 }
1950 }
1951
1952 return( true );
1953}
1954
1955
1957// //
1958// FixedTable //
1959// //
1961
1962//---------------------------------------------------------
1963CSG_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)
1964 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
1965{
1966 m_Table.Set_Name(_TL("Table"));
1967}
1968
1969//---------------------------------------------------------
1971{
1972 if( Value && m_Table.Assign_Values((CSG_Table *)Value) )
1973 {
1975 }
1976
1978}
1979
1980//---------------------------------------------------------
1982{
1983 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());
1984}
1985
1986//---------------------------------------------------------
1988{
1989 return( (void *)&m_Table );
1990}
1991
1992//---------------------------------------------------------
1994{
1995 return( m_Table.Create(*pSource->asTable()) );
1996}
1997
1998//---------------------------------------------------------
2000{
2001 int iField;
2002
2003 if( bSave )
2004 {
2005 CSG_MetaData *pNode = Entry.Add_Child("FIELDS");
2006
2007 for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
2008 {
2009 CSG_MetaData *pEntry = pNode->Add_Child("FIELD", m_Table.Get_Field_Name(iField));
2010
2011 pEntry->Set_Property("type", gSG_Data_Type_Identifier[m_Table.Get_Field_Type(iField)]);
2012 }
2013
2014 pNode = Entry.Add_Child("RECORDS");
2015
2016 for(sLong iRecord=0; iRecord<m_Table.Get_Count(); iRecord++)
2017 {
2018 CSG_MetaData *pEntry = pNode->Add_Child("RECORD");
2019
2020 CSG_Table_Record *pRecord = m_Table.Get_Record(iRecord);
2021
2022 for(iField=0; iField<m_Table.Get_Field_Count(); iField++)
2023 {
2024 pEntry->Add_Child("FIELD", pRecord->asString(iField));
2025 }
2026 }
2027 }
2028 else
2029 {
2030 CSG_MetaData *pNode;
2031
2032 if( (pNode = Entry("FIELDS")) == NULL )
2033 {
2034 return( false );
2035 }
2036
2037 CSG_Table Table;
2038
2039 for(iField=0; iField<pNode->Get_Children_Count(); iField++)
2040 {
2042
2043 CSG_String s;
2044
2045 if( pNode->Get_Child(iField)->Get_Property("type", s) )
2046 {
2047 type = SG_Data_Type_Get_Type(s);
2048 }
2049
2050 Table.Add_Field(pNode->Get_Child(iField)->Get_Content(), type == SG_DATATYPE_Undefined ? SG_DATATYPE_String : type);
2051 }
2052
2053 if( (pNode = Entry("RECORDS")) == NULL )
2054 {
2055 return( false );
2056 }
2057
2058 for(int iRecord=0; iRecord<pNode->Get_Children_Count(); iRecord++)
2059 {
2060 CSG_MetaData *pEntry = pNode->Get_Child(iRecord);
2061
2062 CSG_Table_Record *pRecord = Table.Add_Record();
2063
2064 for(iField=0; iField<pEntry->Get_Children_Count(); iField++)
2065 {
2066 pRecord->Set_Value(iField, pEntry->Get_Child(iField)->Get_Content());
2067 }
2068 }
2069
2070 return( m_Table.Assign_Values(&Table) );
2071 }
2072
2073 return( true );
2074}
2075
2076
2078// //
2079// Grid_System //
2080// //
2082
2083//---------------------------------------------------------
2084CSG_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)
2085 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2086{
2087 // nop
2088}
2089
2090//---------------------------------------------------------
2092{
2093 CSG_Grid_System System;
2094
2095 return( System.Create(Value) ? _Set_Value(&System) : SG_PARAMETER_DATA_SET_FALSE );
2096}
2097
2098//---------------------------------------------------------
2100{
2101 CSG_Grid_System System;
2102
2103 if( Value != NULL )
2104 {
2105 System.Create(*((CSG_Grid_System *)Value));
2106 }
2107
2108 if( m_System == System )
2109 {
2111 }
2112
2113 m_System = System;
2114
2115 //-----------------------------------------------------
2116 bool bCallback = Get_Parameters()->Set_Callback(false); // only update grid parameter objects in 1st loop...
2117
2118 for(int i=0; i<Get_Children_Count(); i++)
2119 {
2120 CSG_Parameter *pParameter = Get_Child(i);
2121
2122 if( pParameter->is_DataObject() )
2123 {
2124 CSG_Data_Object *pObject = pParameter->asDataObject();
2125
2126 if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2127 {
2128 bool bInvalid = !m_System.is_Valid() || !(Get_Manager() && Get_Manager()->Exists(pObject));
2129
2130 if( !bInvalid )
2131 {
2132 switch( pObject->Get_ObjectType() )
2133 {
2134 case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2135 case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2136 default: break;
2137 }
2138 }
2139
2140 if( bInvalid )
2141 {
2142 pParameter->Set_Value(DATAOBJECT_NOTSET);
2143 }
2144 }
2145 }
2146
2147 //-------------------------------------------------
2148 else if( pParameter->is_DataObject_List() )
2149 {
2150 CSG_Parameter_List *pList = pParameter->asList();
2151
2152 if( !m_System.is_Valid() )
2153 {
2154 pList->Del_Items();
2155 }
2156 else for(int j=pList->Get_Item_Count()-1; j>=0; j--)
2157 {
2158 CSG_Data_Object *pObject = pList->Get_Item(j);
2159
2160 bool bInvalid = !(Get_Manager() && Get_Manager()->Exists(pObject));
2161
2162 if( !bInvalid && pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
2163 {
2164 switch( pObject->Get_ObjectType() )
2165 {
2166 case SG_DATAOBJECT_TYPE_Grid : bInvalid = !m_System.is_Equal(((CSG_Grid *)pObject)->Get_System()); break;
2167 case SG_DATAOBJECT_TYPE_Grids: bInvalid = !m_System.is_Equal(((CSG_Grids *)pObject)->Get_System()); break;
2168 default: break;
2169 }
2170 }
2171
2172 if( bInvalid )
2173 {
2174 pList->Del_Item(j);
2175 }
2176 }
2177 }
2178 }
2179
2180 Get_Parameters()->Set_Callback(bCallback);
2181
2182 if( bCallback ) // ...process On_Parameter_Changed()/On_Parameters_Enable() in a 2nd loop!
2183 {
2184 for(int i=0; i<Get_Children_Count(); i++)
2185 {
2186 CSG_Parameter *pParameter = Get_Child(i);
2187
2188 if( pParameter->is_DataObject() || pParameter->is_DataObject_List() )
2189 {
2190 pParameter->has_Changed();
2191 }
2192 }
2193 }
2194
2195 //-----------------------------------------------------
2197}
2198
2199//---------------------------------------------------------
2201{
2202 m_String = m_System.Get_Name();
2203}
2204
2205//---------------------------------------------------------
2207{
2208 return( (void *)&m_System );
2209}
2210
2211//---------------------------------------------------------
2213{
2214 m_System = ((CSG_Parameter_Grid_System *)pSource)->m_System;
2215
2216 return( true );
2217}
2218
2219//---------------------------------------------------------
2221{
2222 if( bSave )
2223 {
2224 Entry.Add_Child("CELLSIZE", m_System.Get_Cellsize());
2225 Entry.Add_Child("XMIN" , m_System.Get_Extent().Get_XMin());
2226 Entry.Add_Child("YMIN" , m_System.Get_Extent().Get_YMin());
2227 Entry.Add_Child("XMAX" , m_System.Get_Extent().Get_XMax());
2228 Entry.Add_Child("YMAX" , m_System.Get_Extent().Get_YMax());
2229 }
2230 else
2231 {
2232 m_System.Create(
2233 Entry("CELLSIZE")->Get_Content().asDouble(),
2234 Entry("XMIN" )->Get_Content().asDouble(),
2235 Entry("YMIN" )->Get_Content().asDouble(),
2236 Entry("XMAX" )->Get_Content().asDouble(),
2237 Entry("YMAX" )->Get_Content().asDouble()
2238 );
2239 }
2240
2241 return( true );
2242}
2243
2244
2246// //
2247// Table Field //
2248// //
2250
2251//---------------------------------------------------------
2252CSG_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)
2253 : CSG_Parameter_Int(pOwner, pParent, ID, Name, Description, Constraint)
2254{
2255 m_Default = -1;
2256 m_Value = -1;
2257}
2258
2259//---------------------------------------------------------
2260bool CSG_Parameter_Table_Field::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2261{
2262 if( m_Default < 0 && is_Optional() )
2263 {
2265
2267 _TL("Default"), _TL("default value if no attribute has been selected"),
2268 Value, Minimum, bMinimum, Maximum, bMaximum
2269 );
2270 }
2271
2272 return( m_Default >= 0 );
2273}
2274
2275//---------------------------------------------------------
2277{
2278 CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2279
2280 return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2281}
2282
2283//---------------------------------------------------------
2285{
2286 CSG_Table *pTable = Get_Table();
2287
2288 if( pTable != NULL && pTable->Get_Field_Count() > 0 )
2289 {
2290 if( Value < 0 )
2291 {
2292 Value = pTable->Get_Field_Count() - 1 - Value;
2293 }
2294
2295 if( Value < 0 || Value >= pTable->Get_Field_Count() )
2296 {
2297 Value = !is_Optional() ? pTable->Get_Field_Count() - 1 : -1;
2298 }
2299 }
2300 else
2301 {
2302 Value = -1;
2303 }
2304
2305 if( Get_Child(m_Default) )
2306 {
2307 Get_Child(m_Default)->Set_Enabled(Value < 0);
2308 }
2309
2310 if( m_Value != Value )
2311 {
2312 m_Value = Value;
2313
2315 }
2316
2318}
2319
2320//---------------------------------------------------------
2322{
2323 CSG_Table *pTable = Get_Table();
2324
2325 if( pTable != NULL )
2326 {
2327 int Index = 0;
2328
2329 for(; Index<pTable->Get_Field_Count(); Index++)
2330 {
2331 if( !Value.CmpNoCase(pTable->Get_Field_Name(Index)) )
2332 {
2333 return( _Set_Value(Index) );
2334 }
2335 }
2336
2337 if( Value.asInt(Index) )
2338 {
2339 return( _Set_Value(Index) );
2340 }
2341 }
2342
2343 return( _Set_Value(-1) );
2344}
2345
2346//---------------------------------------------------------
2348{
2349 CSG_Table *pTable = Get_Table();
2350
2351 if( !pTable || pTable->Get_Field_Count() < 1 )
2352 {
2353 m_String = _TL("<no attributes>");
2354 }
2355 else if( m_Value < 0 || m_Value >= pTable->Get_Field_Count() )
2356 {
2357 m_String = _TL("<not set>");
2358 }
2359 else
2360 {
2361 m_String = pTable->Get_Field_Name(m_Value);
2362 }
2363}
2364
2365//---------------------------------------------------------
2367{
2368 return( Get_Child(m_Default) ? Get_Child(m_Default)->asDouble() : 0. );
2369}
2370
2371//---------------------------------------------------------
2373{
2374 m_Value = ((CSG_Parameter_Table_Field *)pSource)->m_Value;
2375 m_Default = ((CSG_Parameter_Table_Field *)pSource)->m_Default;
2376
2377 _Set_String();
2378
2379 return( true );
2380}
2381
2382//---------------------------------------------------------
2384{
2385 if( bSave )
2386 {
2387 Entry.Set_Property("index", asInt());
2388 Entry.Set_Content(asString());
2389
2390 return( true );
2391 }
2392 else
2393 {
2394 int Index;
2395
2396 if( Entry.Get_Property("index", Index) ) // we require this check for backward compatibility, "index" was first introduced with SAGA 2.2.3 (r2671)
2397 {
2398 return( _Set_Value(Index) != 0 );
2399 }
2400
2401 return( _Set_Value(Entry.Get_Content()) != 0 );
2402 }
2403}
2404
2405//---------------------------------------------------------
2407{
2408 CSG_String Choices;
2409
2410 for(int i=0; i<Table.Get_Field_Count(); i++)
2411 {
2412 if( i > 0 ) { Choices += "|"; }
2413
2414 Choices += Table.Get_Field_Name(i);
2415 }
2416
2417 if( bAllowNone )
2418 {
2419 if( Table.Get_Field_Count() ) { Choices += "|"; }
2420
2421 Choices += _TL("<not set>");
2422 }
2423
2424 return( Choices );
2425}
2426
2427
2429// //
2430// Table Fields //
2431// //
2433
2434//---------------------------------------------------------
2435CSG_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)
2436 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2437{
2438 m_Fields = NULL; m_nFields = 0;
2439}
2440
2441//---------------------------------------------------------
2446
2447//---------------------------------------------------------
2449{
2450 CSG_Table *pTable = Get_Table();
2451
2452 if( !pTable || pTable->Get_Field_Count() < 1 )
2453 {
2454 SG_FREE_SAFE(m_Fields); m_nFields = 0; m_String = _TL("<no attributes>");
2455
2457 }
2458
2459 m_Fields = (int *)SG_Realloc(m_Fields, pTable->Get_Field_Count() * sizeof(int));
2460
2461 memset(m_Fields, 0, pTable->Get_Field_Count() * sizeof(int));
2462
2463 //-----------------------------------------------------
2464 CSG_Strings Fields = SG_String_Tokenize(Value, ";,");
2465
2466 for(int i=0, Index; i<Fields.Get_Count(); i++)
2467 {
2468 if( Fields[i].asInt(Index) == false ) // field name?
2469 {
2470 CSG_String s(Fields[i]); s.Trim_Both();
2471
2472 if( !s.is_Empty() )
2473 {
2474 if (s[0] == '[' && s[s.Length() - 1] == ']' ) { s = s.AfterFirst('[' ).BeforeLast(']' ); }
2475 if (s[0] == '\"' && s[s.Length() - 1] == '\"') { s = s.AfterFirst('\"').BeforeLast('\"'); }
2476
2477 Index = pTable->Get_Field(s);
2478 }
2479 }
2480
2481 if( Index >= 0 && Index < pTable->Get_Field_Count() )
2482 {
2483 m_Fields[Index] = 1;
2484 }
2485 }
2486
2487 //-----------------------------------------------------
2488 m_String.Clear(); m_nFields = 0;
2489
2490 for(int iField=0; iField<pTable->Get_Field_Count(); iField++)
2491 {
2492 if( m_Fields[iField] != 0 )
2493 {
2494 m_Fields[m_nFields++] = iField;
2495
2496 m_String += CSG_String::Format(m_String.is_Empty() ? "%d" : ",%d", iField);
2497 }
2498 }
2499
2500 if( m_nFields < 1 )
2501 {
2502 m_String = _TL("<no attributes>");
2503 }
2504
2506}
2507
2508//---------------------------------------------------------
2510{
2511 return( m_nFields );
2512}
2513
2514//---------------------------------------------------------
2516{
2517 return( m_Fields );
2518}
2519
2520//---------------------------------------------------------
2522{
2523 CSG_Table *pTable = Get_Parent() ? Get_Parent()->asTable() : NULL;
2524
2525 return( pTable && pTable != DATAOBJECT_CREATE && pTable->Get_Field_Count() > 0 ? pTable : NULL );
2526}
2527
2528//---------------------------------------------------------
2530{
2531 return( _Set_Value(pSource->asString()) != 0 );
2532}
2533
2534//---------------------------------------------------------
2536{
2537 if( bSave )
2538 {
2539 Entry.Set_Content(m_String);
2540 }
2541 else
2542 {
2543 m_String = Entry.Get_Content();
2544 }
2545
2546 return( true );
2547}
2548
2549
2551// //
2552// DataObject //
2553// //
2555
2556//---------------------------------------------------------
2557CSG_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)
2558 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
2559{
2560 m_pDataObject = NULL;
2561}
2562
2563//---------------------------------------------------------
2565{
2566 return( is_Optional() || (m_pDataObject && m_pDataObject->is_Valid()) );
2567}
2568
2569//---------------------------------------------------------
2571{
2572 if( m_pDataObject != Value )
2573 {
2574 m_pDataObject = (CSG_Data_Object *)Value;
2575
2577 }
2578
2580}
2581
2582//---------------------------------------------------------
2584{
2586 {
2587 m_String = is_Output() && !is_Optional() ? _TL("<create>") : _TL("<not set>");
2588 }
2589 else if( m_pDataObject == DATAOBJECT_CREATE )
2590 {
2591 m_String = _TL("<create>");
2592 }
2593 else
2594 {
2595 m_String = m_pDataObject->Get_Name();
2596 }
2597}
2598
2599//---------------------------------------------------------
2601{
2602 return( m_pDataObject );
2603}
2604
2605//---------------------------------------------------------
2607{
2608 m_pDataObject = ((CSG_Parameter_Data_Object *)pSource)->m_pDataObject;
2609
2610 return( true );
2611}
2612
2613//---------------------------------------------------------
2615{
2616 if( bSave )
2617 {
2619 {
2620 Entry.Set_Content("CREATE");
2621
2622 return( true );
2623 }
2624
2625 if( m_pDataObject == DATAOBJECT_NOTSET )//|| !SG_File_Exists(m_pDataObject->Get_File_Name(false)) )
2626 {
2627 Entry.Set_Content("NOT SET");
2628
2629 return( true );
2630 }
2631
2632 if( !m_pDataObject->Get_Owner() )
2633 {
2634 Entry.Set_Content(m_pDataObject->Get_File_Name(false));
2635
2636 return( true );
2637 }
2638
2639 if( m_pDataObject->Get_Owner()->Get_ObjectType() == SG_DATAOBJECT_TYPE_Grids )
2640 {
2641 CSG_Grids *pGrids = m_pDataObject->Get_Owner()->asGrids();
2642
2643 for(int i=0; i<pGrids->Get_NZ(); i++)
2644 {
2645 if( pGrids->Get_Grid_Ptr(i) == m_pDataObject )
2646 {
2647 Entry.Set_Content(m_pDataObject->Get_Owner()->Get_File_Name(false));
2648
2649 Entry.Add_Property("index", i);
2650
2651 return( true );
2652 }
2653 }
2654 }
2655 }
2656 else
2657 {
2658 CSG_Data_Object *pDataObject = NULL; int Index = -1;
2659
2660 if( Entry.Cmp_Content("CREATE") )
2661 {
2663
2664 return( true );
2665 }
2666
2667 if( Entry.Cmp_Content("NOT SET") || !Get_Manager() || !(pDataObject = Get_Manager()->Find(Entry.Get_Content(), false)) )
2668 {
2670
2671 return( true );
2672 }
2673
2674 if( !Entry.Get_Property("index", Index) )
2675 {
2676 _Set_Value(pDataObject);
2677
2678 return( true );
2679 }
2680
2681 if( pDataObject->Get_ObjectType() == SG_DATAOBJECT_TYPE_Grids )
2682 {
2683 _Set_Value(pDataObject->asGrids()->Get_Grid_Ptr(Index));
2684
2685 return( true );
2686 }
2687 }
2688
2689 return( false );
2690}
2691
2692
2694// //
2695// DataObject_Output //
2696// //
2698
2699//---------------------------------------------------------
2701 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2702{
2704}
2705
2706//---------------------------------------------------------
2708{
2709 CSG_Data_Object *pDataObject = (CSG_Data_Object *)Value;
2710
2711 if( m_pDataObject != pDataObject )
2712 {
2713 if( pDataObject == DATAOBJECT_NOTSET || pDataObject == DATAOBJECT_CREATE )
2714 {
2715 m_pDataObject = pDataObject;
2716 }
2717 else if( pDataObject->Get_ObjectType() == m_Type )
2718 {
2719 m_pDataObject = pDataObject;
2720
2721 if( Get_Manager() )
2722 {
2724
2725 if( Get_Manager() == &SG_Get_Data_Manager() ) // prevent that local data manager send their data objects to gui
2726 {
2728 }
2729 }
2730 }
2731
2733 }
2734
2736}
2737
2738//---------------------------------------------------------
2740{
2741 if( m_Type == SG_DATAOBJECT_TYPE_Undefined ) // m_Type should not be changed after set once!!!...
2742 {
2743 switch( Type )
2744 {
2751 m_Type = Type;
2752
2753 return( true );
2754
2755 default:
2756 return( false );
2757 }
2758 }
2759
2760 return( false );
2761}
2762
2763
2765// //
2766// Grid //
2767// //
2769
2770//---------------------------------------------------------
2771CSG_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)
2772 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2773{
2775}
2776
2777//---------------------------------------------------------
2782
2783//---------------------------------------------------------
2785{
2786 return( Get_Parent() ? Get_Parent()->asGrid_System() : NULL );
2787}
2788
2789//---------------------------------------------------------
2790bool CSG_Parameter_Grid::Add_Default(double Value, double Minimum, bool bMinimum, double Maximum, bool bMaximum)
2791{
2792 if( m_Default < 0 && is_Input() && is_Optional() )
2793 {
2795
2797 _TL("Default"), _TL("default value if no grid has been selected"),
2798 Value, Minimum, bMinimum, Maximum, bMaximum
2799 );
2800 }
2801
2802 return( m_Default >= 0 );
2803}
2804
2805//---------------------------------------------------------
2807{
2808 if( Value == m_pDataObject ) // nothing to do
2809 {
2811 }
2812
2813 //-----------------------------------------------------
2814 if( Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE && Get_System() ) // check grid system compatibility
2815 {
2817 ? ((CSG_Grid *)Value)->Get_System()
2818 : ((CSG_Grids *)Value)->Get_System();
2819
2820 if( System.is_Valid() == false )
2821 {
2822 if( is_Input() )
2823 {
2825 }
2826 }
2827 else if( !Get_System()->is_Equal(System) )
2828 {
2829 if( Get_System()->is_Valid() )
2830 {
2831 for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
2832 {
2833 CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
2834
2835 if( pChild->is_Output() && !Get_Parameters()->has_GUI() )
2836 {
2837 continue;
2838 }
2839
2840 if( pChild->Get_Type() == PARAMETER_TYPE_Grid
2841 || pChild->Get_Type() == PARAMETER_TYPE_Grids )
2842 {
2843 if( pChild->asDataObject() != DATAOBJECT_NOTSET
2844 && pChild->asDataObject() != DATAOBJECT_CREATE
2845 && pChild->asDataObject() != m_pDataObject
2846 && pChild->asDataObject() != Value )
2847 {
2849 }
2850 }
2851
2852 if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
2853 {
2854 if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
2855 || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
2856 {
2858 }
2859 }
2860 }
2861 }
2862
2863 Get_Parent()->Set_Value((void *)&System);
2864 }
2865 }
2866
2867 //-----------------------------------------------------
2868 m_pDataObject = (CSG_Data_Object *)Value;
2869
2870 if( Get_Child(m_Default) )
2871 {
2873 }
2874
2876}
2877
2878//---------------------------------------------------------
2880{
2881 return( Get_Child(m_Default) ? Get_Child(m_Default)->asInt () : 0 );
2882}
2883
2884//---------------------------------------------------------
2886{
2887 return( Get_Child(m_Default) ? Get_Child(m_Default)->asDouble() : 0. );
2888}
2889
2890//---------------------------------------------------------
2892{
2893 m_Type = ((CSG_Parameter_Grid *)pSource)->m_Type;
2894 m_Default = ((CSG_Parameter_Grid *)pSource)->m_Default;
2895
2896 return( _Set_Value(pSource->asPointer()) != 0 );
2897}
2898
2899
2901// //
2902// Grids //
2903// //
2905
2906//---------------------------------------------------------
2907CSG_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)
2908 : CSG_Parameter_Grid(pOwner, pParent, ID, Name, Description, Constraint)
2909{
2910 // nop
2911}
2912
2913
2915// //
2916// Table //
2917// //
2919
2920//---------------------------------------------------------
2921CSG_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)
2922 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2923{
2924 // nop
2925}
2926
2927//---------------------------------------------------------
2929{
2930 if( m_pDataObject == Value )
2931 {
2933 }
2934
2935 m_pDataObject = (CSG_Data_Object *)Value;
2936
2937 for(int i=0; i<Get_Children_Count(); i++)
2938 {
2939 CSG_Parameter *pChild = Get_Child(i);
2940
2941 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2942 {
2943 pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2944 }
2945 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2946 {
2947 pChild->Set_Value(CSG_String(""));
2948 }
2949 }
2950
2952}
2953
2954
2956// //
2957// Shapes //
2958// //
2960
2961//---------------------------------------------------------
2962CSG_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)
2963 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
2964{
2966}
2967
2968//---------------------------------------------------------
2970{
2971 if( (is_Input() || Get_Parameters()->has_GUI()) && Value != DATAOBJECT_NOTSET && Value != DATAOBJECT_CREATE
2972 && m_Type != SHAPE_TYPE_Undefined && m_Type != ((CSG_Shapes *)Value)->Get_Type() )
2973 {
2975 }
2976
2977 if( m_pDataObject == Value )
2978 {
2980 }
2981
2982 m_pDataObject = (CSG_Data_Object *)Value;
2983
2984 for(int i=0; i<Get_Children_Count(); i++)
2985 {
2986 CSG_Parameter *pChild = Get_Child(i);
2987
2988 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
2989 {
2990 pChild->Set_Value(m_pDataObject && m_pDataObject != DATAOBJECT_CREATE && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
2991 }
2992 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
2993 {
2994 pChild->Set_Value("");
2995 }
2996 }
2997
2999}
3000
3001//---------------------------------------------------------
3006
3007//---------------------------------------------------------
3009{
3010 m_Type = ((CSG_Parameter_Shapes *)pSource)->m_Type;
3011
3012 return( CSG_Parameter_Data_Object::_Assign(pSource) );
3013}
3014
3015
3017// //
3018// TIN //
3019// //
3021
3022//---------------------------------------------------------
3023CSG_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)
3024 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
3025{
3026 // nop
3027}
3028
3029//---------------------------------------------------------
3031{
3032 if( m_pDataObject == Value )
3033 {
3035 }
3036
3037 m_pDataObject = (CSG_Data_Object *)Value;
3038
3039 for(int i=0; i<Get_Children_Count(); i++)
3040 {
3041 CSG_Parameter *pChild = Get_Child(i);
3042
3043 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
3044 {
3045 pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
3046 }
3047 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
3048 {
3049 pChild->Set_Value("");
3050 }
3051 }
3052
3054}
3055
3056
3058// //
3059// PointCloud //
3060// //
3062
3063//---------------------------------------------------------
3064CSG_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)
3065 : CSG_Parameter_Data_Object(pOwner, pParent, ID, Name, Description, Constraint)
3066{
3067 // nop
3068}
3069
3070//---------------------------------------------------------
3072{
3073 if( m_pDataObject == Value )
3074 {
3076 }
3077
3078 m_pDataObject = (CSG_Data_Object *)Value;
3079
3080 for(int i=0; i<Get_Children_Count(); i++)
3081 {
3082 CSG_Parameter *pChild = Get_Child(i);
3083
3084 if( pChild->Get_Type() == PARAMETER_TYPE_Table_Field )
3085 {
3086 pChild->Set_Value(m_pDataObject && pChild->is_Optional() ? ((CSG_Table *)m_pDataObject)->Get_Field_Count() : 0);
3087 }
3088 else if( pChild->Get_Type() == PARAMETER_TYPE_Table_Fields )
3089 {
3090 pChild->Set_Value("");
3091 }
3092 }
3093
3095}
3096
3097//---------------------------------------------------------
3102
3103
3105// //
3106// List //
3107// //
3109
3110//---------------------------------------------------------
3111CSG_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)
3112 : CSG_Parameter(pOwner, pParent, ID, Name, Description, Constraint)
3113{
3114 // nop
3115}
3116
3117//---------------------------------------------------------
3119{
3120 if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE && m_Objects.Add(pObject) )
3121 {
3122 _Set_String();
3123
3124 return( true );
3125 }
3126
3127 return( false );
3128}
3129
3130bool CSG_Parameter_List::Del_Item(CSG_Data_Object *pObject, bool bUpdateData)
3131{
3132 if( m_Objects.Del(pObject) > 0 )
3133 {
3134 if( bUpdateData )
3135 {
3136 _Set_String();
3137 }
3138
3139 return( true );
3140 }
3141
3142 return( false );
3143}
3144
3145bool CSG_Parameter_List::Del_Item(int Index, bool bUpdateData)
3146{
3147 if( m_Objects.Del(Index) )
3148 {
3149 if( bUpdateData )
3150 {
3151 _Set_String();
3152 }
3153
3154 return( true );
3155 }
3156
3157 return( false );
3158}
3159
3161{
3162 if( m_Objects.Set_Array(0) )
3163 {
3164 _Set_String();
3165
3166 return( true );
3167 }
3168
3169 return( false );
3170}
3171
3172//---------------------------------------------------------
3174{
3175 if( Value == NULL && Get_Item_Count() > 0 && Del_Items() )
3176 {
3178 }
3179
3180 if( Value != NULL && Add_Item((CSG_Data_Object *)Value) )
3181 {
3183 }
3184
3186}
3187
3188//---------------------------------------------------------
3190{
3191 if( Get_Item_Count() > 0 )
3192 {
3193 m_String.Printf("%d %s (", Get_Item_Count(), Get_Item_Count() == 1 ? _TL("object") : _TL("objects"));
3194
3195 for(int i=0; i<Get_Item_Count(); i++)
3196 {
3197 if( i > 0 )
3198 {
3199 m_String += ", ";
3200 }
3201
3202 m_String += Get_Item(i)->Get_Name();
3203 }
3204
3205 m_String += ")";
3206 }
3207 else
3208 {
3209 m_String = _TL("No objects");
3210 }
3211}
3212
3213//---------------------------------------------------------
3215{
3216 return( Get_Item_Count() );
3217}
3218
3219//---------------------------------------------------------
3221{
3222 return( m_Objects.Get_Array() );
3223}
3224
3225//---------------------------------------------------------
3227{
3228 Del_Items();
3229
3230 for(int i=0; i<((CSG_Parameter_List *)pSource)->Get_Item_Count(); i++)
3231 {
3232 if( Get_Manager() != &SG_Get_Data_Manager() || SG_Get_Data_Manager().Exists(((CSG_Parameter_List *)pSource)->Get_Item(i)) )
3233 {
3234 Add_Item(((CSG_Parameter_List *)pSource)->Get_Item(i));
3235 }
3236 }
3237
3238 return( true );
3239}
3240
3241//---------------------------------------------------------
3243{
3244 if( bSave )
3245 {
3246 for(int i=0; i<Get_Item_Count(); i++)
3247 {
3248 CSG_String File = Get_Item(i)->Get_File_Name(false);
3249
3250 if( File.BeforeFirst(':').Cmp("PGSQL") || SG_File_Exists(File) )
3251 {
3252 Entry.Add_Child("DATA", File);
3253 }
3254 }
3255 }
3256 else
3257 {
3258 Del_Items();
3259
3260 for(int i=0; i<Entry.Get_Children_Count(); i++)
3261 {
3262 CSG_Data_Object *pObject = Get_Manager() ? Get_Manager()->Find(Entry.Get_Content(i), false) : NULL;
3263
3264 if( pObject )
3265 {
3266 Add_Item(pObject);
3267 }
3268 }
3269 }
3270
3271 return( true );
3272}
3273
3274
3276// //
3277// Grid_List //
3278// //
3280
3281//---------------------------------------------------------
3282CSG_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)
3283 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3284{
3285 // nop
3286}
3287
3288//---------------------------------------------------------
3290{
3292 {
3293 return( Get_Parent()->asGrid_System() );
3294 }
3295
3296 return( NULL );
3297}
3298
3299//---------------------------------------------------------
3301{
3302 if( pObject == DATAOBJECT_NOTSET || pObject == DATAOBJECT_CREATE
3303 || (pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grid
3304 && pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids) )
3305 {
3306 return( false );
3307 }
3308
3309 //-----------------------------------------------------
3310 if( Get_System() ) // check grid system compatibility
3311 {
3313 ? ((CSG_Grid *)pObject)->Get_System()
3314 : ((CSG_Grids *)pObject)->Get_System();
3315
3316 if( System.is_Valid() == false && is_Input() )
3317 {
3318 return( false );
3319 }
3320
3321 if( !Get_System()->is_Valid() )
3322 {
3323 Get_Parent()->Set_Value((void *)&System);
3324 }
3325 else if( !Get_System()->is_Equal(System) )
3326 {
3327 for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3328 {
3329 CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3330
3331 if( pChild->Get_Type() == PARAMETER_TYPE_Grid
3332 || pChild->Get_Type() == PARAMETER_TYPE_Grids )
3333 {
3334 if( pChild->asDataObject() != DATAOBJECT_NOTSET
3335 && pChild->asDataObject() != DATAOBJECT_CREATE )
3336 {
3337 return( false );
3338 }
3339 }
3340
3341 if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3342 {
3343 if( (pChild->Get_Type() == PARAMETER_TYPE_Grid_List && pChild->asGridList ()->Get_System())
3344 || (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3345 {
3346 return( false );
3347 }
3348 }
3349 }
3350
3351 Get_Parent()->Set_Value((void *)&System);
3352 }
3353 }
3354
3355 return( CSG_Parameter_List::Add_Item(pObject) && Update_Data() );
3356}
3357
3358//---------------------------------------------------------
3360{
3361 return( CSG_Parameter_List::Del_Item(pItem, bUpdateData) );
3362}
3363
3364//---------------------------------------------------------
3365bool CSG_Parameter_Grid_List::Del_Item(int Index, bool bUpdateData)
3366{
3367 return( CSG_Parameter_List::Del_Item(Index, bUpdateData) );
3368}
3369
3370//---------------------------------------------------------
3375
3376//---------------------------------------------------------
3378{
3379 m_Grids.Set_Array(0);
3380
3381 for(int i=0; i<Get_Item_Count(); i++)
3382 {
3383 switch( Get_Item(i)->Get_ObjectType() )
3384 {
3386 m_Grids.Add(Get_Item(i));
3387 break; }
3388
3390 CSG_Grids *pGrids = (CSG_Grids *)Get_Item(i);
3391
3392 for(int j=0; j<pGrids->Get_Grid_Count(); j++)
3393 {
3394 m_Grids.Add(pGrids->Get_Grid_Ptr(j));
3395 }
3396 break; }
3397
3398 default: {
3399 break; }
3400 }
3401 }
3402
3403 if( !m_Grids.Get_Size() && !Get_Parameters()->has_GUI() )
3404 {
3406 {
3408 }
3409 }
3410
3411 return( true );
3412}
3413
3414
3416// //
3417// Grids_List //
3418// //
3420
3421//---------------------------------------------------------
3422CSG_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)
3423 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3424{
3425 // nop
3426}
3427
3428//---------------------------------------------------------
3430{
3432 {
3433 return( Get_Parent()->asGrid_System() );
3434 }
3435
3436 return( NULL );
3437}
3438
3439//---------------------------------------------------------
3441{
3442 if( pObject == NULL || pObject->Get_ObjectType() != SG_DATAOBJECT_TYPE_Grids )
3443 {
3444 return( false );
3445 }
3446
3447 //-----------------------------------------------------
3448 CSG_Grid_System *pSystem = Get_System();
3449
3450 if( pSystem ) // check grid system compatibility
3451 {
3453 ? ((CSG_Grid *)pObject)->Get_System()
3454 : ((CSG_Grids *)pObject)->Get_System();
3455
3456 if( !pSystem->is_Valid() )
3457 {
3458 Get_Parent()->Set_Value((void *)&System);
3459 }
3460 else if( !pSystem->is_Equal(System) )
3461 {
3462 for(int i=0; i<Get_Parent()->Get_Children_Count(); i++)
3463 {
3464 CSG_Parameter *pChild = Get_Parent()->Get_Child(i);
3465
3466 if( pChild->Get_Type() == PARAMETER_TYPE_Grids )
3467 {
3468 if( pChild->asDataObject() != DATAOBJECT_NOTSET
3469 && pChild->asDataObject() != DATAOBJECT_CREATE )
3470 {
3471 return( false );
3472 }
3473 }
3474
3475 if( pChild->is_DataObject_List() && pChild->asList()->Get_Item_Count() > 0 )
3476 {
3477 if( (pChild->Get_Type() == PARAMETER_TYPE_Grids_List && pChild->asGridsList()->Get_System()) )
3478 {
3479 return( false );
3480 }
3481 }
3482 }
3483
3484 Get_Parent()->Set_Value((void *)&System);
3485 }
3486 }
3487
3488 return( CSG_Parameter_List::Add_Item(pObject) );
3489}
3490
3491
3493// //
3494// Table_List //
3495// //
3497
3498
3499//---------------------------------------------------------
3500CSG_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)
3501 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3502{
3503 // nop
3504}
3505
3506
3508// //
3509// Shapes_List //
3510// //
3512
3513
3514//---------------------------------------------------------
3515CSG_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)
3516 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3517{
3519}
3520
3521//---------------------------------------------------------
3526
3527//---------------------------------------------------------
3529{
3530 m_Type = ((CSG_Parameter_Shapes_List *)pSource)->m_Type;
3531
3532 return( CSG_Parameter_List::_Assign(pSource) );
3533}
3534
3535
3537// //
3538// TIN_List //
3539// //
3541
3542
3543//---------------------------------------------------------
3544CSG_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)
3545 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3546{
3547 // nop
3548}
3549
3550
3552// //
3553// PointCloud_List //
3554// //
3556
3557
3558//---------------------------------------------------------
3559CSG_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)
3560 : CSG_Parameter_List(pOwner, pParent, ID, Name, Description, Constraint)
3561{
3562 // nop
3563}
3564
3565
3567// //
3568// Parameters //
3569// //
3571
3572//---------------------------------------------------------
3573CSG_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)
3574 : CSG_Parameter(pParameters, pParent, ID, Name, Description, Constraint)
3575{
3576 m_pParameters = new CSG_Parameters(pParameters->Get_Owner(), Name, Description, ID);
3577}
3578
3583
3584//---------------------------------------------------------
3586{
3587 return( m_pParameters->Restore_Defaults() );
3588}
3589
3590//---------------------------------------------------------
3592{
3593 m_String.Printf("%d %s", m_pParameters->Get_Count(), _TL("parameters"));
3594}
3595
3596//---------------------------------------------------------
3598{
3599 return( m_pParameters );
3600}
3601
3602//---------------------------------------------------------
3604{
3605 m_pParameters->Assign(pSource->asParameters());
3606
3607 return( true );
3608}
3609
3610//---------------------------------------------------------
3612{
3613 if( m_pParameters->Serialize(Entry, bSave) )
3614 {
3615 if( bSave )
3616 {
3617 Entry.Set_Property("id" , Get_Identifier ());
3618 Entry.Set_Property("type", Get_Type_Identifier());
3619 }
3620
3621 return( true );
3622 }
3623
3624 return( false );
3625}
3626
3627
3629// //
3630// //
3631// //
3633
3634//---------------------------------------------------------
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:154
CSG_String SG_Data_Type_Get_Identifier(TSG_Data_Type Type)
Definition api_core.cpp:148
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:1350
#define SG_GET_G(rgb)
Definition api_core.h:1349
#define SG_DATATYPES_Bit
Definition api_core.h:1065
#define SG_DATATYPES_Numeric
Definition api_core.h:1085
#define SG_DATATYPES_Table
Definition api_core.h:1086
signed long long sLong
Definition api_core.h:158
#define SG_DATATYPES_Integer
Definition api_core.h:1083
#define SG_GET_R(rgb)
Definition api_core.h:1348
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
SAGA_API_DLL_EXPORT CSG_Strings SG_String_Tokenize(const CSG_String &String, const CSG_String &Delimiters=SG_DEFAULT_DELIMITERS, TSG_String_Tokenizer_Mode Mode=SG_TOKEN_DEFAULT)
const char gSG_Data_Type_Identifier[][32]
Definition api_core.h:1089
#define SG_DATATYPES_Standard
Definition api_core.h:1080
#define SG_DATATYPES_Undefined
Definition api_core.h:1064
#define SG_FREE_SAFE(PTR)
Definition api_core.h:205
SAGA_API_DLL_EXPORT double SG_Degree_To_Double(const CSG_String &String)
TSG_Data_Type
Definition api_core.h:1043
@ SG_DATATYPE_Long
Definition api_core.h:1052
@ SG_DATATYPE_Byte
Definition api_core.h:1045
@ SG_DATATYPE_Bit
Definition api_core.h:1044
@ SG_DATATYPE_Short
Definition api_core.h:1048
@ SG_DATATYPE_Word
Definition api_core.h:1047
@ SG_DATATYPE_ULong
Definition api_core.h:1051
@ SG_DATATYPE_Float
Definition api_core.h:1053
@ SG_DATATYPE_Undefined
Definition api_core.h:1059
@ SG_DATATYPE_Binary
Definition api_core.h:1058
@ SG_DATATYPE_Double
Definition api_core.h:1054
@ SG_DATATYPE_Color
Definition api_core.h:1057
@ SG_DATATYPE_Int
Definition api_core.h:1050
@ SG_DATATYPE_Char
Definition api_core.h:1046
@ SG_DATATYPE_String
Definition api_core.h:1055
@ SG_DATATYPE_DWord
Definition api_core.h:1049
@ SG_DATATYPE_Date
Definition api_core.h:1056
#define SG_Char
Definition api_core.h:536
#define SG_GET_RGB(r, g, b)
Definition api_core.h:1345
#define _TL(s)
Definition api_core.h:1619
SAGA_API_DLL_EXPORT int SG_Get_Significant_Decimals(double Value, int maxDecimals=6)
SAGA_API_DLL_EXPORT CSG_String SG_Get_String(double Value, int Precision=-99)
static int Get_Predefined_Count(void)
bool Load(const CSG_String &FileName)
CSG_Data_Object * Add(CSG_Data_Object *pObject)
CSG_Data_Object * Find(const CSG_String &File, bool bNative=true) const
bool Exists(CSG_Data_Object *pObject) const
const SG_Char * Get_Name(void) const
const SG_Char * Get_File_Name(bool bNative=true) const
class CSG_Grids * asGrids(bool bPolymorph=false) const
virtual TSG_Data_Object_Type Get_ObjectType(void) const =0
Returns the object type as defined by TSG_Data_Object_Type. Used for run time type checking.
bool Parse_Date(const CSG_String &date)
Definition datetime.cpp:495
static CSG_DateTime Now(void)
Definition datetime.cpp:600
bool Parse_ISODate(const CSG_String &date)
Definition datetime.cpp:526
bool Destroy(void)
bool is_Equal(const CSG_Grid_System &System) const
bool Create(const CSG_Grid_System &System, int Precision=-1)
bool is_Valid(void) const
int Get_NZ(void) const
Definition grids.h:190
int Get_Grid_Count(void) const
Definition grids.h:254
CSG_Grid * Get_Grid_Ptr(int i) const
Definition grids.h:265
void Fmt_Content(const char *Format,...)
Definition metadata.cpp:536
int Get_Children_Count(void) const
Definition metadata.h:154
CSG_MetaData * Get_Child(int Index) const
Definition metadata.h:155
bool Set_Property(const CSG_String &Name, const CSG_String &Value, bool bAddIfNotExists=true)
Definition metadata.cpp:641
bool Cmp_Content(const CSG_String &String, bool bNoCase=false) const
Definition metadata.cpp:574
const CSG_String & Get_Content(void) const
Definition metadata.h:139
const SG_Char * Get_Property(int Index) const
Definition metadata.h:188
void Set_Content(const CSG_String &Content)
Definition metadata.h:146
CSG_MetaData * Add_Child(void)
Definition metadata.cpp:169
bool Add_Property(const CSG_String &Name, const CSG_String &Value)
Definition metadata.cpp:585
virtual bool Toggle_Value(void)
virtual int _Set_Value(int Value)
virtual bool is_Default(void) const
friend class CSG_Parameters
Definition parameters.h:433
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:701
virtual void _Set_String(void)
bool Set_Items(const SG_Char *String)
friend class CSG_Parameters
Definition parameters.h:718
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)
virtual bool Restore_Default(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:692
bool is_Selected(int Index)
int Get_Selection_Count(void) const
Definition parameters.h:773
virtual bool _Serialize(CSG_MetaData &Entry, bool bSave)
CSG_Strings m_Items[2]
Definition parameters.h:787
void Set_Items(const CSG_String &Items)
friend class CSG_Parameters
Definition parameters.h:800
int Get_Item_Count(void) const
Definition parameters.h:769
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:789
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:957
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:993
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:748
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:609
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:593
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:570
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:545
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:896
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:931
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:507
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:394
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:658
CSG_Parameter_Double * m_pMin
Definition parameters.h:647
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:645
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:647
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:834
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:854
friend class CSG_Parameters
Definition parameters.h:469
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:338
class CSG_Parameter_Choice * asChoice(void) const
class CSG_Parameter_Value * asValue(void) const
double asDouble(void) const
Definition parameters.h:289
CSG_Parameter * Get_Parent(void) const
virtual TSG_Parameter_Type Get_Type(void) const =0
bool asBool(void) const
Definition parameters.h:286
bool is_Input(void) const
Definition parameters.h:236
CSG_Parameters * Get_Parameters(void) const
class CSG_Parameter_Choices * asChoices(void) const
CSG_Colors * asColors(void) const
virtual bool Set_Value(int Value)
class CSG_Parameter_List * asList(void) const
CSG_Grid_System * asGrid_System(void) const
class CSG_Parameter_Grid_List * asGridList(void) const
CSG_Data_Object * asDataObject(void) const
class CSG_Parameter_Range * asRange(void) const
CSG_Parameter * Get_Child(int iChild) const
Definition parameters.h:260
bool is_Output(void) const
Definition parameters.h:237
bool has_Changed(int Check_Flags=PARAMETER_CHECK_ALL)
class CSG_Parameter_File_Name * asFilePath(void) const
bool is_Information(void) const
Definition parameters.h:239
const SG_Char * asString(void) const
Definition parameters.h:290
const CSG_String & Get_Default(void) const
CSG_Table * asTable(void) const
bool is_DataObject_List(void) const
int asInt(void) const
Definition parameters.h:287
class CSG_Data_Manager * Get_Manager(void) const
bool Set_Callback(bool bActive=true)
CSG_Parameter * Add_Double(const CSG_String &ParentID, const CSG_String &ID, const CSG_String &Name, const CSG_String &Description, double Value=0.0, double Minimum=0.0, bool bMinimum=false, double Maximum=0.0, bool bMaximum=false)
void * Get_Owner(void) const
CSG_String Get_Next_Token(void)
bool Has_More_Tokens(void) const
size_t Length(void) const
CSG_String AfterFirst(char Character) const
bool asInt(int &Value) const
int CmpNoCase(const CSG_String &String) const
int Cmp(const CSG_String &String) const
CSG_String BeforeFirst(char Character) const
CSG_String BeforeLast(char Character) const
static CSG_String Format(const char *Format,...)
int Trim(bool fromRight=false)
bool asDouble(double &Value) const
int Trim_Both(void)
bool is_Empty(void) const
bool Add(const CSG_Strings &Strings)
int Get_Count(void) const
Definition api_core.h:725
void Clear(void)
Definition api_core.h:747
bool Set_Value(int Field, const CSG_String &Value)
const SG_Char * asString(int Field, int Decimals=-99) const
const SG_Char * Get_Field_Name(int Field) const
Definition table.h:372
int Get_Field(const CSG_String &Name) const
Definition table.cpp:723
virtual CSG_Table_Record * Add_Record(CSG_Table_Record *pCopy=NULL)
Definition table.cpp:823
int Get_Field_Count(void) const
Definition table.h:371
virtual bool Add_Field(const CSG_String &Name, TSG_Data_Type Type, int Position=-1)
Definition table.cpp:479
CSG_Data_Manager & SG_Get_Data_Manager(void)
TSG_Data_Object_Type
Definition dataobject.h:117
@ SG_DATAOBJECT_TYPE_Undefined
Definition dataobject.h:124
@ SG_DATAOBJECT_TYPE_PointCloud
Definition dataobject.h:123
@ SG_DATAOBJECT_TYPE_Grids
Definition dataobject.h:119
@ SG_DATAOBJECT_TYPE_TIN
Definition dataobject.h:122
@ SG_DATAOBJECT_TYPE_Shapes
Definition dataobject.h:121
@ SG_DATAOBJECT_TYPE_Grid
Definition dataobject.h:118
@ SG_DATAOBJECT_TYPE_Table
Definition dataobject.h:120
#define DATAOBJECT_NOTSET
Definition dataobject.h:129
#define DATAOBJECT_CREATE
Definition dataobject.h:130
CSG_Grid_Resampling
Definition grid.h:156
#define ADD_TYPE(type)
CSG_String SG_Parameter_Type_Get_Name(TSG_Parameter_Type Type)
TSG_Parameter_Type SG_Parameter_Type_Get_Type(const CSG_String &Identifier)
CSG_String SG_Parameter_Type_Get_Identifier(TSG_Parameter_Type Type)
#define SG_PARAMETER_DATA_SET_TRUE
Definition parameters.h:196
#define SG_PARAMETER_DATA_SET_FALSE
Definition parameters.h:195
#define SG_PARAMETER_DATA_SET_CHANGED
Definition parameters.h:197
TSG_Parameter_Type
Definition parameters.h:123
@ PARAMETER_TYPE_Degree
Definition parameters.h:129
@ PARAMETER_TYPE_FixedTable
Definition parameters.h:142
@ PARAMETER_TYPE_Node
Definition parameters.h:124
@ PARAMETER_TYPE_Grid
Definition parameters.h:149
@ PARAMETER_TYPE_Grid_List
Definition parameters.h:155
@ PARAMETER_TYPE_Text
Definition parameters.h:136
@ PARAMETER_TYPE_TIN
Definition parameters.h:153
@ PARAMETER_TYPE_Table
Definition parameters.h:151
@ PARAMETER_TYPE_Int
Definition parameters.h:127
@ PARAMETER_TYPE_Table_Fields
Definition parameters.h:146
@ PARAMETER_TYPE_Grids
Definition parameters.h:150
@ PARAMETER_TYPE_Color
Definition parameters.h:140
@ PARAMETER_TYPE_Colors
Definition parameters.h:141
@ PARAMETER_TYPE_DataObject_Output
Definition parameters.h:162
@ PARAMETER_TYPE_Table_List
Definition parameters.h:157
@ PARAMETER_TYPE_Double
Definition parameters.h:128
@ PARAMETER_TYPE_TIN_List
Definition parameters.h:159
@ PARAMETER_TYPE_Grid_System
Definition parameters.h:144
@ PARAMETER_TYPE_Font
Definition parameters.h:139
@ PARAMETER_TYPE_Date
Definition parameters.h:130
@ PARAMETER_TYPE_PointCloud_List
Definition parameters.h:160
@ PARAMETER_TYPE_Choices
Definition parameters.h:134
@ PARAMETER_TYPE_Undefined
Definition parameters.h:166
@ PARAMETER_TYPE_Data_Type
Definition parameters.h:132
@ PARAMETER_TYPE_Shapes
Definition parameters.h:152
@ PARAMETER_TYPE_Shapes_List
Definition parameters.h:158
@ PARAMETER_TYPE_Range
Definition parameters.h:131
@ PARAMETER_TYPE_PointCloud
Definition parameters.h:148
@ PARAMETER_TYPE_Table_Field
Definition parameters.h:145
@ PARAMETER_TYPE_Parameters
Definition parameters.h:164
@ PARAMETER_TYPE_FilePath
Definition parameters.h:137
@ PARAMETER_TYPE_Bool
Definition parameters.h:126
@ PARAMETER_TYPE_Grids_List
Definition parameters.h:156
@ PARAMETER_TYPE_String
Definition parameters.h:135
@ PARAMETER_TYPE_Choice
Definition parameters.h:133
TSG_Shape_Type
Definition shapes.h:100
@ SHAPE_TYPE_Undefined
Definition shapes.h:101