File: ScriptSymbol.3cc

package info (click to toggle)
libccscript 2.5.9-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,896 kB
  • ctags: 683
  • sloc: cpp: 9,452; sh: 8,190; makefile: 186; ansic: 8
file content (455 lines) | stat: -rw-r--r-- 10,131 bytes parent folder | download | duplicates (2)
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
.TH "ScriptSymbol" 3 "26 Oct 2004" "ccScript" \" -*- nroff -*-
.ad l
.nh
.SH NAME
ScriptSymbol \- This class manages symbol tables for the scripting engine. Symbol table management for scripting engine. 
.SH SYNOPSIS
.br
.PP
\fC#include <script.h>\fP
.PP
Inherits Script.
.PP
Inherited by \fBScriptInterp\fP.
.PP
.SS "Public Methods"

.in +1c
.ti -1c
.RI "virtual Symbol * \fBgetEntry\fP (const char *symbol, int size=0)"
.br
.RI "\fIFetch a symbol entry.\fP"
.ti -1c
.RI "void \fBsetExclusive\fP (bool enable)"
.br
.RI "\fICan be used to tie together an exclusive function...\fP"
.ti -1c
.RI "virtual void \fBcommit\fP (Symbol *sym)"
.br
.RI "\fIA virtual method used when 'committing' symbol changes.\fP"
.ti -1c
.RI "Symbol * \fBgetTrigger\fP (void)"
.br
.RI "\fIFetch a pending trigger value and clear it.\fP"
.ti -1c
.RI "int \fBgetSymbolSize\fP (void)"
.br
.RI "\fIFetch default symbol size.\fP"
.ti -1c
.RI "\fBScriptSymbol\fP (int size, int pgsize=1024)"
.br
.ti -1c
.RI "\fB~ScriptSymbol\fP ()"
.br
.ti -1c
.RI "void * \fBgetPointer\fP (const char *symbol)"
.br
.RI "\fIFetch an embedded pointer held in a symbol identifier.\fP"
.ti -1c
.RI "bool \fBsetPointer\fP (const char *symbol, void *data)"
.br
.RI "\fISet an embedded pointer object as a symbol.\fP"
.ti -1c
.RI "char * \fBgetSymbol\fP (const char *symbol)"
.br
.RI "\fIFetch the address of the value of a given symbol identifier.\fP"
.ti -1c
.RI "char * \fBsetSymbol\fP (const char *symbol, const char *value='')"
.br
.RI "\fISet a given symbol to a new value.\fP"
.ti -1c
.RI "char * \fBsetConst\fP (const char *symbol, const char *value='')"
.br
.RI "\fISet a constant value.\fP"
.ti -1c
.RI "bool \fBmakeSequence\fP (const char *id, unsigned char count, unsigned char recsize)"
.br
.RI "\fICreate a sequence object (looping fifo).\fP"
.ti -1c
.RI "bool \fBmakeCache\fP (const char *id, unsigned char count, unsigned char recsize)"
.br
.ti -1c
.RI "bool \fBmakeStack\fP (const char *id, unsigned char count, unsigned char recsize)"
.br
.RI "\fICreate a stack object.\fP"
.ti -1c
.RI "bool \fBmakeFifo\fP (const char *id, unsigned char count, unsigned char recsize)"
.br
.RI "\fICreate a fifo object.\fP"
.ti -1c
.RI "bool \fBmakeCounter\fP (const char *id)"
.br
.RI "\fICreate an automatic counter object.\fP"
.ti -1c
.RI "bool \fBpostSymbol\fP (Symbol *sym, const char *value)"
.br
.RI "\fIPost data into a fifo.\fP"
.ti -1c
.RI "bool \fBremoveSymbol\fP (Symbol *sym, const char *value)"
.br
.RI "\fIRemove entry from a queue.\fP"
.ti -1c
.RI "char * \fBreadSymbol\fP (Symbol *sym)"
.br
.RI "\fIRead symbol handles special symbol types.\fP"
.ti -1c
.RI "bool \fBsetAlias\fP (const char *symbol, const char *source)"
.br
.RI "\fISet an alias.\fP"
.ti -1c
.RI "bool \fBswapSymbol\fP (const char *oldname, const char *newname)"
.br
.RI "\fISwap an existing symbol, relinks table sets.\fP"
.ti -1c
.RI "Symbol * \fBgetAlias\fP (const char *symbol)"
.br
.RI "\fIGet an alias.\fP"
.ti -1c
.RI "char * \fBsetSymbol\fP (const char *symbol, int size=0)"
.br
.RI "\fICreate a new symbol entry of a specified size.\fP"
.ti -1c
.RI "void \fBclrSymbol\fP (const char *id)"
.br
.RI "\fIClear a symbol definition.\fP"
.ti -1c
.RI "void \fBpurge\fP (void)"
.br
.RI "\fIPurge user defined symbols and memory space.\fP"
.ti -1c
.RI "unsigned \fBgather\fP (Symbol **index, unsigned max, const char *prefrix, const char *suffix='')"
.br
.RI "\fIGather a listing of common script symbols.\fP"
.in -1c
.SS "Protected Methods"

