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
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)
144 typedef unsigned char BYTE;
149 typedef unsigned short WORD;
151 typedef unsigned long DWORD;
153 typedef unsigned int DWORD;
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);
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); }
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 ); }
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 ); }
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);
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;
587 SG_Char operator [] (
int i)
const;
588 SG_Char operator [] (
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;
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, ...);
639 size_t Replace_Single_Char (
const SG_Char Old,
const CSG_String &New,
bool bReplaceAll =
true);
640 size_t Replace_Single_Char (
const SG_Char Old,
const SG_Char New,
bool bReplaceAll =
true);
645 int Trim (
bool fromRight =
false);
646 int Trim_Both (
void);
648 int Find (
char Character,
bool fromEnd =
false)
const;
649 int Find (
wchar_t Character,
bool fromEnd =
false)
const;
651 bool Contains (
const CSG_String &String)
const;
654 CSG_String AfterFirst (
wchar_t Character)
const;
656 CSG_String AfterLast (
wchar_t Character)
const;
657 CSG_String BeforeFirst (
char Character)
const;
658 CSG_String BeforeFirst (
wchar_t Character)
const;
660 CSG_String BeforeLast (
wchar_t Character)
const;
663 CSG_String Mid (
size_t first,
size_t count = 0)
const;
666 bool is_Number (
void)
const;
668 int asInt (
void)
const;
669 bool asInt (
int &Value)
const;
670 sLong asLongLong (
void)
const;
671 bool asLongLong (
sLong &Value)
const;
673 double asDouble (
void)
const;
674 bool asDouble (
double &Value)
const;
676 static CSG_String from_UTF8 (
const char *String,
size_t Length = 0);
678 size_t to_UTF8 (
char **pString)
const;
680 size_t to_MBChar (
char **pString,
int Encoding)
const;
682 bool to_ASCII (
char **pString,
char Replace =
'_')
const;
683 CSG_Buffer to_ASCII (
char Replace =
'_')
const;
684 std::string to_StdString (
void)
const;
685 std::wstring to_StdWstring (
void)
const;
713 bool Set_Count (
size_t Count);
720 bool Ins (
const CSG_String &String ,
size_t Index);
721 bool Del (
int Index) {
return(
Del((
size_t)Index) ); }
722 bool Del (
size_t Index);
734 bool Sort (
bool Ascending =
true);
747#define SG_DEFAULT_DELIMITERS " \t\r\n"
781 class wxStringTokenizer *m_pTokenizer;
822 CSG_Bytes (
const BYTE *Bytes,
int nBytes);
823 bool Create (
const BYTE *Bytes,
int nBytes);
831 bool is_EOF (
void) {
return( m_Cursor >= m_nBytes ); }
839 BYTE
Get_Byte (
int i)
const {
return( i >= 0 && i < m_nBytes ? m_Bytes[i] : 0 ); }
840 BYTE operator [] (
int i)
const {
return(
Get_Byte(i) ); }
848 bool Add (
void *Bytes,
int nBytes,
bool bSwapBytes);
850 bool Add (BYTE Value) {
return(
Add(&Value,
sizeof(Value),
false) ); }
852 bool Add (
char Value) {
return(
Add(&Value,
sizeof(Value),
false) ); }
854 bool Add (
short Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
856 bool Add (WORD Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
858 bool Add (
int Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
860 bool Add (DWORD Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
862 bool Add (
float Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
864 bool Add (
double Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
865 CSG_Bytes & operator += (
double Value) {
Add(Value);
return( *
this ); }
869 short asShort (
int i,
bool bSwapBytes =
false)
const {
short v = *((
short *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
870 WORD
asWord (
int i,
bool bSwapBytes =
false)
const { WORD v = *((WORD *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
871 int asInt (
int i,
bool bSwapBytes =
false)
const {
int v = *((
int *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
872 DWORD
asDWord (
int i,
bool bSwapBytes =
false)
const { DWORD v = *((DWORD *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
873 float asFloat (
int i,
bool bSwapBytes =
false)
const {
float v = *((
float *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
874 double asDouble (
int i,
bool bSwapBytes =
false)
const {
double v = *((
double *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
876 BYTE
Read_Byte (
void) { BYTE v =
asByte (m_Cursor); m_Cursor +=
sizeof(v);
return( v ); }
877 char Read_Char (
void) {
char v =
asByte (m_Cursor); m_Cursor +=
sizeof(v);
return( v ); }
878 short Read_Short (
bool bSwapBytes =
false) {
short v =
asShort (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
879 WORD
Read_Word (
bool bSwapBytes =
false) { WORD v =
asWord (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
880 int Read_Int (
bool bSwapBytes =
false) {
int v =
asInt (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
881 DWORD
Read_DWord (
bool bSwapBytes =
false) { DWORD v =
asDWord (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
882 float Read_Float (
bool bSwapBytes =
false) {
float v =
asFloat (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
883 double Read_Double (
bool bSwapBytes =
false) {
double v =
asDouble(m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
886 bool fromHexString (
const CSG_String &HexString);
891 int m_nBytes, m_nBuffer, m_Cursor;
896 bool _Inc_Array (
int nBytes);
918 int m_nBytes, m_nBuffer;
942 bool Destroy (
void) {
return( m_Stack.Set_Array(1) ); }
945 size_t Get_Size (
void)
const {
return( m_Stack.Get_uSize() - 1 ); }
947 bool Clear (
bool bFreeMemory =
false)
949 return( m_Stack.Set_Array(1, bFreeMemory) );
957 return( m_Stack.Get_Entry((
sLong)(i + 1)) );
962 return( m_Stack.Inc_Array() ? m_Stack.Get_Entry(m_Stack.Get_Size() - 1) : NULL );
967 if( m_Stack.Get_Size() > 1 )
969 memcpy(m_Stack.Get_Array(), m_Stack.Get_Entry(m_Stack.Get_Size() - 1), m_Stack.Get_Value_Size());
971 m_Stack.Dec_Array(
true);
973 return( m_Stack.Get_Array() );
979 void *
Get_Array (
void)
const {
return( m_Stack.Get_Entry(1) ); }
1018#define SG_DATATYPES_Undefined 0x0000
1019#define SG_DATATYPES_Bit 0x0001
1020#define SG_DATATYPES_Byte 0x0002
1021#define SG_DATATYPES_Char 0x0004
1022#define SG_DATATYPES_Word 0x0008
1023#define SG_DATATYPES_Short 0x0010
1024#define SG_DATATYPES_DWord 0x0020
1025#define SG_DATATYPES_Int 0x0040
1026#define SG_DATATYPES_ULong 0x0080
1027#define SG_DATATYPES_Long 0x0100
1028#define SG_DATATYPES_Float 0x0200
1029#define SG_DATATYPES_Double 0x0400
1030#define SG_DATATYPES_String 0x0800
1031#define SG_DATATYPES_Date 0x1000
1032#define SG_DATATYPES_Color 0x2000
1033#define SG_DATATYPES_Binary 0x4000
1034#define SG_DATATYPES_Standard 0xFFFF
1035#define SG_DATATYPES_SInteger (SG_DATATYPES_Char|SG_DATATYPES_Short|SG_DATATYPES_Int |SG_DATATYPES_Long)
1036#define SG_DATATYPES_UInteger (SG_DATATYPES_Byte|SG_DATATYPES_Word |SG_DATATYPES_DWord|SG_DATATYPES_ULong)
1037#define SG_DATATYPES_Integer (SG_DATATYPES_SInteger|SG_DATATYPES_UInteger)
1038#define SG_DATATYPES_Real (SG_DATATYPES_Float|SG_DATATYPES_Double)
1039#define SG_DATATYPES_Numeric (SG_DATATYPES_Integer|SG_DATATYPES_Real)
1040#define SG_DATATYPES_Table (SG_DATATYPES_String|SG_DATATYPES_Date|SG_DATATYPES_Color|SG_DATATYPES_Numeric|SG_DATATYPES_Binary)
1048 "SHORTINT_UNSIGNED",
1083 default :
return( 0 );
1138 virtual bool Close (
void);
1146 bool Set_Encoding (
int Encoding);
1152 bool is_EOF (
void)
const;
1154 sLong Length (
void)
const;
1157 bool Seek_Start (
void)
const;
1158 bool Seek_End (
void)
const;
1160 sLong Tell (
void)
const;
1164 int Printf (
const char *Format, ...);
1165 int Printf (
const wchar_t *Format, ...);
1167 size_t Read (
void *Buffer,
size_t Size,
size_t Count = 1)
const;
1168 size_t Write (
void *Buffer,
size_t Size,
size_t Count = 1)
const;
1169 size_t Read (
CSG_String &Buffer,
size_t Size)
const;
1170 size_t Write (
const CSG_String &Buffer)
const;
1174 int Read_Char (
void)
const;
1175 int Read_Int (
bool bBigEndian =
false)
const;
1176 bool Write_Int (
int Value,
bool bBigEndian =
false);
1177 double Read_Double (
bool bBigEndian =
false)
const;
1178 bool Write_Double (
double Value,
bool bBigEndian =
false);
1180 bool Scan (
int &Value)
const;
1181 bool Scan (
double &Value)
const;
1184 int Scan_Int (
void)
const;
1185 double Scan_Double (
void)
const;
1212 virtual bool Open (
const SG_Char *FileName,
int Mode,
bool bBinary,
int Encoding) {
return(
Open(FileName, Mode, Encoding) ); }
1214 virtual bool Close (
void);
1221 bool Add_Directory (
const SG_Char *Name);
1222 bool Add_File (
const SG_Char *Name,
bool bBinary =
true);
1225 bool Get_File (
const SG_Char *Name);
1226 bool Get_File (
size_t Index);
1227 virtual CSG_String Get_File_Name (
size_t Index);
1228 bool is_Directory (
size_t Index);
1230 bool Extract_All (
const SG_Char *toDirectory = NULL);
1231 bool Extract (
const SG_Char *File,
const SG_Char *toFile = NULL);
1259#define CSG_File_Zip CSG_Archive
1297#define SG_GET_RGB( r, g, b ) ((DWORD) (((BYTE)(r) | ((WORD)(g) << 8)) | (((DWORD)(BYTE)(b)) << 16)))
1298#define SG_GET_RGBA(r, g, b, a) ((DWORD) (((BYTE)(r) | ((WORD)(g) << 8)) | (((DWORD)(BYTE)(b)) << 16) | (((DWORD)(BYTE)(a)) << 24)))
1300#define SG_GET_R(rgb) ((BYTE) ((rgb) ))
1301#define SG_GET_G(rgb) ((BYTE) ((rgb) >> 8))
1302#define SG_GET_B(rgb) ((BYTE) ((rgb) >> 16))
1303#define SG_GET_A(rgb) ((BYTE) ((rgb) >> 24))
1306#define SG_COLOR_BLACK SG_GET_RGB( 0, 0, 0)
1307#define SG_COLOR_GREY SG_GET_RGB(128, 128, 128)
1308#define SG_COLOR_GREY_LIGHT SG_GET_RGB(192, 192, 192)
1309#define SG_COLOR_WHITE SG_GET_RGB(255, 255, 255)
1310#define SG_COLOR_RED SG_GET_RGB(255, 0, 0)
1311#define SG_COLOR_RED_DARK SG_GET_RGB(128, 0, 0)
1312#define SG_COLOR_YELLOW SG_GET_RGB(255, 255, 0)
1313#define SG_COLOR_YELLOW_DARK SG_GET_RGB(128, 128, 0)
1314#define SG_COLOR_GREEN SG_GET_RGB( 0, 255, 0)
1315#define SG_COLOR_GREEN_DARK SG_GET_RGB( 0, 128, 0)
1316#define SG_COLOR_GREEN_LIGHT SG_GET_RGB( 0, 255, 0)
1317#define SG_COLOR_BLUE SG_GET_RGB( 0, 0, 255)
1318#define SG_COLOR_BLUE_DARK SG_GET_RGB( 0, 0, 128)
1319#define SG_COLOR_BLUE_LIGHT SG_GET_RGB( 0, 255, 255)
1320#define SG_COLOR_BLUE_GREEN SG_GET_RGB( 0, 128, 128)
1321#define SG_COLOR_PURPLE SG_GET_RGB(128, 0, 128)
1322#define SG_COLOR_PINK SG_GET_RGB(255, 0, 255)
1323#define SG_COLOR_NONE -1
1324#define SG_COLOR_RANDOM -2
1424 bool Create (
const CSG_String &Palette,
int nColors = 0,
bool bRevert =
false);
1434 long & operator [] (
int Index) {
return( m_Colors[Index < 0 ? 0 : Index >= m_nColors ? m_nColors - 1 : Index] ); }
1436 bool Set_Color (
int Index,
long Color);
1437 bool Set_Color (
int Index,
int Red,
int Green,
int Blue);
1438 bool Set_Red (
int Index,
int Value);
1439 bool Set_Green (
int Index,
int Value);
1440 bool Set_Blue (
int Index,
int Value);
1441 bool Set_Brightness (
int Index,
int Value);
1443 long Get_Color (
int Index)
const {
return( m_nColors > 0 ? m_Colors[Index < 0 ? 0 : Index >= m_nColors ? m_nColors - 1 : Index] : 0 ); }
1451 if( m_nColors <= 0 )
return( 0 );
1452 if( Index <= 0. )
return( m_Colors[0] );
1453 if( Index >= m_nColors - 1. )
return( m_Colors[m_nColors - 1] );
1455 int i = (int)Index; Index -= i;
1463 static int Get_Predefined_Count(
void);
1464 static CSG_String Get_Predefined_Name (
int Index,
bool bWithIndex =
true);
1465 bool Set_Predefined (
int Index ,
bool bRevert =
false,
int nColors = 0);
1466 bool Set_Predefined (
const CSG_String &Name,
bool bRevert =
false,
int nColors = 0);
1469 bool Set_Default (
int nColors = 11);
1470 bool Set_Ramp (
long Color_A,
long Color_B);
1471 bool Set_Ramp (
long Color_A,
long Color_B,
int iColor_A,
int iColor_B);
1472 bool Set_Ramp_Brighness (
int Brightness_A,
int Brightness_B);
1473 bool Set_Ramp_Brighness (
int Brightness_A,
int Brightness_B,
int iColor_A,
int iColor_B);
1478 bool Greyscale (
void);
1484 bool Save (
const CSG_String &File_Name,
bool bBinary);
1486 bool Serialize (
CSG_File &Stream,
bool bSave,
bool bBinary);
1499 void _Set_Brightness (
double &a,
double &b,
double &c,
int Pass = 0);
1517 CSG_Translator (
const CSG_String &File_Name,
bool bSetExtension =
true,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1518 bool Create (
const CSG_String &File_Name,
bool bSetExtension =
true,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1520 CSG_Translator (
class CSG_Table *pTranslations,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1521 bool Create (
class CSG_Table *pTranslations,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1528 const SG_Char *
Get_Text (
int i)
const {
return( i >= 0 && i < m_nTranslations ? m_Translations[i]->m_Text :
SG_T(
"") ); }
1531 const SG_Char * Get_Translation (
const SG_Char *Text,
bool bReturnNullOnNotFound =
false)
const;
1537 class CSG_Translation
1543 m_Translation = Translation;
1546 CSG_String m_Text, m_Translation;
1554 int m_nTranslations;
1556 CSG_Translation **m_Translations;
1559 int _Get_Index (
const CSG_String &Text)
const;
1568#define _TL(s) SG_Translate(L ## s)
1569#define _TW(s) SG_Translate(CSG_String(s))
SAGA_API_DLL_EXPORT long SG_Color_Get_Random(void)
SAGA_API_DLL_EXPORT bool SG_Get_Environment(const CSG_String &Variable, CSG_String *Value=NULL)
SAGA_API_DLL_EXPORT bool SG_File_Exists(const CSG_String &FileName)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Colors_Get(class CSG_Data_Object *pDataObject, class CSG_Colors *pColors)
SAGA_API_DLL_EXPORT double SG_Mem_Get_Double(const char *Buffer, bool bSwapBytes)
SAGA_API_DLL_EXPORT void SG_UI_Console_Print_StdErr(const char *Text, SG_Char End='\n', bool bFlush=true)
SAGA_API_DLL_EXPORT void SG_Flip_Decimal_Separators(CSG_String &String)
SAGA_API_DLL_EXPORT CSG_String SG_Get_CurrentTimeStr(bool bWithDate=true)
SAGA_API_DLL_EXPORT void SG_UI_Console_Set_UTF8(bool bOn)
@ SG_ARRAY_GROWTH_FIX_256
@ SG_ARRAY_GROWTH_FIX_512
@ SG_ARRAY_GROWTH_FIX_1024
@ SG_ARRAY_GROWTH_FIX_128
SAGA_API_DLL_EXPORT bool SG_UI_Dlg_Continue(const CSG_String &Message, const CSG_String &Caption)
SAGA_API_DLL_EXPORT CSG_String SG_Double_To_Degree(double Value)
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_UI_DataObject_Params_Get(class CSG_Data_Object *pDataObject, class CSG_Parameters *pParameters)
@ SG_UI_MSG_STYLE_FAILURE
@ SG_UI_MSG_STYLE_SUCCESS
SAGA_API_DLL_EXPORT void SG_Mem_Set_Int(char *Buffer, int Value, bool bSwapBytes)
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Extension(const CSG_String &File, const CSG_String &Extension)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Add(class CSG_Data_Object *pDataObject, int Show)
SAGA_API_DLL_EXPORT int SG_OMP_Get_Thread_Num(void)
SAGA_API_DLL_EXPORT CSG_String SG_HTML_Tag_Replacer(const CSG_String &Text)
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_UI_Get_Window_Main(void)
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Okay(bool bOkay=true)
SAGA_API_DLL_EXPORT TSG_Data_Type SG_Data_Type_Get_Type(const CSG_String &Identifier)
SAGA_API_DLL_EXPORT bool SG_UI_Dlg_Parameters(class CSG_Parameters *pParameters, const CSG_String &Caption)
SAGA_API_DLL_EXPORT int SG_UI_Msg_Reset(void)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Show(class CSG_Data_Object *pDataObject, int Show)
SAGA_API_DLL_EXPORT CSG_String SG_Dir_Get_Temp(void)
SAGA_API_DLL_EXPORT bool SG_Color_From_Text(const CSG_String &Text, long &Color)
SAGA_API_DLL_EXPORT void * SG_Malloc(size_t size)
SAGA_API_DLL_EXPORT void SG_UI_Dlg_Message(const CSG_String &Message, const CSG_String &Caption)
SAGA_API_DLL_EXPORT void SG_UI_ProgressAndMsg_Lock(bool bOn)
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path_Absolute(const CSG_String &full_Path)
SAGA_API_DLL_EXPORT const SG_Char * SG_Translate(const CSG_String &Text)
SAGA_API_DLL_EXPORT bool SG_Dir_Create(const CSG_String &Directory, bool bFullPath=false)
SAGA_API_DLL_EXPORT bool SG_Dir_List_Files(CSG_Strings &List, const CSG_String &Directory, const CSG_String &Extension="", bool bRecursive=false)
SAGA_API_DLL_EXPORT void SG_Free(void *memblock)
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path(const CSG_String &full_Path)
SAGA_API_DLL_EXPORT CSG_String SG_Color_To_Text(long Color, bool bHexadecimal=true)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Classify(class CSG_Data_Object *pDataObject, const class CSG_MetaData &Options)
SAGA_API_DLL_EXPORT CSG_String SG_File_Make_Path(const CSG_String &Directory, const CSG_String &Name)
SAGA_API_DLL_EXPORT int SG_UI_Progress_Lock(bool bOn)
SAGA_API_DLL_EXPORT bool SG_UI_Process_Get_Okay(bool bBlink=false)
TSG_String_Tokenizer_Mode
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Path_Relative(const CSG_String &Directory, const CSG_String &full_Path)
SAGA_API_DLL_EXPORT bool SG_File_Delete(const CSG_String &FileName)
SAGA_API_DLL_EXPORT int SG_UI_Msg_Lock(bool bOn)
SAGA_API_DLL_EXPORT CSG_String SG_Data_Type_Get_Identifier(TSG_Data_Type Type)
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Progress(int Position, int Range)
@ SG_UI_WINDOW_ARRANGE_TDI_TILE_HOR
@ SG_UI_WINDOW_ARRANGE_MDI_TILE_VER
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_RIGHT
@ SG_UI_WINDOW_ARRANGE_MDI_TILE_HOR
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_BOTTOM
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_TOP
@ SG_UI_WINDOW_ARRANGE_TDI_TILE_VER
@ SG_UI_WINDOW_ARRANGE_MDI_CASCADE
@ SG_UI_WINDOW_ARRANGE_TDI_SPLIT_LEFT
SAGA_API_DLL_EXPORT TSG_PFNC_UI_Callback SG_Get_UI_Callback(void)
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Name(const CSG_String &full_Path, bool bExtension)
SAGA_API_DLL_EXPORT void * SG_Realloc(void *memblock, size_t size)
SAGA_API_DLL_EXPORT bool SG_UI_ODBC_Update(const CSG_String &Server)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Del(class CSG_Data_Object *pDataObject, bool bConfirm)
SAGA_API_DLL_EXPORT long SG_Color_From_RGB(int Red, int Green, int Blue, int Alpha=0)
SAGA_API_DLL_EXPORT void * SG_Calloc(size_t num, size_t size)
SAGA_API_DLL_EXPORT void SG_UI_Msg_Add_Error(const char *Message)
SAGA_API_DLL_EXPORT bool SG_Set_Environment(const CSG_String &Variable, const CSG_String &Value)
SAGA_API_DLL_EXPORT void SG_OMP_Set_Max_Num_Threads(int iCores)
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)
SAGA_API_DLL_EXPORT CSG_String SG_Colors_Get_Name(int Index)
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_DATAOBJECT_SHOW_MAP_LAST
@ SG_UI_DATAOBJECT_SHOW_MAP
@ SG_UI_DATAOBJECT_UPDATE
@ SG_UI_DATAOBJECT_SHOW_MAP_ACTIVE
@ SG_UI_DATAOBJECT_SHOW_MAP_NEW
SAGA_API_DLL_EXPORT bool SG_is_Character_Numeric(int Character)
SAGA_API_DLL_EXPORT CSG_Translator & SG_Get_Translator(void)
const char gSG_Data_Type_Identifier[][32]
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Update(class CSG_Data_Object *pDataObject, int Show, class CSG_Parameters *pParameters)
SAGA_API_DLL_EXPORT int SG_UI_Dlg_Error(const CSG_String &Message, const CSG_String &Caption)
SAGA_API_DLL_EXPORT CSG_String SG_UI_Get_API_Path(void)
SAGA_API_DLL_EXPORT bool SG_Dir_List_Subdirectories(CSG_Strings &List, const CSG_String &Directory, bool bRecursive=false)
SAGA_API_DLL_EXPORT bool SG_UI_Console_Get_UTF8(void)
SAGA_API_DLL_EXPORT void SG_UI_Process_Set_Text(const CSG_String &Text)
SAGA_API_DLL_EXPORT int SG_OMP_Get_Max_Num_Procs(void)
SAGA_API_DLL_EXPORT bool SG_Dir_Exists(const CSG_String &Directory)
SAGA_API_DLL_EXPORT bool SG_Data_Type_is_Numeric(TSG_Data_Type Type)
SAGA_API_DLL_EXPORT bool SG_UI_Set_Map_Extent(double xMin, double yMin, double xMax, double yMax, int Maps=SG_UI_MAP_ACTIVE)
SAGA_API_DLL_EXPORT void SG_Mem_Set_Double(char *Buffer, double Value, bool bSwapBytes)
SAGA_API_DLL_EXPORT bool SG_UI_Progress_is_Locked(void)
SAGA_API_DLL_EXPORT int SG_Mem_Get_Int(const char *Buffer, bool bSwapBytes)
#define SAGA_API_DLL_EXPORT
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Name_Temp(const CSG_String &Prefix)
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)
SAGA_API_DLL_EXPORT int SG_OMP_Get_Max_Num_Threads(void)
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Busy(bool bOn=true, const CSG_String &Message="")
SAGA_API_DLL_EXPORT CSG_String SG_UI_Get_Application_Name(void)
SAGA_API_DLL_EXPORT int SG_Data_Type_Get_Flag(TSG_Data_Type Type)
int(* TSG_PFNC_UI_Callback)(TSG_UI_Callback_ID ID, CSG_UI_Parameter &Param_1, CSG_UI_Parameter &Param_2)
SAGA_API_DLL_EXPORT CSG_String SG_Dir_Get_Current(void)
SAGA_API_DLL_EXPORT void SG_UI_Dlg_Info(const CSG_String &Message, const CSG_String &Caption)
SAGA_API_DLL_EXPORT double SG_Degree_To_Double(const CSG_String &String)
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)
SAGA_API_DLL_EXPORT bool SG_File_Set_Extension(CSG_String &File, const CSG_String &Extension)
SAGA_API_DLL_EXPORT bool SG_Data_Type_Range_Check(TSG_Data_Type Type, double &Value)
SAGA_API_DLL_EXPORT void SG_UI_Msg_Flush(void)
#define SG_DEFAULT_DELIMITERS
SAGA_API_DLL_EXPORT bool SG_Dir_Delete(const CSG_String &Directory, bool bRecursive=false)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_Params_Set(class CSG_Data_Object *pDataObject, class CSG_Parameters *pParameters)
#define SG_GET_RGB(r, g, b)
@ CALLBACK_GET_APP_WINDOW
@ CALLBACK_SET_MAP_EXTENT
@ CALLBACK_PROCESS_SET_PROGRESS
@ CALLBACK_STOP_EXECUTION
@ CALLBACK_WINDOW_ARRANGE
@ CALLBACK_MESSAGE_ADD_ERROR
@ CALLBACK_DATAOBJECT_UPDATE
@ CALLBACK_PROCESS_SET_TEXT
@ CALLBACK_DATAOBJECT_PARAMS_GET
@ CALLBACK_PROCESS_SET_BUSY
@ CALLBACK_DATAOBJECT_COLORS_GET
@ CALLBACK_DATAOBJECT_COLORS_SET
@ CALLBACK_DLG_PARAMETERS
@ CALLBACK_DATAOBJECT_ASIMAGE
@ CALLBACK_DATAOBJECT_PARAMS_SET
@ CALLBACK_DATABASE_UPDATE
@ CALLBACK_DATAOBJECT_ADD
@ CALLBACK_DATAOBJECT_SHOW
@ CALLBACK_DATAOBJECT_DEL
@ CALLBACK_PROCESS_SET_READY
@ CALLBACK_PROCESS_GET_OKAY
@ CALLBACK_PROCESS_SET_OKAY
@ CALLBACK_DATAOBJECT_CLASSIFY
@ CALLBACK_MESSAGE_ADD_EXECUTION
SAGA_API_DLL_EXPORT bool SG_File_Cmp_Path(const CSG_String &Path1, const CSG_String &Path2)
SAGA_API_DLL_EXPORT CSG_String operator+(const char *A, const CSG_String &B)
SAGA_API_DLL_EXPORT int SG_UI_Window_Arrange(int Arrange)
SAGA_API_DLL_EXPORT int SG_UI_Progress_Reset(void)
@ SG_FILE_ENCODING_UTF16LE
@ SG_FILE_ENCODING_UTF16BE
@ SG_FILE_ENCODING_UNDEFINED
@ SG_FILE_ENCODING_UTF32BE
@ SG_FILE_ENCODING_UTF32LE
SAGA_API_DLL_EXPORT int SG_Get_Significant_Decimals(double Value, int maxDecimals=6)
SAGA_API_DLL_EXPORT void SG_UI_ProgressAndMsg_Reset(void)
SAGA_API_DLL_EXPORT void SG_Swap_Bytes(void *Buffer, int nBytes)
SAGA_API_DLL_EXPORT CSG_String SG_UI_Set_Application_Name(const CSG_String &Name="")
SAGA_API_DLL_EXPORT bool SG_UI_Msg_is_Locked(void)
SAGA_API_DLL_EXPORT CSG_String SG_UI_Get_Application_Path(bool bPathOnly=false)
size_t SG_Data_Type_Get_Size(TSG_Data_Type Type)
SAGA_API_DLL_EXPORT bool SG_Set_UI_Callback(TSG_PFNC_UI_Callback Function)
SAGA_API_DLL_EXPORT bool SG_UI_Stop_Execution(bool bDialog)
SAGA_API_DLL_EXPORT CSG_String SG_File_Get_Extension(const CSG_String &File)
SAGA_API_DLL_EXPORT CSG_String SG_Get_String(double Value, int Precision=-99)
SAGA_API_DLL_EXPORT bool SG_Uninitialize_Environment(void)
SAGA_API_DLL_EXPORT CSG_String SG_Data_Type_Get_Name(TSG_Data_Type Type, bool bShort=false)
@ SG_COLORS_BLUE_YELLOW_RED
@ SG_COLORS_DEFAULT_BRIGHT
@ SG_COLORS_PRECIPITATION_1
@ SG_COLORS_PRECIPITATION_3
@ SG_COLORS_RED_GREY_BLUE
@ SG_COLORS_GREEN_WHITE_RED
@ SG_COLORS_RED_GREY_GREEN
@ SG_COLORS_GREEN_GREY_BLUE
@ SG_COLORS_RED_BLUE_GREEN
@ SG_COLORS_GREEN_YELLOW_RED
@ SG_COLORS_GREEN_GREY_RED
@ SG_COLORS_GREEN_WHITE_BLUE
@ SG_COLORS_RED_GREEN_BLUE
@ SG_COLORS_PRECIPITATION_4
@ SG_COLORS_RED_YELLOW_GREEN
@ SG_COLORS_GREEN_YELLOW_BLUE
@ SG_COLORS_BLUE_WHITE_RED
@ SG_COLORS_MAGENTA_WHITE
@ SG_COLORS_GREEN_RED_BLUE
@ SG_COLORS_BLUE_GREY_RED
@ SG_COLORS_PRECIPITATION_5
@ SG_COLORS_PRECIPITATION_2
SAGA_API_DLL_EXPORT bool SG_UI_Diagram_Show(class CSG_Table *pTable, class CSG_Parameters *pParameters)
SAGA_API_DLL_EXPORT bool SG_UI_Process_Set_Ready(void)
SAGA_API_DLL_EXPORT bool SG_UI_DataObject_asImage(class CSG_Data_Object *pDataObject, class CSG_Grid *pGrid)
virtual TSG_File_Type Get_File_Type(void) const
size_t Get_File_Count(void)
virtual bool Open(const SG_Char *FileName, int Mode=SG_FILE_R, int Encoding=SG_FILE_ENCODING_ANSI)
CSG_Array_Pointer m_Files
virtual bool Open(const SG_Char *FileName, int Mode, bool bBinary, int Encoding)
virtual const CSG_String & Get_Archive(void) const
bool Set_Growth(TSG_Array_Growth Growth)
bool Set_Array(sLong nValues, bool bShrink=true)
int * Get_Array(sLong nValues)
TSG_Array_Growth Get_Growth(void) const
size_t Get_uSize(void) const
CSG_Array_Int(sLong nValues=0, TSG_Array_Growth Growth=TSG_Array_Growth::SG_ARRAY_GROWTH_0)
sLong Get_Size(void) const
CSG_Array_Int(const CSG_Array_Int &Array)
int * Create(const CSG_Array_Int &Array)
int * Get_Array(void) const
int Get(sLong Index) const
bool Dec_Array(bool bShrink=true)
bool Set(sLong Index, int Value)
bool Inc_Array(sLong nValues=1)
bool Set_Array(sLong nValues, bool bShrink=true)
sLong Get_Size(void) const
void * Get(sLong Index) const
size_t Get_uSize(void) const
bool Set_Growth(TSG_Array_Growth Growth)
TSG_Array_Growth Get_Growth(void) const
void ** Get_Array(void) const
void ** Get_Array(sLong nValues)
bool Dec_Array(bool bShrink=true)
bool Set(sLong Index, void *Value)
void ** Create(const CSG_Array_Pointer &Array)
CSG_Array_Pointer(sLong nValues=0, TSG_Array_Growth Growth=TSG_Array_Growth::SG_ARRAY_GROWTH_0)
bool Inc_Array(sLong nValues=1)
CSG_Array_Pointer(const CSG_Array_Pointer &Array)
bool Set_Growth(TSG_Array_Growth Growth)
CSG_Array_sLong(const CSG_Array_sLong &Array)
sLong Get_Size(void) const
CSG_Array_sLong(sLong nValues=0, TSG_Array_Growth Growth=TSG_Array_Growth::SG_ARRAY_GROWTH_0)
bool Dec_Array(bool bShrink=true)
size_t Get_uSize(void) const
bool Set_Array(sLong nValues, bool bShrink=true)
sLong * Get_Array(sLong nValues)
sLong * Get_Array(void) const
sLong * Create(const CSG_Array_sLong &Array)
TSG_Array_Growth Get_Growth(void) const
bool Inc_Array(sLong nValues=1)
sLong Get(sLong Index) const
bool Set(sLong Index, sLong Value)
void * Create(const CSG_Array &Array)
bool Set_Array(sLong nValues, bool bShrink=true)
void * Get_Array(sLong nValues)
size_t Get_Value_Size(void) const
void * Get_Array(void) const
sLong Get_Size(void) const
size_t Get_uSize(void) const
TSG_Array_Growth Get_Growth(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(float Value, bool bBigEndian=false)
float asFloat(int Offset, bool bBigEndian=false) const
void Add_Value(char Value, bool bBigEndian=false)
bool Inc_Size(size_t Size)
void Set_Value(int Offset, short Value, bool bBigEndian=false)
int asInt(int Offset, bool bBigEndian=false) const
void Set_Value(int Offset, int Value, bool bBigEndian=false)
void Set_Value(int Offset, char Value, bool bBigEndian=false)
size_t Get_Size(void) const
bool Set_Size(size_t Size, bool bShrink=true)
void Add_Value(int Value, bool bBigEndian=false)
void Add_Value(double Value, bool bBigEndian=false)
short asShort(int Offset, bool bBigEndian=false) const
void Set_Value(int Offset, double Value, bool bBigEndian=false)
void Add_Value(short Value, bool bBigEndian=false)
void Set_Value(int Offset, float Value, bool bBigEndian=false)
char * Get_Data(int Offset=0) const
double asDouble(int Offset, bool bBigEndian=false) const
CSG_Bytes * Get_Bytes(int i)
int Get_Count(void) const
DWORD asDWord(int i, bool bSwapBytes=false) const
int Get_Count(void) const
DWORD Read_DWord(bool bSwapBytes=false)
bool Add(WORD Value, bool bSwapBytes=false)
bool Add(DWORD Value, bool bSwapBytes=false)
double Read_Double(bool bSwapBytes=false)
bool Add(double Value, bool bSwapBytes=false)
bool Add(short Value, bool bSwapBytes=false)
bool Add(float Value, bool bSwapBytes=false)
WORD Read_Word(bool bSwapBytes=false)
short asShort(int i, bool bSwapBytes=false) const
double asDouble(int i, bool bSwapBytes=false) const
WORD asWord(int i, bool bSwapBytes=false) const
int Read_Int(bool bSwapBytes=false)
bool Assign(const CSG_Bytes &Bytes)
BYTE * Get_Bytes(void) const
CSG_Bytes Get_Bytes(int i) const
short Read_Short(bool bSwapBytes=false)
float Read_Float(bool bSwapBytes=false)
bool Add(int Value, bool bSwapBytes=false)
BYTE Get_Byte(int i) const
float asFloat(int i, bool bSwapBytes=false) const
int asInt(int i, bool bSwapBytes=false) const
bool Add(const CSG_Bytes &Bytes)
bool Set_Palette(const CSG_String &Name, bool bRevert=false, int nColors=0)
long Get_Brightness(int Index) const
long Get_Blue(int Index) const
long Get_Color(int Index) const
bool Set_Count(int nColors)
long Get_Red(int Index) const
long Get_Green(int Index) const
bool Set_Palette(int Index, bool bRevert=false, int nColors=0)
int Get_Count(void) const
bool Set_Predefined(int Index, bool bRevert=false, int nColors=0)
long Get_Interpolated(double Index) const
virtual bool Open(const SG_Char *FileName, int Mode=SG_FILE_R, bool bBinary=true, int Encoding=SG_FILE_ENCODING_ANSI)
virtual CSG_String Get_File_Name(size_t Index)
virtual const CSG_String & Get_File_Name(void) const
class wxStreamBase * Get_Stream(void) const
bool is_Writing(void) const
bool is_Reading(void) const
int Get_Encoding(void) const
virtual TSG_File_Type Get_File_Type(void) const
void On_Construction(void)
size_t Get_Size(void) const
bool Clear(bool bFreeMemory=false)
void * Get_Record(size_t i) const
size_t Get_RecordSize(void) const
void * Get_Record_Pop(void)
void * Get_Array(void) const
void * Get_Record_Push(void)
CSG_Stack(size_t RecordSize)
size_t Get_Position(void) const
SG_Char Get_Last_Delimiter(void) const
size_t Get_Tokens_Count(void) const
CSG_String Get_Next_Token(void)
bool Has_More_Tokens(void) const
void Set_String(const CSG_String &String, const CSG_String &Delimiters=SG_DEFAULT_DELIMITERS, TSG_String_Tokenizer_Mode Mode=SG_TOKEN_DEFAULT)
CSG_String Get_String(void) const
CSG_String_Tokenizer(void)
size_t Length(void) const
const char * b_str(void) const
void Set_Char(size_t i, char Character)
SG_Char Get_Char(size_t i) const
const SG_Char * c_str(void) const
class wxString * m_pString
bool is_Empty(void) const
bool Create(const class wxString *pString)
const wchar_t * w_str(void) const
bool Add(const CSG_Strings &Strings)
CSG_Array_Pointer m_Strings
CSG_String & Get_String(int Index) const
CSG_String & Get_String(size_t Index) const
bool Set_Count(int Count)
bool Create(const CSG_Strings &Strings)
bool Assign(const CSG_Strings &Strings)
size_t Get_Size(void) const
int Get_Count(void) const
bool Ins(const CSG_String &String, int Index)
const SG_Char * Get_Translation(int i) const
bool Create(const CSG_String &File_Name, bool bSetExtension=true, int iText=0, int iTranslation=1, bool bCmpNoCase=false)
bool is_CaseSensitive(void) const
const SG_Char * Get_Text(int i) const
int Get_Count(void) const
CSG_UI_Parameter(const CSG_String &Value)
CSG_UI_Parameter(int Value)
CSG_UI_Parameter(void *Value)
CSG_UI_Parameter(double Value)
CSG_UI_Parameter(bool Value)
static CSG_String Uncompress(const CSG_String &File, const CSG_String &Target="")
static bool is_GZip_Supported(void)
static CSG_String Compress(const CSG_String &File, const CSG_String &Target="")