home *** CD-ROM | disk | FTP | other *** search
/ MacWorld 1999 November / Macworld (1999-11).dmg / Updaters / WhiteCap 3.0.4 / WhiteCap Source.sit / WhiteCap Source / Common / math / ExprArray.cpp < prev    next >
MacBinary  |  1999-07-13  |  1.6 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: ExprArray.cpp

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Jul 13 21:53:58 1999, modified Tue Jul 13 21:53:58 1999, creator 'CWIE', type ASCII, 909 bytes "ExprArray.cpp" , at 0x40d 410 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 45 78 70 72 41 72 | 72 61 79 2e 63 70 70 00 |..ExprAr|ray.cpp.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 03 8d 00 | 00 01 9a b3 b1 9e 36 b3 |........|......6.|
|00000060| b1 9e 36 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..6.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 49 c5 00 00 |........|....I...|
|00000080| 23 69 6e 63 6c 75 64 65 | 20 22 45 78 70 72 41 72 |#include| "ExprAr|
|00000090| 72 61 79 2e 68 22 0d 0d | 23 69 6e 63 6c 75 64 65 |ray.h"..|#include|
|000000a0| 20 22 45 78 70 72 65 73 | 73 69 6f 6e 44 69 63 74 | "Expres|sionDict|
|000000b0| 2e 68 22 0d 23 69 6e 63 | 6c 75 64 65 20 22 41 72 |.h".#inc|lude "Ar|
|000000c0| 67 4c 69 73 74 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |gList.h"|.#includ|
|000000d0| 65 20 22 45 78 70 72 65 | 73 73 69 6f 6e 2e 68 22 |e "Expre|ssion.h"|
|000000e0| 0d 0d 0d 45 78 70 72 41 | 72 72 61 79 3a 3a 45 78 |...ExprA|rray::Ex|
|000000f0| 70 72 41 72 72 61 79 28 | 29 20 7b 0d 09 6d 45 78 |prArray(|) {..mEx|
|00000100| 70 72 73 20 3d 20 4e 55 | 4c 4c 3b 0d 09 6d 4e 75 |prs = NU|LL;..mNu|
|00000110| 6d 45 78 70 72 73 20 3d | 20 30 3b 0d 7d 0d 0d 0d |mExprs =| 0;.}...|
|00000120| 0d 0d 45 78 70 72 41 72 | 72 61 79 3a 3a 7e 45 78 |..ExprAr|ray::~Ex|
|00000130| 70 72 41 72 72 61 79 28 | 29 20 7b 0d 0d 09 69 66 |prArray(|) {...if|
|00000140| 20 28 20 6d 45 78 70 72 | 73 20 29 0d 09 09 64 65 | ( mExpr|s )...de|
|00000150| 6c 65 74 65 20 5b 5d 6d | 45 78 70 72 73 3b 0d 7d |lete []m|Exprs;.}|
|00000160| 0d 0d 0d 0d 0d 0d 0d 76 | 6f 69 64 20 45 78 70 72 |.......v|oid Expr|
|00000170| 41 72 72 61 79 3a 3a 43 | 6f 6d 70 69 6c 65 28 20 |Array::C|ompile( |
|00000180| 63 6f 6e 73 74 20 41 72 | 67 4c 69 73 74 26 20 69 |const Ar|gList& i|
|00000190| 6e 41 72 67 73 2c 20 6c | 6f 6e 67 20 69 6e 49 44 |nArgs, l|ong inID|
|000001a0| 2c 20 45 78 70 72 65 73 | 73 69 6f 6e 44 69 63 74 |, Expres|sionDict|
|000001b0| 26 20 69 6f 44 69 63 74 | 20 29 20 7b 0d 09 55 74 |& ioDict| ) {..Ut|
|000001c0| 69 6c 53 74 72 20 73 74 | 72 2c 20 49 44 53 74 72 |ilStr st|r, IDStr|
|000001d0| 3b 0d 09 75 6e 73 69 67 | 6e 65 64 20 6c 6f 6e 67 |;..unsig|ned long|
|000001e0| 20 69 3b 0d 09 0d 09 6d | 4e 75 6d 45 78 70 72 73 | i;....m|NumExprs|
|000001f0| 20 3d 20 69 6e 41 72 67 | 73 2e 47 65 74 41 72 72 | = inArg|s.GetArr|
|00000200| 61 79 53 69 7a 65 28 20 | 69 6e 49 44 20 29 3b 0d |aySize( |inID );.|
|00000210| 09 0d 09 69 66 20 28 20 | 6d 45 78 70 72 73 20 29 |...if ( |mExprs )|
|00000220| 0d 09 09 64 65 6c 65 74 | 65 20 5b 5d 6d 45 78 70 |...delet|e []mExp|
|00000230| 72 73 3b 0d 09 09 0d 09 | 6d 45 78 70 72 73 20 3d |rs;.....|mExprs =|
|00000240| 20 6e 65 77 20 45 78 70 | 72 65 73 73 69 6f 6e 5b | new Exp|ression[|
|00000250| 20 6d 4e 75 6d 45 78 70 | 72 73 20 2b 20 31 20 5d | mNumExp|rs + 1 ]|
|00000260| 3b 0d 09 0d 09 69 20 3d | 20 69 6e 49 44 3b 0d 09 |;....i =| inID;..|
|00000270| 77 68 69 6c 65 20 28 20 | 69 20 3e 20 30 20 29 20 |while ( |i > 0 ) |
|00000280| 7b 0d 09 09 49 44 53 74 | 72 2e 50 72 65 70 65 6e |{...IDSt|r.Prepen|
|00000290| 64 28 20 28 63 68 61 72 | 29 20 28 20 69 20 26 20 |d( (char|) ( i & |
|000002a0| 30 78 46 46 20 29 20 29 | 3b 0d 09 09 69 20 3d 20 |0xFF ) )|;...i = |
|000002b0| 69 20 3e 3e 20 38 3b 0d | 09 7d 0d 09 0d 09 66 6f |i >> 8;.|.}....fo|
|000002c0| 72 20 28 20 69 20 3d 20 | 30 3b 20 69 20 3c 20 6d |r ( i = |0; i < m|
|000002d0| 4e 75 6d 45 78 70 72 73 | 3b 20 69 2b 2b 20 29 20 |NumExprs|; i++ ) |
|000002e0| 7b 0d 09 09 73 74 72 2e | 41 73 73 69 67 6e 28 20 |{...str.|Assign( |
|000002f0| 49 44 53 74 72 20 29 3b | 0d 09 09 73 74 72 2e 41 |IDStr );|...str.A|
|00000300| 70 70 65 6e 64 28 20 28 | 6c 6f 6e 67 29 20 69 20 |ppend( (|long) i |
|00000310| 29 3b 0d 09 09 6d 56 61 | 6c 73 5b 20 69 20 5d 20 |);...mVa|ls[ i ] |
|00000320| 3d 20 30 3b 0d 09 09 69 | 6f 44 69 63 74 2e 41 64 |= 0;...i|oDict.Ad|
|00000330| 64 56 61 72 28 20 73 74 | 72 2c 20 26 6d 56 61 6c |dVar( st|r, &mVal|
|00000340| 73 5b 20 69 20 5d 20 29 | 3b 0d 09 09 69 6e 41 72 |s[ i ] )|;...inAr|
|00000350| 67 73 2e 47 65 74 41 72 | 67 28 20 69 6e 49 44 2c |gs.GetAr|g( inID,|
|00000360| 20 73 74 72 2c 20 69 20 | 29 3b 0d 09 09 6d 45 78 | str, i |);...mEx|
|00000370| 70 72 73 5b 20 69 20 5d | 2e 43 6f 6d 70 69 6c 65 |prs[ i ]|.Compile|
|00000380| 28 20 73 74 72 2c 20 69 | 6f 44 69 63 74 20 29 3b |( str, i|oDict );|
|00000390| 0d 09 7d 0d 7d 0d 0d 0d | 76 6f 69 64 20 45 78 70 |..}.}...|void Exp|
|000003a0| 72 41 72 72 61 79 3a 3a | 45 76 61 6c 75 61 74 65 |rArray::|Evaluate|
|000003b0| 28 29 20 7b 0d 09 69 6e | 74 20 69 3b 0d 09 0d 09 |() {..in|t i;....|
|000003c0| 66 6f 72 20 28 20 69 20 | 3d 20 30 3b 20 69 20 3c |for ( i |= 0; i <|
|000003d0| 20 6d 4e 75 6d 45 78 70 | 72 73 3b 20 69 2b 2b 20 | mNumExp|rs; i++ |
|000003e0| 29 0d 09 09 6d 56 61 6c | 73 5b 20 69 20 5d 20 3d |)...mVal|s[ i ] =|
|000003f0| 20 6d 45 78 70 72 73 5b | 20 69 20 5d 2e 45 76 61 | mExprs[| i ].Eva|
|00000400| 6c 75 61 74 65 28 29 3b | 0d 7d 0d 0d 0d 00 00 00 |luate();|.}......|
|00000410| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000420| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000430| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000440| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000450| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000460| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000470| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000480| 00 00 01 00 00 00 01 54 | 00 00 00 54 00 00 00 46 |.......T|...T...F|
|00000490| 97 ce 69 fc 80 58 04 02 | 9b 96 eb 1a 81 5a 50 88 |..i..X..|.....ZP.|
|000004a0| 7d 5e 25 2c e7 7f 50 63 | bf b9 9d 69 27 85 b1 66 |}^%,..Pc|...i'..f|
|000004b0| d6 3d 80 d7 76 7d ad 8a | c0 04 b6 92 d6 3d ec a7 |.=..v}..|.....=..|
|000004c0| f7 af a6 40 fc b9 cc ed | 3f 5d d6 ff 34 4f 30 40 |...@....|?]..4O0@|
|000004d0| f9 e4 44 05 a8 ba 82 68 | cb 67 8d 6f e6 4f e5 d3 |..D....h|.g.o.O..|
|000004e0| d7 69 e3 dd 44 43 ce b4 | 94 21 8d 6a 4e 78 d9 69 |.i..DC..|.!.jNx.i|
|000004f0| a1 1f c8 f5 26 a2 a2 35 | 4b 7a 3e 75 1d 55 af cc |....&..5|Kz>u.U..|
|00000500| 06 c7 53 3b 94 9a b4 49 | a6 ae 82 eb 2f d6 aa 63 |..S;...I|..../..c|
|00000510| dd 91 65 69 f9 ff 86 bf | 00 0a 00 00 09 32 3a 12 |..ei....|.....2:.|
|00000520| 35 32 1d b3 10 6a f3 89 | d7 8d 41 48 8b eb 2f 6a |52...j..|..AH../j|
|00000530| 8e c0 46 50 7e 8f c1 fe | 6f 80 ff 5f 93 eb ff ca |..FP~...|o.._....|
|00000540| de cd e8 de 33 f2 7a 3f | f9 0d 3b 7e 5e 60 00 04 |....3.z?|..;~^`..|
|00000550| 00 00 00 01 e9 3c a6 84 | 43 eb 32 d8 88 11 3e d9 |.....<..|C.2...>.|
|00000560| cd d7 a8 d8 9c eb 75 29 | dc 04 37 0f f2 f6 6e a5 |......u)|..7...n.|
|00000570| b9 92 81 92 6a f4 70 28 | 5c f1 fb 4e c9 9f 5b 79 |....j.p(|\..N..[y|
|00000580| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00000590| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000005a0| 00 00 00 00 00 00 00 03 | 00 04 00 62 00 17 02 49 |........|...b...I|
|000005b0| 02 6d 00 62 00 17 02 49 | 02 6d b3 9d 4e d5 00 00 |.m.b...I|.m..N...|
|000005c0| 00 f7 00 00 00 fe 00 00 | 00 a2 01 00 00 00 00 04 |........|........|
|000005d0| 00 01 00 01 00 00 01 00 | 00 00 01 54 00 00 00 54 |........|...T...T|
|000005e0| 00 00 00 46 04 c3 06 a4 | 12 00 00 00 00 1c 00 46 |...F....|.......F|
|000005f0| 00 01 4d 50 53 52 00 00 | 00 12 4d 57 42 42 00 00 |..MPSR..|..MWBB..|
|00000600| 00 1e 03 ed ff ff 00 00 | 00 00 00 00 00 00 03 f0 |........|........|
|00000610| ff ff 00 00 00 4c 00 00 | 00 00 00 00 00 00 00 00 |.....L..|........|
|00000620| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000630| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000640| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000650| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000660| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000670| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+