File: TAMSCharEngine.h

package info (click to toggle)
gtamsanalyzer.app 0.42-6
  • links: PTS
  • area: main
  • in suites: squeeze, wheezy
  • size: 6,112 kB
  • ctags: 866
  • sloc: objc: 34,338; ansic: 8,762; cpp: 384; makefile: 59; sh: 47
file content (146 lines) | stat: -rwxr-xr-x 3,688 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
//
//  TAMSCharEngine.h
//  TamsAnalyzer
//
//  Created by matthew on Sun Nov 17 2002.
//  Copyright (c) 2002 __MyCompanyName__. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "ctQChar.h"
#import "coderec.h"
#import "tams.h"
#import "utils.h"
#import "MyDocument.h"
#import "ctLimitCrit.h"
#import "MWFile.h"
#define STARTLIM 1
#define ENDLIM  2
#define INLIM  3
#define OUTLIM 4
#define SCANCODE 1



@interface TAMSCharEngine : NSObject {
    NSString *gTheData;
    MWFile *hotSearchDocument;
    NSMutableArray *gFileSearchList;
    NSEnumerator *searchEnum;
    unsigned  dsLen;
    long newlinecnt;
    id gCurrentDataSource;
    id deadDataSource;
    BOOL eofFlag;
    //for unlimited
     NSMutableArray *ctRunVault;

    //for ctlimitfunc
    NSMutableArray *ctZoneVault;
    //for section runs
    NSMutableArray *tagVault;
    int inLimFlag ;
    int singleLimFlag;
    int escFlag;
    NSMutableString *ctLimString;
    NSMutableArray *ctLimitVault;
    NSScanner *currScan;
    int scanMode;
    BOOL scanEndFlag;
    BOOL scanVeryEndFlag;
    id gCurrentTAMS;
    int noParFlag, allowTabFlag;
    //for line numbers
    unsigned cln;
    NSMutableString *clnBuff;
    BOOL clnMode;
    BOOL hasLineNumbers;

}
-(id) initWithArrayAndStart: (id) who;
-(id) initWithString: (id) who;

#ifdef SCANCODE
-(int) scanNext: (ctQChar *) qc;
#endif

-(id) initWithFile: (id) who;
-(id) initWithFileAndStart: (id) who;
-(id) initWithStringAndStart: (id) who;
-(int) readQChar: (ctQChar *) qc atIndex: (int) where;
-(MWCHAR) readCharAtIndex: (unsigned) where;
-(int) readnext: (ctQChar *) qc;
-(void) resetDataStream;
-(NSArray *)hotFileList;
-(BOOL) getEOF;
-(BOOL) hasLineNumbers;
#ifdef SECTIONSEARCH
-(coderec *) ctOpenSectionRun;
-(void) ctCloseSectionRun;

-(void) ctCloseSectionTagForCode: (NSString *) mycode Coder: (NSString *) mycoder;
-(BOOL) hasSectionRun;
-(int) checkAnd:  (NSArray *) andGrp forSection: (NSMutableArray *) sCodes;
-(void) filterSectionRuns;
-(int) isCurrSectionCode:(ctLimitCrit *)elem forSectionArray: (NSMutableArray *) who;
-(void) ctAddSectionTag: (NSMutableDictionary *) md;
-(coderec *) hotSectionRun;

#endif

-(void) addArrayToSearchList: (NSArray *) who;

-(void) initSearchListSystem;
-(void) addFileToSearchList: (MWFile *)who;
-(void) clearSearchList;
-(void) startSearch;
-(void) resetDataStream;
-(NSString *) gTheData;
-(void) setGTheData: (NSString *) dd;
-(MWFile *) hotSearchDocument;
-(void) setCharLocation: (int) loc;
-(int) getCharLocation;
-(void) setGCurrentDataSource: (id) theSource;
-(id) gCurrentDataSource;
-(void) setNoPar:(int) value;
-(void) setAllowTab: (int) value;
-(void) setEscFlag: (BOOL) value;

/* for unlimited */
-(void) ctInitRV;
-(void) ctAddOpenChar:(ctQChar *) qq;
-(void) ctOpenRun:(ctQChar *) qq;
-(void) ctCloseRun: (ctQChar *) qq;
-(void) ctCloseAllOpenRuns;
-(int) israw;
-(int) isrepeat: (ctQChar *) qq;
-(NSMutableArray*) ctRunVault;

/* from limitfunc */
-(void) setGCurrentTAMS: (id) who;
-(id) gCurrentTAMS;
-(NSMutableArray *) ctZoneVault;
-(int) isStringTrue: (ctLimitCrit *)elem withCode: (NSString *)code withCoder: (NSString *)coder;
-(void) zeroRuns;
-(void) checkZones;
-(void) handlelimit:(NSString *)buff;
-(int) isinlimit
;
-(void) ctAddZone: (ctQChar *)who
;
-(void) ctAddLimChar: (ctQChar *) qq
;
-(void) ctOpenLimRun: (ctQChar *) qq
;
-(void) ctCloseLimRun: (ctQChar *) qq
;
-(void) ctDelZone: (ctQChar *)who;
-(int) handleLimChar: (ctQChar *) qq;
-(void) initLimit;
-(int) isCurrTrue: (ctLimitCrit *)elem;
-(int) isTagTrue: (ctQChar *)s;
-(void) handlelimit: (NSString *)buff;
-(void) ctDelAllZones;
-(int) scanNext: (ctQChar *) qc withWarnings: (BOOL) warn;

@end