]> Dogcows Code - chaz/thecheat/blob - Conversions.h
The Cheat 1.2.3
[chaz/thecheat] / Conversions.h
1
2 // **********************************************************************
3 // The Cheat - A universal game cheater for Mac OS X
4 // (C) 2003-2004 Chaz McGarvey (BrokenZipper)
5 //
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; either version 1, or (at your option)
9 // any later version.
10 //
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19 //
20
21 #import <Cocoa/Cocoa.h>
22
23 #import "Variable.h"
24
25 #ifndef _Conversions_h_
26 #define _Conversions_h_
27
28
29 #pragma mark Prototypes
30
31 /* STRING -> VALUE */
32 // return YES for a successful conversion
33 BOOL StringToInt64( NSString *string, SInt64 *value );
34 BOOL StringToInt32( NSString *string, SInt32 *value );
35 BOOL StringToInt16( NSString *string, SInt16 *value );
36 BOOL StringToInt8( NSString *string, SInt8 *value );
37
38 BOOL StringToUInt64( NSString *string, UInt64 *value );
39 BOOL StringToUInt32( NSString *string, UInt32 *value );
40 BOOL StringToUInt16( NSString *string, UInt16 *value );
41 BOOL StringToUInt8( NSString *string, UInt8 *value );
42
43 // general case:
44 BOOL StringToValue( NSString *string, void *value, TCVariableType type );
45
46 /* VALUE -> STRING */
47 NSString *Int64ToString( SInt64 value );
48 NSString *Int32ToString( SInt32 value );
49 NSString *Int16ToString( SInt16 value );
50 NSString *Int8ToString( SInt8 value );
51
52 NSString *UInt64ToString( UInt64 value );
53 NSString *UInt32ToString( UInt32 value );
54 NSString *UInt16ToString( UInt16 value );
55 NSString *UInt8ToString( UInt8 value );
56
57 // general case:
58 NSString *ValueToString( void *value, TCVariableType type );
59
60
61 #endif /* _Conversions_h_ */
This page took 0.031005 seconds and 4 git commands to generate.