]> Dogcows Code - chaz/thecheat/blob - Conversions.h
update contact information and project URL
[chaz/thecheat] / Conversions.h
1
2 /*
3 * The Cheat - The legendary universal game trainer for Mac OS X.
4 * http://www.brokenzipper.com/trac/wiki/TheCheat
5 *
6 * Copyright (c) 2003-2011, Charles McGarvey et al.
7 *
8 * Distributable under the terms and conditions of the 2-clause BSD
9 * license; see the file COPYING for the legal text of the license.
10 */
11
12 #import <Cocoa/Cocoa.h>
13
14 #import "Variable.h"
15
16 #ifndef _Conversions_h_
17 #define _Conversions_h_
18
19
20 #pragma mark Prototypes
21
22 /* STRING -> VALUE */
23 // return YES for a successful conversion
24 BOOL StringToInt64( NSString *string, SInt64 *value );
25 BOOL StringToInt32( NSString *string, SInt32 *value );
26 BOOL StringToInt16( NSString *string, SInt16 *value );
27 BOOL StringToInt8( NSString *string, SInt8 *value );
28
29 BOOL StringToUInt64( NSString *string, UInt64 *value );
30 BOOL StringToUInt32( NSString *string, UInt32 *value );
31 BOOL StringToUInt16( NSString *string, UInt16 *value );
32 BOOL StringToUInt8( NSString *string, UInt8 *value );
33
34 // general case:
35 BOOL StringToValue( NSString *string, void *value, TCVariableType type );
36
37 /* VALUE -> STRING */
38 NSString *Int64ToString( SInt64 value );
39 NSString *Int32ToString( SInt32 value );
40 NSString *Int16ToString( SInt16 value );
41 NSString *Int8ToString( SInt8 value );
42
43 NSString *UInt64ToString( UInt64 value );
44 NSString *UInt32ToString( UInt32 value );
45 NSString *UInt16ToString( UInt16 value );
46 NSString *UInt8ToString( UInt8 value );
47
48 // general case:
49 NSString *ValueToString( void *value, TCVariableType type );
50
51
52 #endif /* _Conversions_h_ */
This page took 0.03317 seconds and 4 git commands to generate.