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);
599 const char * b_str (
void)
const;
600 const wchar_t * w_str (
void)
const;
601 const SG_Char * c_str (
void)
const;
603 operator const char * (void)
const {
return(
b_str() ); }
604 operator const wchar_t * (void)
const {
return(
w_str() ); }
611 CSG_String & Append (
char Character,
size_t nRepeat = 1);
612 CSG_String & Append (
wchar_t Character,
size_t nRepeat = 1);
615 void operator += (
const char *String);
616 void operator += (
const wchar_t *String);
617 void operator += (
char Character);
618 void operator += (
wchar_t Character);
627 int CmpNoCase (
const CSG_String &String)
const;
629 bool is_Same_As (
const CSG_String &String,
bool bCase =
true)
const;
630 bool is_Same_As (
const char Character,
bool bCase =
true)
const;
631 bool is_Same_As (
const wchar_t Character,
bool bCase =
true)
const;
638 static CSG_String Format (
const char *Format, ...);
639 static CSG_String Format (
const wchar_t *Format, ...);
640 int Printf (
const char *Format, ...);
641 int Printf (
const wchar_t *Format, ...);
644 size_t Replace_Single_Char (
const SG_Char Old,
const CSG_String &New,
bool bReplaceAll =
true);
645 size_t Replace_Single_Char (
const SG_Char Old,
const SG_Char New,
bool bReplaceAll =
true);
650 int Trim (
bool fromRight =
false);
651 int Trim_Both (
void);
653 int Find (
char Character,
bool fromEnd =
false)
const;
654 int Find (
wchar_t Character,
bool fromEnd =
false)
const;
656 bool Contains (
const CSG_String &String)
const;
659 CSG_String AfterFirst (
wchar_t Character)
const;
661 CSG_String AfterLast (
wchar_t Character)
const;
662 CSG_String BeforeFirst (
char Character)
const;
663 CSG_String BeforeFirst (
wchar_t Character)
const;
665 CSG_String BeforeLast (
wchar_t Character)
const;
668 CSG_String Mid (
size_t first,
size_t count = 0)
const;
671 bool is_Number (
void)
const;
673 int asInt (
void)
const;
674 bool asInt (
int &Value)
const;
675 sLong asLongLong (
void)
const;
676 bool asLongLong (
sLong &Value)
const;
678 double asDouble (
void)
const;
679 bool asDouble (
double &Value)
const;
683 size_t to_UTF8 (
char **pString)
const;
685 size_t to_MBChar (
char **pString,
int Encoding)
const;
687 bool to_ASCII (
char **pString,
char Replace =
'_')
const;
688 CSG_Buffer to_ASCII (
char Replace =
'_')
const;
689 std::string to_StdString (
void)
const;
690 std::wstring to_StdWstring (
void)
const;
718 bool Set_Count (
size_t Count);
725 bool Ins (
const CSG_String &String ,
size_t Index);
726 bool Del (
int Index) {
return(
Del((
size_t)Index) ); }
727 bool Del (
size_t Index);
739 bool Sort (
bool Ascending =
true);
752#define SG_DEFAULT_DELIMITERS " \t\r\n"
786 class wxStringTokenizer *m_pTokenizer;
837 static bool _Markdown_to_Html (
CSG_String &Line,
int Mode = 0);
839 static bool _Markdown_to_Html_Links (
CSG_String &Line);
861 CSG_Bytes (
const BYTE *Bytes,
int nBytes);
862 bool Create (
const BYTE *Bytes,
int nBytes);
870 bool is_EOF (
void) {
return( m_Cursor >= m_nBytes ); }
878 BYTE
Get_Byte (
int i)
const {
return( i >= 0 && i < m_nBytes ? m_Bytes[i] : 0 ); }
879 BYTE operator [] (
int i)
const {
return(
Get_Byte(i) ); }
887 bool Add (
void *Bytes,
int nBytes,
bool bSwapBytes);
889 bool Add (BYTE Value) {
return(
Add(&Value,
sizeof(Value),
false) ); }
891 bool Add (
char Value) {
return(
Add(&Value,
sizeof(Value),
false) ); }
893 bool Add (
short Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
895 bool Add (WORD Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
897 bool Add (
int Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
899 bool Add (DWORD Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
901 bool Add (
float Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
903 bool Add (
double Value,
bool bSwapBytes =
false) {
return(
Add(&Value,
sizeof(Value), bSwapBytes) ); }
904 CSG_Bytes & operator += (
double Value) {
Add(Value);
return( *
this ); }
908 short asShort (
int i,
bool bSwapBytes =
false)
const {
short v = *((
short *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
909 WORD
asWord (
int i,
bool bSwapBytes =
false)
const { WORD v = *((WORD *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
910 int asInt (
int i,
bool bSwapBytes =
false)
const {
int v = *((
int *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
911 DWORD
asDWord (
int i,
bool bSwapBytes =
false)
const { DWORD v = *((DWORD *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
912 float asFloat (
int i,
bool bSwapBytes =
false)
const {
float v = *((
float *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
913 double asDouble (
int i,
bool bSwapBytes =
false)
const {
double v = *((
double *)(m_Bytes + i));
if( bSwapBytes )
SG_Swap_Bytes(&v,
sizeof(v));
return( v ); }
915 BYTE
Read_Byte (
void) { BYTE v =
asByte (m_Cursor); m_Cursor +=
sizeof(v);
return( v ); }
916 char Read_Char (
void) {
char v =
asByte (m_Cursor); m_Cursor +=
sizeof(v);
return( v ); }
917 short Read_Short (
bool bSwapBytes =
false) {
short v =
asShort (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
918 WORD
Read_Word (
bool bSwapBytes =
false) { WORD v =
asWord (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
919 int Read_Int (
bool bSwapBytes =
false) {
int v =
asInt (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
920 DWORD
Read_DWord (
bool bSwapBytes =
false) { DWORD v =
asDWord (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
921 float Read_Float (
bool bSwapBytes =
false) {
float v =
asFloat (m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
922 double Read_Double (
bool bSwapBytes =
false) {
double v =
asDouble(m_Cursor, bSwapBytes); m_Cursor +=
sizeof(v);
return( v ); }
925 bool fromHexString (
const CSG_String &HexString);
930 int m_nBytes, m_nBuffer, m_Cursor;
935 bool _Inc_Array (
int nBytes);
957 int m_nBytes, m_nBuffer;
981 bool Destroy (
void) {
return( m_Stack.Set_Array(1) ); }
984 size_t Get_Size (
void)
const {
return( m_Stack.Get_uSize() - 1 ); }
986 bool Clear (
bool bFreeMemory =
false)
988 return( m_Stack.Set_Array(1, bFreeMemory) );
996 return( m_Stack.Get_Entry((
sLong)(i + 1)) );
1001 return( m_Stack.Inc_Array() ? m_Stack.Get_Entry(m_Stack.Get_Size() - 1) : NULL );
1006 if( m_Stack.Get_Size() > 1 )
1008 memcpy(m_Stack.Get_Array(), m_Stack.Get_Entry(m_Stack.Get_Size() - 1), m_Stack.Get_Value_Size());
1010 m_Stack.Dec_Array(
true);
1012 return( m_Stack.Get_Array() );
1018 void *
Get_Array (
void)
const {
return( m_Stack.Get_Entry(1) ); }
1057#define SG_DATATYPES_Undefined 0x0000
1058#define SG_DATATYPES_Bit 0x0001
1059#define SG_DATATYPES_Byte 0x0002
1060#define SG_DATATYPES_Char 0x0004
1061#define SG_DATATYPES_Word 0x0008
1062#define SG_DATATYPES_Short 0x0010
1063#define SG_DATATYPES_DWord 0x0020
1064#define SG_DATATYPES_Int 0x0040
1065#define SG_DATATYPES_ULong 0x0080
1066#define SG_DATATYPES_Long 0x0100
1067#define SG_DATATYPES_Float 0x0200
1068#define SG_DATATYPES_Double 0x0400
1069#define SG_DATATYPES_String 0x0800
1070#define SG_DATATYPES_Date 0x1000
1071#define SG_DATATYPES_Color 0x2000
1072#define SG_DATATYPES_Binary 0x4000
1073#define SG_DATATYPES_Standard 0xFFFF
1074#define SG_DATATYPES_SInteger (SG_DATATYPES_Char|SG_DATATYPES_Short|SG_DATATYPES_Int |SG_DATATYPES_Long)
1075#define SG_DATATYPES_UInteger (SG_DATATYPES_Byte|SG_DATATYPES_Word |SG_DATATYPES_DWord|SG_DATATYPES_ULong)
1076#define SG_DATATYPES_Integer (SG_DATATYPES_SInteger|SG_DATATYPES_UInteger)
1077#define SG_DATATYPES_Real (SG_DATATYPES_Float|SG_DATATYPES_Double)
1078#define SG_DATATYPES_Numeric (SG_DATATYPES_Integer|SG_DATATYPES_Real)
1079#define SG_DATATYPES_Table (SG_DATATYPES_String|SG_DATATYPES_Date|SG_DATATYPES_Color|SG_DATATYPES_Numeric|SG_DATATYPES_Binary)
1087 "SHORTINT_UNSIGNED",
1122 default :
return( 0 );
1177 virtual bool Close (
void);
1185 bool Set_Encoding (
int Encoding);
1191 bool is_EOF (
void)
const;
1196 bool Seek_Start (
void)
const;
1197 bool Seek_End (
void)
const;
1199 sLong Tell (
void)
const;
1203 int Printf (
const char *Format, ...);
1204 int Printf (
const wchar_t *Format, ...);
1206 size_t Read (
void *Buffer,
size_t Size,
size_t Count = 1)
const;
1207 size_t Write (
void *Buffer,
size_t Size,
size_t Count = 1)
const;
1208 size_t Read (
CSG_String &Buffer,
size_t Size)
const;
1210 size_t Write (
const CSG_String &Buffer)
const;
1214 int Read_Char (
void)
const;
1215 int Read_Int (
bool bBigEndian =
false)
const;
1216 bool Write_Int (
int Value,
bool bBigEndian =
false);
1217 double Read_Double (
bool bBigEndian =
false)
const;
1218 bool Write_Double (
double Value,
bool bBigEndian =
false);
1220 bool Scan (
int &Value)
const;
1221 bool Scan (
double &Value)
const;
1224 int Scan_Int (
void)
const;
1225 double Scan_Double (
void)
const;
1252 virtual bool Open (
const SG_Char *FileName,
int Mode,
bool bBinary,
int Encoding) {
return(
Open(FileName, Mode, Encoding) ); }
1254 virtual bool Close (
void);
1261 bool Add_Directory (
const SG_Char *Name);
1262 bool Add_File (
const SG_Char *Name,
bool bBinary =
true);
1265 bool Get_File (
const SG_Char *Name);
1266 bool Get_File (
size_t Index);
1267 virtual CSG_String Get_File_Name (
size_t Index);
1268 bool is_Directory (
size_t Index);
1270 bool Extract_All (
const SG_Char *toDirectory = NULL);
1271 bool Extract (
const SG_Char *File,
const SG_Char *toFile = NULL);
1299#define CSG_File_Zip CSG_Archive
1339#define SG_GET_RGB( r, g, b ) ((DWORD) (((BYTE)(r) | ((WORD)(g) << 8)) | (((DWORD)(BYTE)(b)) << 16)))
1340#define SG_GET_RGBA(r, g, b, a) ((DWORD) (((BYTE)(r) | ((WORD)(g) << 8)) | (((DWORD)(BYTE)(b)) << 16) | (((DWORD)(BYTE)(a)) << 24)))
1342#define SG_GET_R(rgb) ((BYTE) ((rgb) ))
1343#define SG_GET_G(rgb) ((BYTE) ((rgb) >> 8))
1344#define SG_GET_B(rgb) ((BYTE) ((rgb) >> 16))
1345#define SG_GET_A(rgb) ((BYTE) ((rgb) >> 24))
1348#define SG_COLOR_BLACK SG_GET_RGB( 0, 0, 0)
1349#define SG_COLOR_GREY SG_GET_RGB(128, 128, 128)
1350#define SG_COLOR_GREY_LIGHT SG_GET_RGB(192, 192, 192)
1351#define SG_COLOR_WHITE SG_GET_RGB(255, 255, 255)
1352#define SG_COLOR_RED SG_GET_RGB(255, 0, 0)
1353#define SG_COLOR_RED_DARK SG_GET_RGB(128, 0, 0)
1354#define SG_COLOR_YELLOW SG_GET_RGB(255, 255, 0)
1355#define SG_COLOR_YELLOW_DARK SG_GET_RGB(128, 128, 0)
1356#define SG_COLOR_GREEN SG_GET_RGB( 0, 255, 0)
1357#define SG_COLOR_GREEN_DARK SG_GET_RGB( 0, 128, 0)
1358#define SG_COLOR_GREEN_LIGHT SG_GET_RGB( 0, 255, 0)
1359#define SG_COLOR_BLUE SG_GET_RGB( 0, 0, 255)
1360#define SG_COLOR_BLUE_DARK SG_GET_RGB( 0, 0, 128)
1361#define SG_COLOR_BLUE_LIGHT SG_GET_RGB( 0, 255, 255)
1362#define SG_COLOR_BLUE_GREEN SG_GET_RGB( 0, 128, 128)
1363#define SG_COLOR_PURPLE SG_GET_RGB(128, 0, 128)
1364#define SG_COLOR_PINK SG_GET_RGB(255, 0, 255)
1365#define SG_COLOR_NONE -1
1366#define SG_COLOR_RANDOM -2
1466 bool Create (
const CSG_String &Palette,
int nColors = 0,
bool bRevert =
false);
1476 long & operator [] (
int Index) {
return( m_Colors[Index < 0 ? 0 : Index >= m_nColors ? m_nColors - 1 : Index] ); }
1478 bool Set_Color (
int Index,
long Color);
1479 bool Set_Color (
int Index,
int Red,
int Green,
int Blue);
1480 bool Set_Red (
int Index,
int Value);
1481 bool Set_Green (
int Index,
int Value);
1482 bool Set_Blue (
int Index,
int Value);
1483 bool Set_Brightness (
int Index,
int Value);
1485 long Get_Color (
int Index)
const {
return( m_nColors > 0 ? m_Colors[Index < 0 ? 0 : Index >= m_nColors ? m_nColors - 1 : Index] : 0 ); }
1493 if( m_nColors <= 0 )
return( 0 );
1494 if( Index <= 0. )
return( m_Colors[0] );
1495 if( Index >= m_nColors - 1. )
return( m_Colors[m_nColors - 1] );
1497 int i = (int)Index; Index -= i;
1505 static int Get_Predefined_Count(
void);
1506 static CSG_String Get_Predefined_Name (
int Index,
bool bWithIndex =
true);
1507 bool Set_Predefined (
int Index ,
bool bRevert =
false,
int nColors = 0);
1508 bool Set_Predefined (
const CSG_String &Name,
bool bRevert =
false,
int nColors = 0);
1511 bool Set_Default (
int nColors = 11);
1512 bool Set_Ramp (
long Color_A,
long Color_B);
1513 bool Set_Ramp (
long Color_A,
long Color_B,
int iColor_A,
int iColor_B);
1514 bool Set_Ramp_Brighness (
int Brightness_A,
int Brightness_B);
1515 bool Set_Ramp_Brighness (
int Brightness_A,
int Brightness_B,
int iColor_A,
int iColor_B);
1520 bool Greyscale (
void);
1526 bool Save (
const CSG_String &File_Name,
bool bBinary);
1528 bool Serialize (
CSG_File &Stream,
bool bSave,
bool bBinary);
1541 void _Set_Brightness (
double &a,
double &b,
double &c,
int Pass = 0);
1559 CSG_Translator (
const CSG_String &File_Name,
bool bSetExtension =
true,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1560 bool Create (
const CSG_String &File_Name,
bool bSetExtension =
true,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1562 CSG_Translator (
class CSG_Table *pTranslations,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1563 bool Create (
class CSG_Table *pTranslations,
int iText = 0,
int iTranslation = 1,
bool bCmpNoCase =
false);
1570 const SG_Char *
Get_Text (
int i)
const {
return( i >= 0 && i < m_nTranslations ? m_Translations[i]->m_Text :
SG_T(
"") ); }
1573 const SG_Char * Get_Translation (
const SG_Char *Text,
bool bReturnNullOnNotFound =
false)
const;
1579 class CSG_Translation
1585 m_Translation = Translation;
1588 CSG_String m_Text, m_Translation;
1596 int m_nTranslations;
1598 CSG_Translation **m_Translations;
1601 int _Get_Index (
const CSG_String &Text)
const;
1610#define _TL(s) SG_Translate(L ## s)
1611#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 CSG_String SG_File_Get_Path_Absolute(const CSG_String &full_Path, const CSG_String &CWD="")
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 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_File_Copy(const CSG_String &Source, const CSG_String &Target, bool bOverwrite=true)
SAGA_API_DLL_EXPORT bool SG_Dir_Set_Temp(const CSG_String &Directory, bool bCreate=false)
Set the directory path returned by SG_Dir_Get_Temp(). Defaults to the user's temporary directory....
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)
const char * b_str(void) const
void Set_Char(size_t i, char Character)
SG_Char Get_Char(size_t i) const
class wxString * m_pString
bool is_Empty(void) const
class wxString & wx_str(void)
const class wxString & wx_str(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)
static CSG_String Html_Absolute_Image_Paths(const CSG_String &Text, const CSG_String &Path, bool bAltAsText=false)
static CSG_String Markdown_to_Html(const CSG_String &Text, bool bSimple=true)
static CSG_String Html_to_Markdown(const CSG_String &Text)
static CSG_String Html_to_SimpleText(const CSG_String &Text)
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="")