.in +1c
.ti -1c
.RI "bool \fBsetArray\fP (const char *sym, const char *source)"
.br
.in -1c
.SS "Friends"

.in +1c
.ti -1c
.RI "class \fBScriptInterp\fP"
.br
.in -1c
.SH "DETAILED DESCRIPTION"
.PP 
This class manages symbol tables for the scripting engine. Symbol table management for scripting engine.
.PP
A symbol is a variable with a reserved memory space. Some derived systems, like Bayonne IVR, may make use of a channel specific and global symbol tables.
.PP
\fBAuthor: \fP
.in +1c
David Sugar <dyfet@ostel.com> 
.PP
.SH "MEMBER FUNCTION DOCUMENTATION"
.PP 
.SS "void ScriptSymbol::clrSymbol (const char * id)"
.PP
Clear a symbol definition.
.PP
This does not remove the entry if it already exists. It mearly clears the initial flag so it still can appear undefined.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to clear. 
.SS "virtual void ScriptSymbol::commit (Symbol * sym)\fC [virtual]\fP"
.PP
A virtual method used when 'committing' symbol changes.
.PP
Normally this is a non-operation, but when system specific dialects are created, special symbols that must be converted from strings into other kinds of internal data types, or that might perform operations can be represented with the commit.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
to commit. 
.SS "Symbol* ScriptSymbol::getAlias (const char * symbol)"
.PP
Get an alias.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to find. 
.PP
\fBReturns: \fP
.in +1c
script symbol object or NULL. 
.SS "virtual Symbol* ScriptSymbol::getEntry (const char * symbol, int size = 0)\fC [virtual]\fP"
.PP
Fetch a symbol entry.
.PP
Normally this is presumed to be from the native symbol table. However, the use of a virtual allows one to derive special 'system' symbols as needed for Bayonne dialects, as well as specify special attributes and properties for system symbols. For example, in the Bayonne IVR, symbols might be used to retrieve the current DTMF digit buffer and count, but these are stored as and manipulated in a channel structure rather than in 'symbol space'.
.PP
\fBReturns: \fP
.in +1c
symbol entry or NULL if not found. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to find or create. 
.TP
\fB\fIsize\fP\fP
of symbol space to create if not found. 
.SS "void* ScriptSymbol::getPointer (const char * symbol)"
.PP
Fetch an embedded pointer held in a symbol identifier.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name. 
.PP
\fBReturns: \fP
.in +1c
pointer held in symbol or NULL. 
.SS "char* ScriptSymbol::getSymbol (const char * symbol)"
.PP
Fetch the address of the value of a given symbol identifier.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name. 
.PP
\fBReturns: \fP
.in +1c
symbol buffer address, or NULL if not found. 
.SS "int ScriptSymbol::getSymbolSize (void)\fC [inline]\fP"
.PP
Fetch default symbol size.
.PP
\fBReturns: \fP
.in +1c
default symbol size. 
.SS "Symbol* ScriptSymbol::getTrigger (void)"
.PP
Fetch a pending trigger value and clear it.
.PP
\fBReturns: \fP
.in +1c
symbol trigger that is active. 
.SS "bool ScriptSymbol::makeCounter (const char * id)"
.PP
Create an automatic counter object.
.PP
\fBReturns: \fP
.in +1c
false if fail. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIname\fP\fP
of counter. 
.SS "bool ScriptSymbol::makeFifo (const char * id, unsigned char count, unsigned char recsize)"
.PP
Create a fifo object.
.PP
\fBReturns: \fP
.in +1c
false if fail. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIname\fP\fP
of fifo. 
.TP
\fB\fInumber\fP\fP
of records. 
.TP
\fB\fIsize\fP\fP
of record. 
.SS "bool ScriptSymbol::makeSequence (const char * id, unsigned char count, unsigned char recsize)"
.PP
Create a sequence object (looping fifo).
.PP
\fBReturns: \fP
.in +1c
false if fail. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIname\fP\fP
of sequence. 
.TP
\fB\fImax.\fP\fP
number of sequences. 
.TP
\fB\fIsize\fP\fP
of sequence data record. 
.SS "bool ScriptSymbol::makeStack (const char * id, unsigned char count, unsigned char recsize)"
.PP
Create a stack object.
.PP
\fBReturns: \fP
.in +1c
false if fail. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIname\fP\fP
of stack. 
.TP
\fB\fInumber\fP\fP
of entries. 
.TP
\fB\fIsize\fP\fP
of record. 
.SS "bool ScriptSymbol::postSymbol (Symbol * sym, const char * value)"
.PP
Post data into a fifo.
.PP
\fBReturns: \fP
.in +1c
false if full. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
object to post. 
.TP
\fB\fIdata\fP\fP
value to post. 
.SS "char* ScriptSymbol::readSymbol (Symbol * sym)"
.PP
Read symbol handles special symbol types.
.PP
\fBReturns: \fP
.in +1c
data of symbol. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol.\fP\fP
.SS "bool ScriptSymbol::removeSymbol (Symbol * sym, const char * value)"
.PP
Remove entry from a queue.
.PP
\fBReturns: \fP
.in +1c
false if invalid. 
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
object to remove from. 
.TP
\fB\fIdata\fP\fP
value to find and remove. 
.SS "bool ScriptSymbol::setAlias (const char * symbol, const char * source)"
.PP
Set an alias.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to alias. 
.TP
\fB\fIvalue\fP\fP
of alias to set. 
.PP
\fBReturns: \fP
.in +1c
bool if not set, else value. 
.SS "char* ScriptSymbol::setConst (const char * symbol, const char * value = '')"
.PP
Set a constant value.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to find. 
.TP
\fB\fIvalue\fP\fP
string to set. 
.PP
\fBReturns: \fP
.in +1c
NULL if not found, else value. 
.SS "bool ScriptSymbol::setPointer (const char * symbol, void * data)"
.PP
Set an embedded pointer object as a symbol.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name. 
.TP
\fB\fIdata\fP\fP
pointer to save. 
.PP
\fBReturns: \fP
.in +1c
true if successful. 
.SS "char* ScriptSymbol::setSymbol (const char * symbol, int size = 0)"
.PP
Create a new symbol entry of a specified size.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to create. 
.TP
\fB\fIsize\fP\fP
of symbol, otherwise default size used. 
.TP
\fB\fIbuffer\fP\fP
or NULL if exists. 
.SS "char* ScriptSymbol::setSymbol (const char * symbol, const char * value = '')"
.PP
Set a given symbol to a new value.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to find. 
.TP
\fB\fIvalue\fP\fP
string to set. 
.PP
\fBReturns: \fP
.in +1c
NULL if not found, else value. 
.SS "bool ScriptSymbol::swapSymbol (const char * oldname, const char * newname)"
.PP
Swap an existing symbol, relinks table sets.
.PP
Parameters: \fP
.in +1c
.TP
\fB\fIsymbol\fP\fP
name to find. 
.TP
\fB\fIsymbol\fP\fP
name to swap with. 
.PP
\fBReturns: \fP
.in +1c
bool true if successful. 

.SH "AUTHOR"
.PP 
Generated automatically by Doxygen for ccScript from the source code.