SAGA API v9.10
Loading...
Searching...
No Matches
data_manager.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// data_manager.cpp //
15// //
16// Copyright (C) 2013 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 Hamburg //
44// Germany //
45// //
46// e-mail: oconrad@saga-gis.org //
47// //
49
50//---------------------------------------------------------
51#include "data_manager.h"
52#include "tool_library.h"
53
54
56// //
57// //
58// //
60
61//---------------------------------------------------------
63
64//---------------------------------------------------------
69
70
72// //
73// //
74// //
76
77//---------------------------------------------------------
82
83//---------------------------------------------------------
88
89//---------------------------------------------------------
90CSG_Data_Object * CSG_Data_Collection::Find(const CSG_String &File, bool bNative) const
91{
92 for(size_t i=0; i<Count(); i++)
93 {
94 if( !File.Cmp(Get(i)->Get_File_Name(bNative)) )
95 {
96 return( Get(i) );
97 }
98 }
99
100 return( NULL );
101}
102
103//---------------------------------------------------------
105{
106 for(size_t i=0; i<Count(); i++)
107 {
108 if( pObject == Get(i) )
109 {
110 return( true );
111 }
112 }
113
114 return( false );
115}
116
117//---------------------------------------------------------
119{
120 if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
121 {
122 if( Exists(pObject) )
123 {
124 return( true );
125 }
126
127 if( m_Objects.Inc_Array() )
128 {
129 m_Objects[Count() - 1] = pObject;
130
131 pObject->m_Managed++;
132
133 return( true );
134 }
135 }
136
137 return( false );
138}
139
140//---------------------------------------------------------
142{
143 for(size_t i=0; i<Count(); i++)
144 {
145 if( pObject == Get(i) )
146 {
147 return( Delete(i, bDetach) );
148 }
149 }
150
151 return( false );
152}
153
154//---------------------------------------------------------
155bool CSG_Data_Collection::Delete(size_t i, bool bDetach)
156{
157 if( i < Count() )
158 {
159 CSG_Data_Object *pObject = Get(i);
160
161 if( pObject->m_Managed > 0 )
162 {
163 pObject->m_Managed--;
164 }
165
166 if( !bDetach && !pObject->m_Managed )
167 {
168 delete(pObject);
169 }
170
171 CSG_Data_Object **pObjects = (CSG_Data_Object **)m_Objects.Get_Array();
172
173 for(size_t j=i+1; j<Count(); i++, j++)
174 {
175 pObjects[i] = pObjects[j];
176 }
177
178 m_Objects.Dec_Array();
179
180 return( true );
181 }
182
183 return( false );
184}
185
186//---------------------------------------------------------
187bool CSG_Data_Collection::Delete(bool bDetach, bool bUnsaved)
188{
189 for(size_t i=Count(); i>0; i--)
190 {
191 if( !bUnsaved || !SG_File_Exists(Get(i - 1)->Get_File_Name()) )
192 {
193 Delete(i - 1, bDetach);
194 }
195 }
196
197 return( Count() == 0 );
198}
199
200
202// //
203// //
204// //
206
207//---------------------------------------------------------
217
218//---------------------------------------------------------
220{
221 Delete();
222
223 delete(m_pTable );
224 delete(m_pShapes );
225 delete(m_pPointCloud);
226 delete(m_pTIN );
227 delete(m_pGrid );
228 delete(m_pGrids );
229}
230
231
233// //
235
236//---------------------------------------------------------
237CSG_Data_Collection * CSG_Data_Manager::_Get_Collection(CSG_Data_Object *pObject) const
238{
239 if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
240 {
241 switch( pObject->Get_ObjectType() )
242 {
243 case SG_DATAOBJECT_TYPE_Table : return( m_pTable );
244 case SG_DATAOBJECT_TYPE_Shapes : return( m_pShapes );
245 case SG_DATAOBJECT_TYPE_PointCloud: return( m_pPointCloud );
246 case SG_DATAOBJECT_TYPE_TIN : return( m_pTIN );
247 case SG_DATAOBJECT_TYPE_Grid : return( m_pGrid );
248 case SG_DATAOBJECT_TYPE_Grids : return( m_pGrids );
249
250 default: break;
251 }
252 }
253
254 return( NULL );
255}
256
257
259// //
261
262//---------------------------------------------------------
263CSG_Data_Object * CSG_Data_Manager::Find(const CSG_String &File, bool bNative) const
264{
265 CSG_Data_Object *pObject;
266
267 if( (pObject = Table ().Find(File, bNative)) != NULL ) return( pObject );
268 if( (pObject = Shapes ().Find(File, bNative)) != NULL ) return( pObject );
269 if( (pObject = PointCloud().Find(File, bNative)) != NULL ) return( pObject );
270 if( (pObject = TIN ().Find(File, bNative)) != NULL ) return( pObject );
271 if( (pObject = Grid ().Find(File, bNative)) != NULL ) return( pObject );
272 if( (pObject = Grids ().Find(File, bNative)) != NULL ) return( pObject );
273
274 return( NULL );
275}
276
277//---------------------------------------------------------
279{
280 if( pObject && pObject != DATAOBJECT_CREATE )
281 {
282 if( Table ().Exists(pObject) ) return( true );
283 if( Shapes ().Exists(pObject) ) return( true );
284 if( PointCloud().Exists(pObject) ) return( true );
285 if( TIN ().Exists(pObject) ) return( true );
286 if( Grid ().Exists(pObject) ) return( true );
287 if( Grids ().Exists(pObject) ) return( true );
288
289 for(size_t i=0; i<Grids().Count(); i++)
290 {
291 for(int j=0; j<Grids(i).Get_Grid_Count(); j++)
292 {
293 if( pObject == Grids(i).Get_Grid_Ptr(j) )
294 {
295 return( true );
296 }
297 }
298 }
299 }
300
301 return( false );
302}
303
304
306// //
308
309//---------------------------------------------------------
311{
312 if( pObject != DATAOBJECT_NOTSET && pObject != DATAOBJECT_CREATE )
313 {
314 if( Exists(pObject) )
315 {
316 return( pObject ); // don't add more than once
317 }
318
319 CSG_Data_Collection *pCollection = _Get_Collection(pObject);
320
321 if( pCollection && pCollection->Add(pObject) )
322 {
323 if( this == &g_Data_Manager ) // SAGA API's global data manager ?
324 {
325 SG_UI_DataObject_Add(pObject, SG_UI_DATAOBJECT_UPDATE); // for SAGA GUI !
326 }
327
328 return( pObject );
329 }
330 }
331
332 return( NULL );
333}
334
335//---------------------------------------------------------
336CSG_Data_Object * CSG_Data_Manager::Add(const char *File, TSG_Data_Object_Type Type) { return( Add(CSG_String(File), Type) ); }
337CSG_Data_Object * CSG_Data_Manager::Add(const wchar_t *File, TSG_Data_Object_Type Type) { return( Add(CSG_String(File), Type) ); }
339{
340 if( Type == SG_DATAOBJECT_TYPE_Undefined )
341 {
342 if( SG_File_Cmp_Extension(File, "txt" )
343 || SG_File_Cmp_Extension(File, "csv" )
344 || SG_File_Cmp_Extension(File, "dbf" ) )
345 {
347 }
348
349 if( SG_File_Cmp_Extension(File, "shp" ) )
350 {
352 }
353
354 if( SG_File_Cmp_Extension(File, "sg-pts-z")
355 || SG_File_Cmp_Extension(File, "sg-pts" )
356 || SG_File_Cmp_Extension(File, "spc" ) )
357 {
359 }
360
361 if( SG_File_Cmp_Extension(File, "sg-grd-z")
362 || SG_File_Cmp_Extension(File, "sg-grd" )
363 || SG_File_Cmp_Extension(File, "sgrd" )
364 || SG_File_Cmp_Extension(File, "dgm" )
365 || SG_File_Cmp_Extension(File, "grd" ) )
366 {
368 }
369
370 if( SG_File_Cmp_Extension(File, "sg-gds-z")
371 || SG_File_Cmp_Extension(File, "sg-gds" ) )
372 {
374 }
375 }
376
377 //-----------------------------------------------------
378 CSG_Data_Object *pObject;
379
380 switch( Type )
381 {
382 case SG_DATAOBJECT_TYPE_Table : pObject = new CSG_Table (File); break;
383 case SG_DATAOBJECT_TYPE_Shapes : pObject = new CSG_Shapes (File); break;
384 case SG_DATAOBJECT_TYPE_TIN : pObject = new CSG_TIN (File); break;
385 case SG_DATAOBJECT_TYPE_PointCloud: pObject = new CSG_PointCloud(File); break;
386 case SG_DATAOBJECT_TYPE_Grid : pObject = new CSG_Grid (File); break;
387 case SG_DATAOBJECT_TYPE_Grids : pObject = new CSG_Grids (File); break;
388 default : pObject = NULL ; break;
389 }
390
391 if( pObject )
392 {
393 if( pObject->is_Valid() && Add(pObject) )
394 {
395 return( pObject );
396 }
397
398 delete(pObject);
399 }
400
401 //-----------------------------------------------------
402 return( _Add_External(File) );
403}
404
405//---------------------------------------------------------
406CSG_Data_Object * CSG_Data_Manager::_Add_External(const CSG_String &File)
407{
408 CSG_Data_Object *pData = NULL;
409
410 if( !SG_File_Exists(File) )
411 {
412 return( pData );
413 }
414
415 CSG_Tool *pImport = NULL;
416
417 SG_UI_Msg_Lock(true);
418
419 //-----------------------------------------------------
420 // Image Import
421
422 if( ( SG_File_Cmp_Extension(File, "bmp")
423 || SG_File_Cmp_Extension(File, "gif")
424 || SG_File_Cmp_Extension(File, "jpg")
425 || SG_File_Cmp_Extension(File, "png")
426 || SG_File_Cmp_Extension(File, "pcx")
427 || SG_File_Cmp_Extension(File, "xpm") )
428 && (pImport = SG_Get_Tool_Library_Manager().Create_Tool("io_grid_image", 1)) != NULL
429 && pImport->Set_Parameter("FILE", File, PARAMETER_TYPE_FilePath) )
430 {
431 pImport->Set_Manager(this);
432
433 if( pImport->Execute() )
434 {
435 pData = pImport->Get_Parameter("OUT_GRID")->asDataObject();
436 }
437 }
438
440
441 //-----------------------------------------------------
442 // GDAL Import
443
444 if( !pData
445 && (pImport = SG_Get_Tool_Library_Manager().Create_Tool("io_gdal", 0)) != NULL
446 && pImport->Set_Parameter("FILES", File, PARAMETER_TYPE_FilePath) )
447 {
448 pImport->Set_Manager(this);
449
450 if( pImport->Execute() )
451 {
452 pData = pImport->Get_Parameter("GRIDS")->asList()->Get_Item(0);
453 }
454 }
455
457
458 //-----------------------------------------------------
459 // OGR Import
460
461 if( !pData
462 && (pImport = SG_Get_Tool_Library_Manager().Create_Tool("io_gdal", 3)) != NULL
463 && pImport->Set_Parameter("FILES", File, PARAMETER_TYPE_FilePath) )
464 {
465 pImport->Set_Manager(this);
466
467 if( pImport->Execute() )
468 {
469 pData = pImport->Get_Parameter("SHAPES")->asList()->Get_Item(0);
470 }
471 }
472
474
475 //-----------------------------------------------------
476 // LAZ Import
477
478 if( !pData && (SG_File_Cmp_Extension(File, "las") || SG_File_Cmp_Extension(File, "laz"))
479 && (pImport = SG_Get_Tool_Library_Manager().Create_Tool("io_pdal", 0)) != NULL
480 && pImport->Set_Parameter("FILES", File, PARAMETER_TYPE_FilePath) )
481 {
482 pImport->Set_Manager(this);
483
484 if( pImport->Execute() )
485 {
486 pData = pImport->Get_Parameter("POINTS")->asList()->Get_Item(0);
487 }
488 }
489
491
492 //-----------------------------------------------------
493 // STL Import
494
495 if( !pData && (SG_File_Cmp_Extension(File, "stl"))
496 && (pImport = SG_Get_Tool_Library_Manager().Create_Tool("io_shapes", 11)) != NULL // Import Stereo Lithography File (STL)
497 && pImport->Set_Parameter("FILE" , File, PARAMETER_TYPE_FilePath)
498 && pImport->Set_Parameter("METHOD", 2) ) // => TIN
499 {
500 CSG_Data_Manager Data; pImport->Set_Manager(&Data);
501
502 if( pImport->Execute() )
503 {
504 Data.Delete(pData = pImport->Get_Parameter("TIN")->asTIN(), true); Add(pData);
505 }
506 }
507
509
510 //-----------------------------------------------------
511 SG_UI_Msg_Lock(false);
512
513 return( pData );
514}
515
516
518// //
520
521//---------------------------------------------------------
524CSG_Table * CSG_Data_Manager::Add_Table(const wchar_t *File) { return( (CSG_Table *)Add(File, SG_DATAOBJECT_TYPE_Table) ); }
526{
527 CSG_Table *pObject = new CSG_Table();
528
529 if( pObject && !Add(pObject) )
530 {
531 delete(pObject); pObject = NULL;
532 }
533
534 return( pObject );
535}
536
537//---------------------------------------------------------
542{
543 CSG_Shapes *pObject = new CSG_Shapes();
544
545 if( pObject && !Add(pObject) )
546 {
547 delete(pObject); pObject = NULL;
548 }
549
550 return( pObject );
551}
552
553//---------------------------------------------------------
558{
559 CSG_PointCloud *pObject = new CSG_PointCloud();
560
561 if( pObject && !Add(pObject) )
562 {
563 delete(pObject); pObject = NULL;
564 }
565
566 return( pObject );
567}
568
569//---------------------------------------------------------
571CSG_TIN * CSG_Data_Manager::Add_TIN(const char *File) { return( (CSG_TIN *)Add(File, SG_DATAOBJECT_TYPE_TIN) ); }
572CSG_TIN * CSG_Data_Manager::Add_TIN(const wchar_t *File) { return( (CSG_TIN *)Add(File, SG_DATAOBJECT_TYPE_TIN) ); }
574{
575 CSG_TIN *pObject = new CSG_TIN();
576
577 if( pObject && !Add(pObject) )
578 {
579 delete(pObject); pObject = NULL;
580 }
581
582 return( pObject );
583}
584
585//---------------------------------------------------------
587CSG_Grid * CSG_Data_Manager::Add_Grid(const char *File) { return( (CSG_Grid *)Add(File, SG_DATAOBJECT_TYPE_Grid) ); }
588CSG_Grid * CSG_Data_Manager::Add_Grid(const wchar_t *File) { return( (CSG_Grid *)Add(File, SG_DATAOBJECT_TYPE_Grid) ); }
590{
591 CSG_Grid *pObject = new CSG_Grid();
592
593 if( pObject && !Add(pObject) )
594 {
595 delete(pObject); pObject = NULL;
596 }
597
598 return( pObject );
599}
600
601//---------------------------------------------------------
604CSG_Grids * CSG_Data_Manager::Add_Grids(const wchar_t *File) { return( (CSG_Grids *)Add(File, SG_DATAOBJECT_TYPE_Grids) ); }
606{
607 CSG_Grids *pObject = new CSG_Grids();
608
609 if( pObject && !Add(pObject) )
610 {
611 delete(pObject); pObject = NULL;
612 }
613
614 return( pObject );
615}
616
617
619// //
621
622//---------------------------------------------------------
623bool CSG_Data_Manager::Delete(CSG_Data_Object *pObject, bool bDetach)
624{
625 CSG_Data_Collection *pCollection = _Get_Collection(pObject);
626
627 return( pCollection && pCollection->Delete(pObject, bDetach) );
628}
629
630//---------------------------------------------------------
631bool CSG_Data_Manager::Delete(bool bDetach, bool bUnsaved)
632{
633 Table ().Delete(bDetach, bUnsaved);
634 Shapes ().Delete(bDetach, bUnsaved);
635 PointCloud().Delete(bDetach, bUnsaved);
636 TIN ().Delete(bDetach, bUnsaved);
637 Grid ().Delete(bDetach, bUnsaved);
638 Grids ().Delete(bDetach, bUnsaved);
639
640 return( true );
641}
642
643
645// //
647
648//---------------------------------------------------------
650{
651 CSG_String s;
652
653 //-----------------------------------------------------
654 if( Table().Count() )
655 {
656 s += CSG_String::Format("___\n%s [%zu %s]\n", _TL("Table"), Table().Count(), _TL("objects"));
657
658 for(size_t i=0; i<Table().Count(); i++)
659 {
660 CSG_Table *pObject = Table()[i].asTable();
661
662 s += CSG_String::Format("- [%d %s] %s\n",
663 pObject->Get_Count(), _TL("records"),
664 pObject->Get_Name()
665 );
666 }
667 }
668
669 //-----------------------------------------------------
670 if( Shapes().Count() )
671 {
672 s += CSG_String::Format("___\n%s [%zu %s]\n", _TL("Shapes"), Shapes().Count(), _TL("objects"));
673
674 for(size_t i=0; i<Shapes().Count(); i++)
675 {
676 CSG_Shapes *pObject = Shapes()[i].asShapes();
677
678 s += CSG_String::Format("- [%s; %d %s] %s\n",
679 pObject->Get_Type() == SHAPE_TYPE_Point ? _TL("point" ) :
680 pObject->Get_Type() == SHAPE_TYPE_Points ? _TL("points" ) :
681 pObject->Get_Type() == SHAPE_TYPE_Line ? _TL("line" ) :
682 pObject->Get_Type() == SHAPE_TYPE_Polygon ? _TL("polygon") : _TL("unknown"),
683 pObject->Get_Count(), _TL("records"),
684 pObject->Get_Name()
685 );
686 }
687 }
688
689 //-----------------------------------------------------
690 if( PointCloud().Count() )
691 {
692 s += CSG_String::Format("___\n%s [%zu %s]\n", _TL("Point Cloud"), PointCloud().Count(), _TL("objects"));
693
694 for(size_t i=0; i<PointCloud().Count(); i++)
695 {
696 CSG_PointCloud *pObject = PointCloud()[i].asPointCloud();
697
698 s += CSG_String::Format("- [%d %s] %s\n",
699 pObject->Get_Count(), _TL("records"),
700 pObject->Get_Name()
701 );
702 }
703 }
704
705 //-----------------------------------------------------
706 if( TIN().Count() )
707 {
708 s += CSG_String::Format("___\n%s [%zu %s]\n", _TL("TIN"), TIN().Count(), _TL("objects"));
709
710 for(size_t i=0; i<TIN().Count(); i++)
711 {
712 CSG_TIN *pObject = TIN()[i].asTIN();
713
714 s += CSG_String::Format("- [%d %s] %s\n",
715 pObject->Get_Count(), _TL("nodes"),
716 pObject->Get_Name()
717 );
718 }
719 }
720
721 //-----------------------------------------------------
722 if( Grid().Count() )
723 {
724 s += CSG_String::Format("___\n%s [%zu %s]\n", _TL("Grid"), Grid().Count(), _TL("objects"));
725
726 for(size_t i=0; i<Grid().Count(); i++)
727 {
728 CSG_Grid *pObject = Grid()[i].asGrid ();
729
730 s += CSG_String::Format("- [%f | %dnx %dny | %fx %fy] %s\n",
731 pObject->Get_Cellsize(), pObject->Get_NX(), pObject->Get_NY(), pObject->Get_XMin(), pObject->Get_YMin(),
732 pObject->Get_Name()
733 );
734 }
735 }
736
737 //-----------------------------------------------------
738 if( Grids().Count() )
739 {
740 s += CSG_String::Format("___\n%s [%zu %s]\n", _TL("Grid Collection"), Grids().Count(), _TL("objects"));
741
742 for(size_t i=0; i<Grids().Count(); i++)
743 {
744 CSG_Grids *pObject = Grids()[i].asGrids();
745
746 s += CSG_String::Format("- [%f | %dnx %dny %dnz | %fx %fy] %s\n",
747 pObject->Get_Cellsize(), pObject->Get_NX(), pObject->Get_NY(), pObject->Get_NZ(), pObject->Get_XMin(), pObject->Get_YMin(),
748 pObject->Get_Name()
749 );
750 }
751 }
752
753 //-----------------------------------------------------
754 if( s.is_Empty() )
755 {
756 s += CSG_String::Format("%s - %s\n--- %s ---\n", _TL("Data Manager"), _TL("Summary"), _TL("no data"));
757 }
758 else
759 {
760 s.Prepend(CSG_String::Format("%s - %s\n", _TL("Data Manager"), _TL("Summary")));
761 }
762
763 //-----------------------------------------------------
764 return( s );
765}
766
767
769// //
770// //
771// //
773
774//---------------------------------------------------------
bool SG_UI_DataObject_Add(CSG_Data_Object *pDataObject, int Show)
int SG_UI_Msg_Lock(bool bOn)
SAGA_API_DLL_EXPORT bool SG_File_Exists(const CSG_String &FileName)
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Extension(const CSG_String &File, const CSG_String &Extension)
@ SG_UI_DATAOBJECT_UPDATE
Definition api_core.h:1597
#define _TL(s)
Definition api_core.h:1568
CSG_Array_Pointer m_Objects
size_t Count(void) const
CSG_Data_Object * Get(size_t i) const
bool Exists(CSG_Data_Object *pObject) const
bool Delete(CSG_Data_Object *pObject, bool bDetach=false)
TSG_Data_Object_Type m_Type
CSG_Data_Collection(TSG_Data_Object_Type Type)
CSG_Data_Object * Find(const CSG_String &File, bool bNative=true) const
virtual ~CSG_Data_Collection(void)
bool Add(CSG_Data_Object *pObject)
virtual ~CSG_Data_Manager(void)
CSG_PointCloud * Add_PointCloud(void)
CSG_Data_Collection & Grid(void) const
CSG_Table * Add_Table(void)
CSG_Grid * Add_Grid(void)
CSG_Data_Collection & Grids(void) const
CSG_Data_Collection & PointCloud(void) const
CSG_Data_Collection & TIN(void) const
CSG_Data_Object * Add(CSG_Data_Object *pObject)
CSG_Shapes * Add_Shapes(void)
bool Delete(CSG_Data_Object *pObject, bool bDetach=false)
CSG_TIN * Add_TIN(void)
CSG_Data_Collection & Table(void) const
CSG_Grids * Add_Grids(void)
CSG_Data_Collection & Shapes(void) const
CSG_Data_Object * Find(const CSG_String &File, bool bNative=true) const
bool Exists(CSG_Data_Object *pObject) const
CSG_String Get_Summary(void) const
const SG_Char * Get_Name(void) const
virtual bool is_Valid(void) const =0
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.
int Get_NY(void) const
Definition grid.h:564
double Get_YMin(bool bCells=false) const
Definition grid.h:576
double Get_XMin(bool bCells=false) const
Definition grid.h:572
double Get_Cellsize(void) const
Definition grid.h:567
int Get_NX(void) const
Definition grid.h:563
int Get_NZ(void) const
Definition grids.h:190
double Get_Cellsize(void) const
Definition grids.h:195
double Get_XMin(bool bCells=false) const
Definition grids.h:200
double Get_YMin(bool bCells=false) const
Definition grids.h:204
int Get_NX(void) const
Definition grids.h:188
int Get_NY(void) const
Definition grids.h:189
CSG_Data_Object * Get_Item(int Index) const
CSG_TIN * asTIN(void) const
class CSG_Parameter_List * asList(void) const
CSG_Data_Object * asDataObject(void) const
virtual TSG_Shape_Type Get_Type(void) const
Definition shapes.h:806
int Cmp(const CSG_String &String) const
static CSG_String Format(const char *Format,...)
bool is_Empty(void) const
CSG_String & Prepend(const CSG_String &String)
Definition tin.h:222
sLong Get_Count(void) const
Definition table.h:400
bool Delete_Tool(CSG_Tool *pTool) const
bool Set_Manager(class CSG_Data_Manager *pManager)
Definition tool.cpp:570
bool Set_Parameter(const CSG_String &ID, CSG_Parameter *pValue)
Definition tool.cpp:1284
CSG_Parameter * Get_Parameter(const CSG_String &ID) const
Definition tool.h:172
bool Execute(bool bAddHistory=false)
Definition tool.cpp:258
CSG_Data_Manager & SG_Get_Data_Manager(void)
CSG_Data_Manager g_Data_Manager
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
@ PARAMETER_TYPE_FilePath
Definition parameters.h:137
@ SHAPE_TYPE_Polygon
Definition shapes.h:105
@ SHAPE_TYPE_Line
Definition shapes.h:104
@ SHAPE_TYPE_Points
Definition shapes.h:103
@ SHAPE_TYPE_Point
Definition shapes.h:102
CSG_Tool_Library_Manager & SG_Get_Tool_Library_Manager(void)