Richard Boegli's CnC_Generals_Zero_Hour Fork WIP
This is documentation of Richard Boegil's Zero Hour Fork
 
Loading...
Searching...
No Matches
olestring.h
Go to the documentation of this file.
1/*
2** Command & Conquer Generals Zero Hour(tm)
3** Copyright 2025 Electronic Arts Inc.
4**
5** This program is free software: you can redistribute it and/or modify
6** it under the terms of the GNU General Public License as published by
7** the Free Software Foundation, either version 3 of the License, or
8** (at your option) any later version.
9**
10** This program is distributed in the hope that it will be useful,
11** but WITHOUT ANY WARRANTY; without even the implied warranty of
12** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13** GNU General Public License for more details.
14**
15** You should have received a copy of the GNU General Public License
16** along with this program. If not, see <http://www.gnu.org/licenses/>.
17*/
18
19//
20// OLEString
21//
22
23#ifndef __OLESTRING_H
24#define __OLESTRING_H
25
26const unsigned int OLESTRING_DEFAULT_SIZE = 256;
27
29{
30
31 OLECHAR *ole;
32 char *sb;
33 unsigned int len;
34 int locked;
35
36 public:
37
38 OLEString ( void ) ;
39 ~OLEString ();
40 void Set ( OLECHAR *new_ole );
41 void Set ( char *new_sb );
42 OLECHAR*Get ( void ) { return ole; };
43 int Len ( void ) { return len; };
44 char* GetSB ( void ) { return sb; };
45 void StripSpaces ( void );
46 void FormatMetaString ( void );
47 void Lock ( void ) { locked = TRUE; };
48 void Unlock ( void ) { locked = FALSE; };
49};
50
51template <typename text> void StripSpaces ( text *string );
52template <typename text> void ConvertMetaChars ( text *string );
53template <typename text> void StripSpacesFromMetaString ( text *string );
54template <typename text> int SameFormat ( text *string1, text *string2 );
55template <typename text> void EncodeFormat ( text *string );
56template <typename text> void DecodeFormat ( text *string );
57template <typename text> int IsFormatTypeChar( text string1 );
58
59
60
61#endif // __OLESTRING_H
#define TRUE
Definition BaseType.h:109
#define FALSE
Definition BaseType.h:113
void Set(OLECHAR *new_ole)
Definition olestring.cpp:84
void Unlock(void)
Definition olestring.h:48
void FormatMetaString(void)
void StripSpaces(void)
void Lock(void)
Definition olestring.h:47
OLECHAR * Get(void)
Definition olestring.h:42
char * GetSB(void)
Definition olestring.h:44
int Len(void)
Definition olestring.h:43
OLEString(void)
Definition olestring.cpp:63
int IsFormatTypeChar(text string1)
Definition olestring.cpp:47
void EncodeFormat(text *string)
int SameFormat(text *string1, text *string2)
void StripSpacesFromMetaString(text *string)
void ConvertMetaChars(text *string)
void DecodeFormat(text *string)
void StripSpaces(text *string)
const unsigned int OLESTRING_DEFAULT_SIZE
Definition olestring.h:26