~ubuntu-branches/ubuntu/karmic/gnustep-base/karmic

« back to all changes in this revision

Viewing changes to Headers/Foundation/NSScanner.h

  • Committer: Bazaar Package Importer
  • Author(s): Eric Heintzmann
  • Date: 2005-04-17 00:14:38 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050417001438-enf0y07c9tku85z1
Tags: 1.10.3-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Definitions for NSScanner class
 
2
   Copyright (C) 1996,1999 Free Software Foundation, Inc.
 
3
 
 
4
   Author:  Eric Norum <eric@skatter.usask.ca>
 
5
   Created: 1996
 
6
   
 
7
   This file is part of the GNUstep Objective-C Library.
 
8
 
 
9
   This library is free software; you can redistribute it and/or
 
10
   modify it under the terms of the GNU Library General Public
 
11
   License as published by the Free Software Foundation; either
 
12
   version 2 of the License, or (at your option) any later version.
 
13
   
 
14
   This library is distributed in the hope that it will be useful,
 
15
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
17
   Library General Public License for more details.
 
18
 
 
19
   You should have received a copy of the GNU Library General Public
 
20
   License along with this library; if not, write to the Free
 
21
   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA.
 
22
*/ 
 
23
 
 
24
#ifndef __NSScanner_h_GNUSTEP_INCLUDE
 
25
#define __NSScanner_h_GNUSTEP_INCLUDE
 
26
 
 
27
#include <Foundation/NSDecimal.h>
 
28
#include <Foundation/NSDictionary.h>
 
29
#include <Foundation/NSCharacterSet.h>
 
30
 
 
31
/*
 
32
 * NSScanner class
 
33
 */
 
34
@interface NSScanner : NSObject <NSCopying>
 
35
{
 
36
@private
 
37
  NSString              *_string;
 
38
  NSCharacterSet        *_charactersToBeSkipped;
 
39
  BOOL                  (*_skipImp)(NSCharacterSet*, SEL, unichar);
 
40
  NSDictionary          *_locale;
 
41
  unsigned int          _scanLocation;
 
42
  unichar               _decimal;
 
43
  BOOL                  _caseSensitive;
 
44
  BOOL                  _isUnicode;
 
45
}
 
46
 
 
47
/*
 
48
 * Creating an NSScanner
 
49
 */
 
50
+ (id) localizedScannerWithString: (NSString*)aString;
 
51
+ (id) scannerWithString: (NSString*)aString;
 
52
- (id) initWithString: (NSString*)aString;
 
53
 
 
54
/*
 
55
 * Getting an NSScanner's string
 
56
 */
 
57
- (NSString*) string;
 
58
 
 
59
/*
 
60
 * Configuring an NSScanner
 
61
 */
 
62
- (unsigned) scanLocation;
 
63
- (void) setScanLocation: (unsigned int)anIndex;
 
64
 
 
65
- (BOOL) caseSensitive;
 
66
- (void) setCaseSensitive: (BOOL)flag;
 
67
 
 
68
- (NSCharacterSet*) charactersToBeSkipped;
 
69
- (void) setCharactersToBeSkipped: (NSCharacterSet *)aSet;
 
70
 
 
71
- (NSDictionary*)locale;
 
72
- (void)setLocale:(NSDictionary*)localeDictionary;
 
73
 
 
74
/*
 
75
 * Scanning a string
 
76
 */
 
77
- (BOOL) scanInt: (int*)value;
 
78
- (BOOL) scanHexInt: (unsigned int*)value;
 
79
- (BOOL) scanLongLong: (long long*)value;
 
80
- (BOOL) scanFloat: (float*)value;
 
81
- (BOOL) scanDouble: (double*)value;
 
82
- (BOOL) scanString: (NSString*)string intoString: (NSString**)value;
 
83
- (BOOL) scanCharactersFromSet: (NSCharacterSet*)aSet
 
84
                    intoString: (NSString**)value;
 
85
- (BOOL) scanUpToString: (NSString*)string intoString: (NSString**)value;
 
86
- (BOOL) scanUpToCharactersFromSet: (NSCharacterSet*)aSet 
 
87
                        intoString: (NSString**)value;
 
88
- (BOOL) isAtEnd;
 
89
 
 
90
#ifndef NO_GNUSTEP
 
91
- (BOOL) scanRadixUnsignedInt: (unsigned int*)value;
 
92
#endif
 
93
#ifndef STRICT_OPENSTEP
 
94
- (BOOL) scanDecimal: (NSDecimal*)value;
 
95
#endif
 
96
@end
 
97
 
 
98
#endif /* __NSScanner_h_GNUSTEP_INCLUDE */