|
SAGA API
v9.6
|
Go to the documentation of this file.
53 #ifndef HEADER_INCLUDED__SAGA_API__api_core_H
54 #define HEADER_INCLUDED__SAGA_API__api_core_H
83 #define _SAGA_DLL_EXPORT __declspec( dllexport )
84 #define _SAGA_DLL_IMPORT __declspec( dllimport )
86 #define _SAGA_DLL_EXPORT
87 #define _SAGA_DLL_IMPORT
91 #ifdef _SAGA_API_EXPORTS
92 #define SAGA_API_DLL_EXPORT _SAGA_DLL_EXPORT
94 #define SAGA_API_DLL_EXPORT _SAGA_DLL_IMPORT
115 #endif // #ifdef SWIG
128 #if defined(__alpha) || defined(__sparcv9) || defined(__LP64__) || (defined(__HOS_AIX__) && defined(_LP64))
129 #define SIZEOF_LONG 8
131 #define SIZEOF_LONG 4
137 typedef unsigned int bool;
138 #define true ((bool)1)
139 #define false ((bool)0)
140 #endif // _TYPEDEF_BOOL
144 typedef unsigned char BYTE;
145 #endif // _TYPEDEF_BYTE
149 typedef unsigned short WORD;
151 typedef unsigned long DWORD;
153 typedef unsigned int DWORD;
155 #endif // _TYPEDEF_WORD
162 #if defined(_SAGA_MSW)
164 #define SG_is_NaN _isnan
166 #define SG_is_NaN isnan
168 #define SG_is_NaN(x) (x != x)
192 #define SG_GET_LONG(b0, b1, b2, b3) ((long) (((BYTE)(b0) | ((WORD)(b1) << 8)) | (((DWORD)(BYTE)(b2)) << 16) | (((DWORD)(BYTE)(b3)) << 24)))
194 #define SG_GET_BYTE_0(vLong) ((BYTE) ((vLong) ))
195 #define SG_GET_BYTE_1(vLong) ((BYTE) ((vLong) >> 8))
196 #define SG_GET_BYTE_2(vLong) ((BYTE) ((vLong) >> 16))
197 #define SG_GET_BYTE_3(vLong) ((BYTE) ((vLong) >> 24))
205 #define SG_FREE_SAFE(PTR) { if( PTR ) { SG_Free (PTR); PTR = NULL; } }
206 #define SG_DELETE_SAFE(PTR) { if( PTR ) { delete (PTR); PTR = NULL; } }
207 #define SG_DELETE_ARRAY(PTR) { if( PTR ) { delete[](PTR); PTR = NULL; } }
234 bool Create (
size_t Size);
239 bool Set_Size (
size_t Size,
bool bShrink =
true);
240 bool Inc_Size (
size_t Size) {
return( Set_Size(m_Size + Size) ); }
243 bool Set_Data (
const char *Data,
size_t Size,
bool bShrink =
true);
244 char *
Get_Data (
int Offset = 0)
const {
return( m_Data + Offset ); }
247 char & operator [] (
int Position) {
return( m_Data[Position] ); }
248 char operator [] (
int Position)
const {
return( m_Data[Position] ); }
250 void Add_Value (
char Value,
bool bBigEndian =
false) {
if( Inc_Size(
sizeof(Value)) ) Set_Value((
int)m_Size -
sizeof(Value), Value, bBigEndian); }
251 void Add_Value (
short Value,
bool bBigEndian =
false) {
if( Inc_Size(
sizeof(Value)) ) Set_Value((
int)m_Size -
sizeof(Value), Value, bBigEndian); }
252 void Add_Value (
int Value,
bool bBigEndian =
false) {
if( Inc_Size(
sizeof(Value)) ) Set_Value((
int)m_Size -
sizeof(Value), Value, bBigEndian); }
253 void Add_Value (
float Value,
bool bBigEndian =
false) {
if( Inc_Size(
sizeof(Value)) ) Set_Value((
int)m_Size -
sizeof(Value), Value, bBigEndian); }
254 void Add_Value (
double Value,
bool bBigEndian =
false) {
if( Inc_Size(
sizeof(Value)) ) Set_Value((
int)m_Size -
sizeof(Value), Value, bBigEndian); }
256 CSG_Buffer & operator += (
char Value) { Add_Value(Value);
return( *
this ); }
257 CSG_Buffer & operator += (
short Value) { Add_Value(Value);
return( *
this ); }
258 CSG_Buffer & operator += (
int Value) { Add_Value(Value);
return( *
this ); }
259 CSG_Buffer & operator += (
float Value) { Add_Value(Value);
return( *
this ); }
260 CSG_Buffer & operator += (
double Value) { Add_Value(Value);
return( *
this ); }
262 void Set_Value (
int Offset,
char Value,
bool bBigEndian =
false) { m_Data[Offset] = Value; }
263 void Set_Value (
int Offset,
short Value,
bool bBigEndian =
false) {
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value)); *(
short *)(m_Data + Offset) = Value; }
264 void Set_Value (
int Offset,
int Value,
bool bBigEndian =
false) {
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value)); *(
int *)(m_Data + Offset) = Value; }
265 void Set_Value (
int Offset,
float Value,
bool bBigEndian =
false) {
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value)); *(
float *)(m_Data + Offset) = Value; }
266 void Set_Value (
int Offset,
double Value,
bool bBigEndian =
false) {
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value)); *(
double *)(m_Data + Offset) = Value; }
268 short asShort (
int Offset,
bool bBigEndian =
false)
const {
short Value = *(
short *)(m_Data + Offset);
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value));
return( Value ); }
269 int asInt (
int Offset,
bool bBigEndian =
false)
const {
int Value = *(
int *)(m_Data + Offset);
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value));
return( Value ); }
270 float asFloat (
int Offset,
bool bBigEndian =
false)
const {
float Value = *(
float *)(m_Data + Offset);
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value));
return( Value ); }
271 double asDouble (
int Offset,
bool bBigEndian =
false)
const {
double Value = *(
double *)(m_Data + Offset);
if( bBigEndian )
SG_Swap_Bytes(&Value,
sizeof(Value));
return( Value ); }
292 SG_ARRAY_GROWTH_0 = 0,
296 SG_ARRAY_GROWTH_FIX_8,
297 SG_ARRAY_GROWTH_FIX_16,
298 SG_ARRAY_GROWTH_FIX_32,
299 SG_ARRAY_GROWTH_FIX_64,
300 SG_ARRAY_GROWTH_FIX_128,
301 SG_ARRAY_GROWTH_FIX_256,
302 SG_ARRAY_GROWTH_FIX_512,
317 void * Create (
size_t Value_Size,
sLong nValues = 0,
TSG_Array_Growth Growth = TSG_Array_Growth::SG_ARRAY_GROWTH_0);
328 size_t Get_uSize (
void)
const {
return( (
size_t)m_nValues ); }
331 void *
Get_Entry (
sLong Index)
const {
return( Index >= 0 && Index < m_nValues ? (
char *)m_Values + Index * m_Value_Size : NULL ); }
332 void * operator [] (
sLong Index)
const {
return( Get_Entry(Index) ); }
334 bool Del_Entry (
sLong Index,
bool bShrink =
true);
339 bool Set_Array (
sLong nValues,
bool bShrink =
true);
340 bool Set_Array (
sLong nValues,
void **pArray,
bool bShrink =
true);
342 bool Inc_Array (
sLong nValues = 1);
343 bool Inc_Array (
void **pArray);
345 bool Dec_Array (
bool bShrink =
true);
346 bool Dec_Array (
void **pArray,
bool bShrink =
true);
355 sLong m_nValues, m_nBuffer;
382 size_t Get_uSize (
void)
const {
return( m_Array.Get_uSize() ); }
384 void **
Get_Array (
void)
const {
return( (
void **)m_Array.Get_Array() ); }
385 void **
Get_Array (
sLong nValues) {
return( (
void **)m_Array.Get_Array(nValues) ); }
387 bool Set_Array (
sLong nValues,
bool bShrink =
true) {
return( m_Array.Set_Array(nValues, bShrink) ); }
389 bool Dec_Array (
bool bShrink =
true) {
return( m_Array.Dec_Array(bShrink) ); }
391 bool Add (
void *Value);
393 bool Set (
sLong Index,
void *Value) {
if( !m_Array.Get_Entry(Index) )
return(
false ); *((
void **)m_Array.Get_Entry(Index)) = Value;
return(
true ); }
395 void *&
Get (
sLong Index) {
return( *((
void **)m_Array.Get_Entry(Index)) ); }
397 void *
Get (
sLong Index)
const {
return( *((
void **)m_Array.Get_Entry(Index)) ); }
398 bool Del (
sLong Index);
399 sLong Del (
void *Value);
403 void *& operator [] (
sLong Index) {
return( Get(Index) ); }
404 void * operator [] (
sLong Index)
const {
return( Get(Index) ); }
437 size_t Get_uSize (
void)
const {
return( m_Array.Get_uSize() ); }
439 int *
Get_Array (
void)
const {
return( (
int *)m_Array.Get_Array() ); }
442 bool Set_Array (
sLong nValues,
bool bShrink =
true) {
return( m_Array.Set_Array(nValues, bShrink) ); }
444 bool Dec_Array (
bool bShrink =
true) {
return( m_Array.Dec_Array(bShrink) ); }
446 bool Add (
int Value);
448 bool Set (
sLong Index,
int Value) {
if( !m_Array.Get_Entry(Index) )
return(
false ); *((
int *)m_Array.Get_Entry(Index)) = Value;
return(
true ); }
450 int &
Get (
sLong Index) {
return( *((
int *)m_Array.Get_Entry(Index)) ); }
452 int Get (
sLong Index)
const {
return( *((
int *)m_Array.Get_Entry(Index)) ); }
454 bool Assign (
int Value);
459 int & operator [] (
sLong Index) {
return( Get(Index) ); }
460 int operator [] (
sLong Index)
const {
return( Get(Index) ); }
493 size_t Get_uSize (
void)
const {
return( m_Array.Get_uSize() ); }
498 bool Set_Array (
sLong nValues,
bool bShrink =
true) {
return( m_Array.Set_Array(nValues, bShrink) ); }
500 bool Dec_Array (
bool bShrink =
true) {
return( m_Array.Dec_Array(bShrink) ); }
502 bool Add (
sLong Value);
504 bool Set (
sLong Index,
sLong Value) {
if( !m_Array.Get_Entry(Index) )
return(
false ); *((
sLong *)m_Array.Get_Entry(Index)) = Value;
return(
true ); }
510 bool Assign (
sLong Value);
516 sLong operator [] (
sLong Index)
const {
return( Get(Index) ); }
536 #define SG_Char wchar_t
537 #define SG_T(s) L ## s
538 #define SG_PRINTF wprintf
539 #define SG_FPRINTF fwprintf
540 #define SG_SSCANF swscanf
541 #define SG_STR_CPY wcscpy
542 #define SG_STR_LEN wcslen
543 #define SG_STR_TOD wcstod
544 #define SG_STR_CMP(s1, s2) CSG_String(s1).Cmp(s2)
545 #define SG_STR_MBTOSG(s) CSG_String(s).w_str()
569 CSG_String(
char Character,
size_t nRepeat = 1);
570 CSG_String(
wchar_t Character,
size_t nRepeat = 1);
573 bool Create (
const class wxString *pString);
579 CSG_String & operator = (
const wchar_t *String);
583 size_t Length (
void)
const;
585 bool is_Empty (
void)
const;
587 SG_Char operator [] (
int i)
const;
588 SG_Char operator [] (
size_t i)
const;
589 SG_Char Get_Char (
size_t i)
const;
591 void Set_Char (
size_t i,
char Character);
592 void Set_Char (
size_t i,
wchar_t Character);
594 const char * b_str (
void)
const;
595 const wchar_t * w_str (
void)
const;
596 const SG_Char * c_str (
void)
const;
598 operator const char * (void)
const {
return( b_str() ); }
599 operator const wchar_t * (void)
const {
return( w_str() ); }
606 CSG_String & Append (
char Character,
size_t nRepeat = 1);
607 CSG_String & Append (
wchar_t Character,
size_t nRepeat = 1);
610 void operator += (
const char *String);
611 void operator += (
const wchar_t *String);
612 void operator += (
char Character);
613 void operator += (
wchar_t Character);
622 int CmpNoCase (
const CSG_String &String)
const;
624 bool is_Same_As (
const CSG_String &String,
bool bCase =
true)
const;
625 bool is_Same_As (
const char Character,
bool bCase =
true)
const;
626 bool is_Same_As (
const wchar_t Character,
bool bCase =
true)
const;
633 static CSG_String Format (
const char *Format, ...);
634 static CSG_String Format (
const wchar_t *Format, ...);
635 int Printf (
const char *Format, ...);
636 int Printf (
const wchar_t *Format, ...);
643 int Trim (
bool fromRight =
false);
644 int Trim_Both (
void);
646 int Find (
char Character,
bool fromEnd =
false)
const;
647 int Find (
wchar_t Character,
bool fromEnd =
false)
const;
649 bool Contains (
const CSG_String &String)
const;
652 CSG_String AfterFirst (
wchar_t Character)
const;
654 CSG_String AfterLast (
wchar_t Character)
const;
655 CSG_String BeforeFirst (
char Character)
const;
656 CSG_String BeforeFirst (
wchar_t Character)
const;
658 CSG_String BeforeLast (
wchar_t Character)
const;
661 CSG_String Mid (
size_t first,
size_t count = 0)
const;
664 bool is_Number (
void)
const;
666 int asInt (
void)
const;
667 bool asInt (
int &Value)
const;
668 sLong asLongLong (
void)
const;
669 bool asLongLong (
sLong &Value)
const;
671 double asDouble (
void)
const;
672 bool asDouble (
double &Value)
const;
674 static CSG_String from_UTF8 (
const char *String,
size_t Length = 0);
676 size_t to_UTF8 (
char **pString)
const;
678 size_t to_MBChar (
char **pString,
int Encoding)
const;
680 bool to_ASCII (
char **pString,
char Replace =
'_')
const;
681 CSG_Buffer to_ASCII (
char Replace =
'_')
const;
682 std::string to_StdString (
void)
const;
683 std::wstring to_StdWstring (
void)
const;
711 bool Set_Count (
size_t Count);
712 int Get_Count (
void)
const {
return( (
int)m_Strings.Get_Size() ); }
713 size_t Get_Size (
void)
const {
return( m_Strings.Get_Size() ); }
718 bool Ins (
const CSG_String &String ,
size_t Index);
719 bool Del (
int Index) {
return(
Del((
size_t)Index) ); }
720 bool Del (
size_t Index);
725 CSG_String & operator [] (
int Index)
const {
return( Get_String(Index) ); }
726 CSG_String & operator [] (
size_t Index)
const {
return( Get_String(Index) ); }
732 bool Sort (
bool Ascending =
true);
745 #define SG_DEFAULT_DELIMITERS " \t\r\n"
768 size_t Get_Tokens_Count (
void)
const;
769 SG_Char Get_Last_Delimiter (
void)
const;
771 size_t Get_Position (
void)
const;
773 bool Has_More_Tokens (
void)
const;
779 class wxStringTokenizer *m_pTokenizer;
820 CSG_Bytes (
const BYTE *Bytes,
int nBytes);
821 bool Create (
const BYTE *Bytes,
int nBytes);
829 bool is_EOF (
void) {
return( m_Cursor >= m_nBytes ); }
837 BYTE
Get_Byte (
int i)
const {
return( i >= 0 && i < m_nBytes ? m_Bytes[i] : 0 ); }
838 BYTE operator [] (
int i)
const {
return( Get_Byte(i) ); }
846 bool Add (
void *Bytes,
int nBytes,
bool bSwapBytes);
848 bool Add (BYTE Value) {
return(
Add(&Value,
sizeof(Value),
false) ); }
849 CSG_Bytes & operator += (BYTE Value) { Add(Value);
return( *
this ); }
850 bool Add (
char Value) {
return(
Add(&Value,
sizeof(Value),
false) ); }
851 CSG_Bytes & operator += (
char Value) { Add(Value);
return( *
this ); }
852 bool Add (
short Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
853 CSG_Bytes & operator += (
short Value) { Add(Value);
return( *
this ); }
854 bool Add (WORD Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
855 CSG_Bytes & operator += (WORD Value) { Add(Value);
return( *
this ); }
856 bool Add (
int Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
857 CSG_Bytes & operator += (
int Value) { Add(Value);
return( *
this ); }
858 bool Add (DWORD Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
859 CSG_Bytes & operator += (DWORD Value) { Add(Value);
return( *
this ); }
860 bool Add (
float Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
861 CSG_Bytes & operator += (
float Value) { Add(Value);
return( *
this ); }
862 bool Add (
double Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
863 CSG_Bytes & operator += (
double Value) { Add(Value);
return( *
this ); }
865 BYTE
asByte (
int i)
const {
return( Get_Byte (i) ); }
866 char asChar (
int i)
const {
return( (
char)Get_Byte (i) ); }
867 short asShort (
int i,
bool bSwapBytes =
false)
const {
short v = *((
short *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
868 WORD
asWord (
int i,
bool bSwapBytes =
false)
const { WORD v = *((WORD *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
869 int asInt (
int i,
bool bSwapBytes =
false)
const {
int v = *((
int *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
870 DWORD
asDWord (
int i,
bool bSwapBytes =
false)
const { DWORD v = *((DWORD *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
871 float asFloat (
int i,
bool bSwapBytes =
false)
const {
float v = *((
float *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
872 double asDouble (
int i,
bool bSwapBytes =
false)
const {
double v = *((
double *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
874 BYTE
Read_Byte (
void) { BYTE v = asByte (m_Cursor); m_Cursor +=
sizeof(v);
return( v ); }
875 char Read_Char (
void) {
char v = asByte (m_Cursor); m_Cursor +=
sizeof(v);
return( v ); }
876 short Read_Short (
bool bSwapBytes =
false) {
short v = asShort (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
877 WORD
Read_Word (
bool bSwapBytes =
false) { WORD v = asWord (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
878 int Read_Int (
bool bSwapBytes =
false) {
int v = asInt (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
879 DWORD
Read_DWord (
bool bSwapBytes =
false) { DWORD v = asDWord (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
880 float Read_Float (
bool bSwapBytes =
false) {
float v = asFloat (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
881 double Read_Double (
bool bSwapBytes =
false) {
double v = asDouble(m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
884 bool fromHexString (
const CSG_String &HexString);
889 int m_nBytes, m_nBuffer, m_Cursor;
894 bool _Inc_Array (
int nBytes);
909 CSG_Bytes & operator [] (
int i) {
return( *Get_Bytes(i) ); }
916 int m_nBytes, m_nBuffer;
935 m_Stack.
Create(RecordSize, 1, TSG_Array_Growth::SG_ARRAY_GROWTH_FIX_256);
945 bool Clear (
bool bFreeMemory =
false)
947 return( m_Stack.
Set_Array(1, bFreeMemory) );
1014 #define SG_DATATYPES_Undefined 0x0000
1015 #define SG_DATATYPES_Bit 0x0001
1016 #define SG_DATATYPES_Byte 0x0002
1017 #define SG_DATATYPES_Char 0x0004
1018 #define SG_DATATYPES_Word 0x0008
1019 #define SG_DATATYPES_Short 0x0010
1020 #define SG_DATATYPES_DWord 0x0020
1021 #define SG_DATATYPES_Int 0x0040
1022 #define SG_DATATYPES_ULong 0x0080
1023 #define SG_DATATYPES_Long 0x0100
1024 #define SG_DATATYPES_Float 0x0200
1025 #define SG_DATATYPES_Double 0x0400
1026 #define SG_DATATYPES_String 0x0800
1027 #define SG_DATATYPES_Date 0x1000
1028 #define SG_DATATYPES_Color 0x2000
1029 #define SG_DATATYPES_Binary 0x4000
1030 #define SG_DATATYPES_Standard 0xFFFF // all flags set
1031 #define SG_DATATYPES_SInteger (SG_DATATYPES_Char|SG_DATATYPES_Short|SG_DATATYPES_Int |SG_DATATYPES_Long)
1032 #define SG_DATATYPES_UInteger (SG_DATATYPES_Byte|SG_DATATYPES_Word |SG_DATATYPES_DWord|SG_DATATYPES_ULong)
1033 #define SG_DATATYPES_Integer (SG_DATATYPES_SInteger|SG_DATATYPES_UInteger)
1034 #define SG_DATATYPES_Real (SG_DATATYPES_Float|SG_DATATYPES_Double)
1035 #define SG_DATATYPES_Numeric (SG_DATATYPES_Integer|SG_DATATYPES_Real)
1036 #define SG_DATATYPES_Table (SG_DATATYPES_String|SG_DATATYPES_Date|SG_DATATYPES_Color|SG_DATATYPES_Numeric|SG_DATATYPES_Binary)
1044 "SHORTINT_UNSIGNED",
1079 default :
return( 0 );
1133 virtual bool Close (
void);
1138 class wxStreamBase *
Get_Stream (
void)
const {
return( (
class wxStreamBase *)m_pStream ); }
1140 bool Set_Encoding (
int Encoding);
1143 bool is_Open (
void)
const {
return( m_pStream != NULL ); }
1146 bool is_EOF (
void)
const;
1148 sLong Length (
void)
const;
1151 bool Seek_Start (
void)
const;
1152 bool Seek_End (
void)
const;
1154 sLong Tell (
void)
const;
1156 int Printf (
const char *Format, ...);
1157 int Printf (
const wchar_t *Format, ...);
1159 size_t Read (
void *Buffer,
size_t Size,
size_t Count = 1)
const;
1160 size_t Write (
void *Buffer,
size_t Size,
size_t Count = 1)
const;
1161 size_t Read (
CSG_String &Buffer,
size_t Size)
const;
1162 size_t Write (
const CSG_String &Buffer)
const;
1166 int Read_Char (
void)
const;
1167 int Read_Int (
bool bBigEndian =
false)
const;
1168 bool Write_Int (
int Value,
bool bBigEndian =
false);
1169 double Read_Double (
bool bBigEndian =
false)
const;
1170 bool Write_Double (
double Value,
bool bBigEndian =
false);
1172 bool Scan (
int &Value)
const;
1173 bool Scan (
double &Value)
const;
1176 int Scan_Int (
void)
const;
1177 double Scan_Double (
void)
const;
1190 void On_Construction (
void);
1205 virtual bool Close (
void);
1210 bool Add_File (
const CSG_String &Name,
bool bBinary =
true);
1214 bool Get_File (
size_t Index);
1216 bool is_Directory (
size_t Index);
1262 #define SG_GET_RGB( r, g, b ) ((DWORD) (((BYTE)(r) | ((WORD)(g) << 8)) | (((DWORD)(BYTE)(b)) << 16)))
1263 #define SG_GET_RGBA(r, g, b, a) ((DWORD) (((BYTE)(r) | ((WORD)(g) << 8)) | (((DWORD)(BYTE)(b)) << 16) | (((DWORD)(BYTE)(a)) << 24)))
1265 #define SG_GET_R(rgb) ((BYTE) ((rgb) ))
1266 #define SG_GET_G(rgb) ((BYTE) ((rgb) >> 8))
1267 #define SG_GET_B(rgb) ((BYTE) ((rgb) >> 16))
1268 #define SG_GET_A(rgb) ((BYTE) ((rgb) >> 24))
1271 #define SG_COLOR_BLACK SG_GET_RGB( 0, 0, 0)
1272 #define SG_COLOR_GREY SG_GET_RGB(128, 128, 128)
1273 #define SG_COLOR_GREY_LIGHT SG_GET_RGB(192, 192, 192)
1274 #define SG_COLOR_WHITE SG_GET_RGB(255, 255, 255)
1275 #define SG_COLOR_RED SG_GET_RGB(255, 0, 0)
1276 #define SG_COLOR_RED_DARK SG_GET_RGB(128, 0, 0)
1277 #define SG_COLOR_YELLOW SG_GET_RGB(255, 255, 0)
1278 #define SG_COLOR_YELLOW_DARK SG_GET_RGB(128, 128, 0)
1279 #define SG_COLOR_GREEN SG_GET_RGB( 0, 255, 0)
1280 #define SG_COLOR_GREEN_DARK SG_GET_RGB( 0, 128, 0)
1281 #define SG_COLOR_GREEN_LIGHT SG_GET_RGB( 0, 255, 0)
1282 #define SG_COLOR_BLUE SG_GET_RGB( 0, 0, 255)
1283 #define SG_COLOR_BLUE_DARK SG_GET_RGB( 0, 0, 128)
1284 #define SG_COLOR_BLUE_LIGHT SG_GET_RGB( 0, 255, 255)
1285 #define SG_COLOR_BLUE_GREEN SG_GET_RGB( 0, 128, 128)
1286 #define SG_COLOR_PURPLE SG_GET_RGB(128, 0, 128)
1287 #define SG_COLOR_PINK SG_GET_RGB(255, 0, 255)
1288 #define SG_COLOR_NONE -1
1289 #define SG_COLOR_RANDOM -2
1347 bool Create (
int nColors,
int Palette =
SG_COLORS_DEFAULT,
bool bRevert =
false);
1351 void Destroy (
void);
1353 bool Set_Count (
int nColors);
1357 long & operator [] (
int Index) {
return( m_Colors[Index < 0 ? 0 : Index >= m_nColors ? m_nColors - 1 : Index] ); }
1359 bool Set_Color (
int Index,
long Color);
1360 bool Set_Color (
int Index,
int Red,
int Green,
int Blue);
1361 bool Set_Red (
int Index,
int Value);
1362 bool Set_Green (
int Index,
int Value);
1363 bool Set_Blue (
int Index,
int Value);
1364 bool Set_Brightness (
int Index,
int Value);
1366 long Get_Color (
int Index)
const {
return( m_nColors > 0 ? m_Colors[Index < 0 ? 0 : Index >= m_nColors ? m_nColors - 1 : Index] : 0 ); }
1370 long Get_Brightness (
int Index)
const {
return( (Get_Red(Index) + Get_Green(Index) + Get_Blue(Index)) / 3 ); }
1374 if( m_nColors <= 0 )
return( 0 );
1375 if( Index <= 0. )
return( m_Colors[0] );
1376 if( Index >= m_nColors - 1. )
return( m_Colors[m_nColors - 1] );
1378 int i = (int)Index; Index -= i;
1379 int r = (int)(Get_Red (i) + Index * ((double)Get_Red (i + 1) - Get_Red (i)));
1380 int g = (int)(Get_Green(i) + Index * ((double)Get_Green(i + 1) - Get_Green(i)));
1381 int b = (int)(Get_Blue (i) + Index * ((double)Get_Blue (i + 1) - Get_Blue (i)));
1386 static int Get_Predefined_Count(
void);
1387 static CSG_String Get_Predefined_Name (
int Identifier);
1388 bool Set_Predefined (
int Index,
bool bRevert =
false,
int nColors = 11);
1389 bool Set_Palette (
int Index,
bool bRevert =
false,
int nColors = 11) {
return( Set_Predefined(Index, bRevert, nColors) ); }
1390 bool Set_Default (
int nColors = 11);
1391 bool Set_Ramp (
long Color_A,
long Color_B);
1392 bool Set_Ramp (
long Color_A,
long Color_B,
int iColor_A,
int iColor_B);
1393 bool Set_Ramp_Brighness (
int Brightness_A,
int Brightness_B);
1394 bool Set_Ramp_Brighness (
int Brightness_A,
int Brightness_B,
int iColor_A,
int iColor_B);
1399 bool Greyscale (
void);
1405 bool Save (
const CSG_String &File_Name,
bool bBinary);
1407 bool Serialize (
CSG_File &Stream,
bool bSave,
bool bBinary);
1420 void _Set_Brightness (
double &a,
double &b,
double &c,
int Pass = 0);
1438 CSG_Translator (
const CSG_String &File_Name,
bool bSetExtension =
true,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1439 bool Create (
const CSG_String &File_Name,
bool bSetExtension =
true,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1441 CSG_Translator (
class CSG_Table *pTranslations,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1442 bool Create (
class CSG_Table *pTranslations,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1444 void Destroy (
void);
1449 const SG_Char *
Get_Text (
int i)
const {
return( i >= 0 && i < m_nTranslations ? m_Translations[i]->m_Text :
SG_T(
"") ); }
1452 const SG_Char * Get_Translation (
const SG_Char *Text,
bool bReturnNullOnNotFound =
false)
const;
1458 class CSG_Translation
1464 m_Translation = Translation;
1475 int m_nTranslations;
1477 CSG_Translation **m_Translations;
1480 int _Get_Index (
const CSG_String &Text)
const;
1489 #define _TL(s) SG_Translate(L ## s)
1490 #define _TW(s) SG_Translate(CSG_String(s))
1719 #endif // #ifndef HEADER_INCLUDED__SAGA_API__api_core_H
SAGA_API_DLL_EXPORT bool SG_Data_Type_Range_Check(TSG_Data_Type Type, double &Value)
int * Get_Array(sLong nValues)
int Get_Count(void) const
bool Set_Array(sLong nValues, bool bShrink=true)
bool Set_Array(sLong nValues, bool bShrink=true)
virtual bool Open(const CSG_String &FileName, int Mode=SG_FILE_R, bool bBinary=true, int Encoding=SG_FILE_ENCODING_ANSI)
SAGA_API_DLL_EXPORT bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
SAGA_API_DLL_EXPORT bool SG_Initialize_Environment(bool bLibraries=true, bool bProjections=true, const SG_Char *SAGA_Path=NULL, bool bInitializeWX=true)
@ SG_UI_WINDOW_ARRANGE_MDI_CASCADE
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path(const CSG_String &full_Path)
DWORD Read_DWord(bool bSwapBytes=false)
#define SG_GET_RGB(r, g, b)
@ SG_COLORS_RED_BLUE_GREEN
SAGA_API_DLL_EXPORT bool SG_UI_Progress_is_Locked(void)
void Set_Value(int Offset, int Value, bool bBigEndian=false)
bool Inc_Array(sLong nValues=1)
WORD asWord(int i, bool bSwapBytes=false) const
TSG_Array_Growth Get_Growth(void) const
void Set_Value(int Offset, short Value, bool bBigEndian=false)
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Ready(void)
SAGA_API_DLL_EXPORT void SG_UI_Msg_Add_Execution(const char *Message, bool bNewLine=true, TSG_UI_MSG_STYLE Style=SG_UI_MSG_STYLE_NORMAL)
CSG_UI_Parameter(bool Value)
float asFloat(int i, bool bSwapBytes=false) const
@ CALLBACK_PROCESS_SET_BUSY
SAGA_API_DLL_EXPORT bool SG_Dir_List_Subdirectories(CSG_Strings &List, const CSG_String &Directory)
int Read_Int(bool bSwapBytes=false)
void * Get_Array(sLong nValues)
sLong Get_Size(void) const
SAGA_API_DLL_EXPORT TSG_Data_Type SG_Data_Type_Get_Type(const CSG_String &Identifier)
@ CALLBACK_DATAOBJECT_COLORS_GET
SAGA_API_DLL_EXPORT void SG_Swap_Bytes(void *Buffer, int nBytes)
void ** Get_Array(sLong nValues)
class wxStreamBase * Get_Stream(void) const
void Add_Value(float Value, bool bBigEndian=false)
size_t Get_uSize(void) const
SAGA_API_DLL_EXPORT CSG_String SG_HTML_Tag_Replacer(const CSG_String &Text)
const SG_Char * Get_Text(int i) const
size_t Get_RecordSize(void) const
@ CALLBACK_STOP_EXECUTION
SAGA_API_DLL_EXPORT double SG_Degree_To_Double(const CSG_String &String)
SAGA_API_DLL_EXPORT bool SG_Dir_Exists(const CSG_String &Directory)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Params_Get(class CSG_Data_Object *pDataObject, class CSG_Parameters *pParameters)
@ SG_COLORS_RED_GREY_BLUE
SAGA_API_DLL_EXPORT bool SG_UI_Console_Get_UTF8(void)
sLong Get_Size(void) const
long Get_Blue(int Index) const
void * Get_Record_Pop(void)
@ SG_UI_MSG_STYLE_SUCCESS
SAGA_API_DLL_EXPORT CSG_String SG_Get_String(double Value, int Precision=-99)
int Get_Count(void) const
@ CALLBACK_DATABASE_UPDATE
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Extension(const CSG_String &FileName, const CSG_String &Extension)
WORD Read_Word(bool bSwapBytes=false)
@ SG_UI_DATAOBJECT_SHOW_MAP_LAST
SAGA_API_DLL_EXPORT bool SG_UI_ODBC_Update(const CSG_String &Server)
SAGA_API_DLL_EXPORT void * SG_Malloc(size_t size)
bool Ins(const CSG_String &String, int Index)
SAGA_API_DLL_EXPORT int SG_UI_Msg_Lock(bool bOn)
sLong Get_Size(void) const
virtual TSG_File_Type Get_File_Type(void) const
@ SG_UI_DATAOBJECT_SHOW_MAP_NEW
SAGA_API_DLL_EXPORT long SG_Color_From_RGB(int Red, int Green, int Blue, int Alpha=0)
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_BOTTOM
#define SG_DEFAULT_DELIMITERS
size_t SG_Data_Type_Get_Size(TSG_Data_Type Type)
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Path(const CSG_String &Path1, const CSG_String &Path2)
SAGA_API_DLL_EXPORT bool SG_UI_Stop_Execution(bool bDialog)
int Get_Encoding(void) const
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_LEFT
SAGA_API_DLL_EXPORT TSG_PFNC_UI_Callback SG_Get_UI_Callback(void)
double asDouble(int Offset, bool bBigEndian=false) const
SAGA_API_DLL_EXPORT const SG_Char * SG_Translate(const CSG_String &Text)
SAGA_API_DLL_EXPORT CSG_String SG_Color_To_Text(long Color, bool bHexadecimal=true)
SAGA_API_DLL_EXPORT void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
SAGA_API_DLL_EXPORT void * SG_UI_Get_Window_Main(void)
SAGA_API_DLL_EXPORT CSG_String SG_Dir_Get_Temp(void)
@ SG_UI_WINDOW_ARRANGE_MDI_TILE_HOR
@ SG_FILE_ENCODING_UTF32BE
@ CALLBACK_PROCESS_SET_OKAY
CSG_UI_Parameter(const CSG_String &Value)
@ CALLBACK_PROCESS_SET_PROGRESS
BYTE Get_Byte(int i) const
void Set_Value(int Offset, char Value, bool bBigEndian=false)
int * Get_Array(void) const
SAGA_API_DLL_EXPORT void SG_UI_Console_Print_StdOut(const char *Text, SG_Char End='\n', bool bFlush=true)
SAGA_API_DLL_EXPORT bool SG_File_Delete(const CSG_String &FileName)
SAGA_API_DLL_EXPORT CSG_String SG_UI_Get_Application_Name(void)
SAGA_API_DLL_EXPORT void SG_Free(void *memblock)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_asImage(class CSG_Data_Object *pDataObject, class CSG_Grid *pGrid)
SAGA_API_DLL_EXPORT void SG_Mem_Set_Double(char *Buffer, double Value, bool bSwapBytes)
SAGA_API_DLL_EXPORT bool SG_is_Character_Numeric(int Character)
@ SG_UI_WINDOW_ARRANGE_TDI_TILE_VER
SAGA_API_DLL_EXPORT bool SG_Uninitialize_Environment(void)
long Get_Red(int Index) const
bool Set(sLong Index, int Value)
sLong Get_Size(void) const
int Get(sLong Index) const
short asShort(int i, bool bSwapBytes=false) const
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Busy(bool bOn=true, const CSG_String &Message="")
bool Set_Array(sLong nValues, bool bShrink=true)
void * Get(sLong Index) const
bool Dec_Array(bool bShrink=true)
SAGA_API_DLL_EXPORT CSG_String SG_Dir_Get_Current(void)
void * Get_Record(size_t i) const
bool Set_Growth(TSG_Array_Growth Growth)
bool Inc_Array(sLong nValues=1)
SAGA_API_DLL_EXPORT void * SG_Calloc(size_t num, size_t size)
TSG_Array_Growth Get_Growth(void) const
SAGA_API_DLL_EXPORT void SG_UI_Process_Set_Text(const CSG_String &Text)
SAGA_API_DLL_EXPORT bool SG_UI_Dlg_Parameters(class CSG_Parameters *pParameters, const CSG_String &Caption)
CSG_UI_Parameter(int Value)
SAGA_API_DLL_EXPORT bool SG_Set_Environment(const CSG_String &Variable, const CSG_String &Value)
CSG_Bytes Get_Bytes(int i) const
SAGA_API_DLL_EXPORT bool SG_Get_Environment(const CSG_String &Variable, CSG_String *Value=NULL)
@ SG_UI_MSG_STYLE_FAILURE
@ SG_UI_DATAOBJECT_UPDATE
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Name(const CSG_String &full_Path, bool bExtension)
SAGA_API_DLL_EXPORT bool SG_Data_Type_is_Numeric(TSG_Data_Type Type)
SAGA_API_DLL_EXPORT bool SG_File_Exists(const CSG_String &FileName)
CSG_Array_Int(const CSG_Array_Int &Array)
int Get_Count(void) const
void Add_Value(int Value, bool bBigEndian=false)
bool Add(float Value, bool bSwapBytes=false)
SAGA_API_DLL_EXPORT int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
int(* TSG_PFNC_UI_Callback)(TSG_UI_Callback_ID ID, CSG_UI_Parameter &Param_1, CSG_UI_Parameter &Param_2)
@ SG_UI_DATAOBJECT_SHOW_MAP_ACTIVE
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Okay(bool bOkay=true)
int asInt(int Offset, bool bBigEndian=false) const
sLong Get(sLong Index) const
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path_Relative(const CSG_String &Directory, const CSG_String &full_Path)
bool Set_Palette(int Index, bool bRevert=false, int nColors=11)
void Set_Value(int Offset, float Value, bool bBigEndian=false)
CSG_Array_Int(sLong nValues=0, TSG_Array_Growth Growth=TSG_Array_Growth::SG_ARRAY_GROWTH_0)
CSG_Array_sLong(sLong nValues=0, TSG_Array_Growth Growth=TSG_Array_Growth::SG_ARRAY_GROWTH_0)
@ CALLBACK_SET_MAP_EXTENT
bool is_CaseSensitive(void) const
@ SG_FILE_ENCODING_UNDEFINED
CSG_Stack(size_t RecordSize)
SAGA_API_DLL_EXPORT bool SG_Dir_Create(const CSG_String &Directory, bool bFullPath=false)
long Get_Color(int Index) const
bool Dec_Array(bool bShrink=true)
@ CALLBACK_DATAOBJECT_UPDATE
CSG_Array_Pointer m_Strings
size_t Get_Size(void) const
@ CALLBACK_DLG_PARAMETERS
SAGA_API_DLL_EXPORT int SG_OMP_Get_Thread_Num(void)
size_t Get_uSize(void) const
SAGA_API_DLL_EXPORT int SG_UI_Progress_Lock(bool bOn)
@ CALLBACK_PROCESS_SET_READY
bool Set_Growth(TSG_Array_Growth Growth)
bool is_Writing(void) const
SAGA_API_DLL_EXPORT CSG_String SG_UI_Get_Application_Path(bool bPathOnly=false)
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Progress(int Position, int Range)
size_t Get_File_Count(void)
TSG_Array_Growth Get_Growth(void) const
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Colors_Get(class CSG_Data_Object *pDataObject, class CSG_Colors *pColors)
size_t Get_Value_Size(void) const
SAGA_API_DLL_EXPORT CSG_String SG_Get_CurrentTimeStr(bool bWithDate=true)
@ CALLBACK_DATAOBJECT_ADD
@ CALLBACK_DATAOBJECT_SHOW
CSG_Array_Pointer(sLong nValues=0, TSG_Array_Growth Growth=TSG_Array_Growth::SG_ARRAY_GROWTH_0)
bool Add(short Value, bool bSwapBytes=false)
bool Dec_Array(bool bShrink=true)
SAGA_API_DLL_EXPORT int SG_UI_Progress_Reset(void)
bool Clear(bool bFreeMemory=false)
SAGA_API_DLL_EXPORT bool SG_Set_UI_Callback(TSG_PFNC_UI_Callback Function)
SAGA_API_DLL_EXPORT bool SG_UI_Msg_is_Locked(void)
long Get_Interpolated(double Index) const
SAGA_API_DLL_EXPORT bool SG_Dir_Delete(const CSG_String &Directory, bool bRecursive=false)
bool Inc_Size(size_t Size)
SAGA_API_DLL_EXPORT CSG_Translator & SG_Get_Translator(void)
@ SG_FILE_ENCODING_UTF32LE
size_t Get_Size(void) const
SAGA_API_DLL_EXPORT int SG_Mem_Get_Int(const char *Buffer, bool bSwapBytes)
CSG_Array_Pointer m_Files
SAGA_API_DLL_EXPORT int SG_Get_Significant_Decimals(double Value, int maxDecimals=6)
@ CALLBACK_DATAOBJECT_PARAMS_SET
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)
@ SG_COLORS_DEFAULT_BRIGHT
const SG_Char * Get_Translation(int i) const
SAGA_API_DLL_EXPORT void SG_OMP_Set_Max_Num_Threads(int iCores)
BYTE * Get_Bytes(void) const
CSG_UI_Parameter(double Value)
double asDouble(int i, bool bSwapBytes=false) const
SAGA_API_DLL_EXPORT int SG_UI_Window_Arrange(int Arrange)
void * Get_Record_Push(void)
bool Add(DWORD Value, bool bSwapBytes=false)
#define SAGA_API_DLL_EXPORT
SAGA_API_DLL_EXPORT CSG_String SG_UI_Get_API_Path(void)
SAGA_API_DLL_EXPORT CSG_String SG_UI_Set_Application_Name(const CSG_String &Name="")
bool Set(sLong Index, sLong Value)
size_t Get_uSize(void) const
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Extension(const CSG_String &FileName)
void * Create(const CSG_Array &Array)
@ CALLBACK_MESSAGE_ADD_EXECUTION
void Add_Value(char Value, bool bBigEndian=false)
SAGA_API_DLL_EXPORT void SG_UI_Msg_Flush(void)
SAGA_API_DLL_EXPORT void SG_UI_Dlg_Info(const CSG_String &Message, const CSG_String &Caption)
void * Get_Array(void) const
SAGA_API_DLL_EXPORT CSG_String SG_Data_Type_Get_Identifier(TSG_Data_Type Type)
SAGA_API_DLL_EXPORT long SG_Color_Get_Random(void)
bool Set(sLong Index, void *Value)
bool Assign(const CSG_Strings &Strings)
bool Set_Count(int Count)
SAGA_API_DLL_EXPORT void SG_UI_ProgressAndMsg_Lock(bool bOn)
char * Get_Data(int Offset=0) const
SAGA_API_DLL_EXPORT bool SG_UI_Set_Map_Extent(double xMin, double yMin, double xMax, double yMax, int Maps=SG_UI_MAP_ACTIVE)
@ CALLBACK_PROCESS_SET_TEXT
SAGA_API_DLL_EXPORT void SG_UI_ProgressAndMsg_Reset(void)
SAGA_API_DLL_EXPORT bool SG_Dir_List_Files(CSG_Strings &List, const CSG_String &Directory)
CSG_Array_Pointer(const CSG_Array_Pointer &Array)
CSG_String & Get_String(int Index) const
@ SG_COLORS_GREEN_GREY_BLUE
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Add(class CSG_Data_Object *pDataObject, int Show)
bool Set_Growth(TSG_Array_Growth Growth)
@ SG_FILE_ENCODING_UTF16LE
const char gSG_Data_Type_Identifier[][32]
@ SG_UI_WINDOW_ARRANGE_TDI_TILE_HOR
@ CALLBACK_MESSAGE_ADD_ERROR
bool Inc_Array(sLong nValues=1)
SAGA_API_DLL_EXPORT CSG_String SG_Double_To_Degree(double Value)
SAGA_API_DLL_EXPORT bool SG_File_Set_Extension(CSG_String &FileName, const CSG_String &Extension)
@ SG_COLORS_RED_GREY_GREEN
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path_Absolute(const CSG_String &full_Path)
DWORD asDWord(int i, bool bSwapBytes=false) const
SAGA_API_DLL_EXPORT void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End='\n', bool bFlush=true)
int Get_Count(void) const
bool Inc_Array(sLong nValues=1)
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_RIGHT
long Get_Brightness(int Index) const
@ SG_UI_DATAOBJECT_SHOW_MAP
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Del(class CSG_Data_Object *pDataObject, bool bConfirm)
SAGA_API_DLL_EXPORT CSG_String SG_Data_Type_Get_Name(TSG_Data_Type Type, bool bShort=false)
SAGA_API_DLL_EXPORT bool SG_Color_From_Text(const CSG_String &Text, long &Color)
bool Dec_Array(bool bShrink=true)
SAGA_API_DLL_EXPORT void SG_UI_Msg_Add_Error(const char *Message)
long Get_Green(int Index) const
SAGA_API_DLL_EXPORT int SG_Data_Type_Get_Flag(TSG_Data_Type Type)
@ CALLBACK_GET_APP_WINDOW
bool Add(int Value, bool bSwapBytes=false)
@ CALLBACK_DATAOBJECT_DEL
SAGA_API_DLL_EXPORT int SG_UI_Msg_Reset(void)
@ SG_FILE_ENCODING_UTF16BE
SAGA_API_DLL_EXPORT CSG_String SG_Colors_Get_Name(int Index)
bool Set_Array(sLong nValues, bool bShrink=true)
@ CALLBACK_WINDOW_ARRANGE
SAGA_API_DLL_EXPORT void SG_Flip_Decimal_Separators(CSG_String &String)
TSG_String_Tokenizer_Mode
CSG_String & Get_String(size_t Index) const
sLong * Get_Array(void) const
CSG_UI_Parameter(void *Value)
size_t Get_Size(void) const
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_TOP
float Read_Float(bool bSwapBytes=false)
TSG_Array_Growth Get_Growth(void) const
void ** Get_Array(void) const
bool Add(WORD Value, bool bSwapBytes=false)
@ CALLBACK_DATAOBJECT_PARAMS_GET
virtual TSG_File_Type Get_File_Type(void) const
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Colors_Set(class CSG_Data_Object *pDataObject, class CSG_Colors *pColors)
SAGA_API_DLL_EXPORT void SG_Mem_Set_Int(char *Buffer, int Value, bool bSwapBytes)
CSG_Array_sLong(const CSG_Array_sLong &Array)
@ SG_COLORS_RED_GREEN_BLUE
void Add_Value(short Value, bool bBigEndian=false)
@ CALLBACK_PROCESS_GET_OKAY
class wxString * m_pString
float asFloat(int Offset, bool bBigEndian=false) const
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Params_Set(class CSG_Data_Object *pDataObject, class CSG_Parameters *pParameters)
int asInt(int i, bool bSwapBytes=false) const
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Name_Temp(const CSG_String &Prefix)
@ SG_UI_WINDOW_ARRANGE_MDI_TILE_VER
SAGA_API_DLL_EXPORT bool SG_UI_Process_Get_Okay(bool bBlink=false)
SAGA_API_DLL_EXPORT CSG_String SG_File_Make_Path(const CSG_String &Directory, const CSG_String &Name)
SAGA_API_DLL_EXPORT int SG_OMP_Get_Max_Num_Threads(void)
@ SG_COLORS_PRECIPITATION
CSG_Bytes * Get_Bytes(int i)
short Read_Short(bool bSwapBytes=false)
int Get_Count(void) const
size_t Get_uSize(void) const
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
void Set_Value(int Offset, double Value, bool bBigEndian=false)
SAGA_API_DLL_EXPORT int SG_OMP_Get_Max_Num_Procs(void)
@ SG_COLORS_GREEN_RED_BLUE
@ CALLBACK_DATAOBJECT_ASIMAGE
double Read_Double(bool bSwapBytes=false)
sLong * Get_Array(sLong nValues)
SAGA_API_DLL_EXPORT double SG_Mem_Get_Double(const char *Buffer, bool bSwapBytes)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Show(class CSG_Data_Object *pDataObject, int Show)
SAGA_API_DLL_EXPORT void SG_UI_Console_Set_UTF8(bool bOn)
SAGA_API_DLL_EXPORT void SG_UI_Msg_Add(const char *Message, bool bNewLine=true, TSG_UI_MSG_STYLE Style=SG_UI_MSG_STYLE_NORMAL)
bool Add(double Value, bool bSwapBytes=false)
bool is_Reading(void) const
void * Get_Entry(sLong Index) const
Returns a pointer to the memory address of the requested variable. You have to type cast and derefere...
void Add_Value(double Value, bool bBigEndian=false)
virtual const CSG_String & Get_File_Name(void) const
@ CALLBACK_DATAOBJECT_COLORS_SET
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Update(class CSG_Data_Object *pDataObject, int Show, class CSG_Parameters *pParameters)
SAGA_API_DLL_EXPORT bool SG_UI_Diagram_Show(class CSG_Table *pTable, class CSG_Parameters *pParameters)
short asShort(int Offset, bool bBigEndian=false) const
SAGA_API_DLL_EXPORT CSG_String operator+(const char *A, const CSG_String &B)