home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Demos / A.D. Software / OOFILE 1.3b4d6.sit / OOFILE 1.3b4d6 / MacCodeWarriorDemo1.3b4d6 / docs / samples / ooftst04.cpp < prev    next >
MacBinary  |  1997-04-03  |  2.4 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Thu Apr 3 10:55:53 1997, modified Thu Apr 3 10:55:53 1997, creator 'CWIE', type ASCII, 1446 bytes "ooftst04.cpp" , at 0x626 656 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 6f 6f 66 74 73 74 | 30 34 2e 63 70 70 00 00 |..ooftst|04.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 00 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 05 a6 00 | 00 02 90 af 69 83 89 af |........|....i...|
|00000060| 69 83 89 00 00 0a 00 00 | 00 00 00 00 00 00 00 00 |i.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 77 37 00 00 |........|....w7..|
|00000080| 2f 2f 20 43 6f 70 79 72 | 69 67 68 74 20 31 39 39 |// Copyr|ight 199|
|00000090| 34 20 41 2e 44 2e 20 53 | 6f 66 74 77 61 72 65 2e |4 A.D. S|oftware.|
|000000a0| 20 41 6c 6c 20 52 69 67 | 68 74 73 20 52 65 73 65 | All Rig|hts Rese|
|000000b0| 72 76 65 64 0d 0d 2f 2f | 20 4f 4f 46 54 45 53 54 |rved..//| OOFTEST|
|000000c0| 34 0d 0d 2f 2f 20 74 68 | 69 73 20 73 61 6d 70 6c |4..// th|is sampl|
|000000d0| 65 20 6a 75 73 74 20 64 | 65 6d 6f 6e 73 74 72 61 |e just d|emonstra|
|000000e0| 74 65 73 20 74 68 65 20 | 72 65 70 6f 72 74 2d 77 |tes the |report-w|
|000000f0| 72 69 74 65 72 0d 0d 2f | 2f 20 53 69 6d 70 6c 65 |riter../|/ Simple|
|00000100| 20 73 74 72 65 61 6d 20 | 49 2f 4f 20 69 73 20 75 | stream |I/O is u|
|00000110| 73 65 64 20 74 6f 20 69 | 6e 74 65 72 61 63 74 20 |sed to i|nteract |
|00000120| 77 69 74 68 20 74 68 65 | 20 75 73 65 72 2e 0d 23 |with the| user..#|
|00000130| 69 6e 63 6c 75 64 65 20 | 22 6f 6f 66 69 6c 65 2e |include |"oofile.|
|00000140| 68 22 0d 23 69 6e 63 6c | 75 64 65 20 22 6f 6f 66 |h".#incl|ude "oof|
|00000150| 72 77 2e 68 22 0d 0d 0d | 23 69 6e 63 6c 75 64 65 |rw.h"...|#include|
|00000160| 20 22 6f 6f 66 74 73 74 | 30 32 2e 68 22 0d 0d 2f | "ooftst|02.h"../|
|00000170| 2f 20 67 6c 6f 62 61 6c | 20 76 61 72 69 61 62 6c |/ global| variabl|
|00000180| 65 73 20 74 68 61 74 20 | 64 65 66 69 6e 65 20 74 |es that |define t|
|00000190| 68 65 20 64 61 74 61 62 | 61 73 65 20 75 73 69 6e |he datab|ase usin|
|000001a0| 67 20 74 68 65 20 6f 6f | 66 74 73 74 30 32 20 63 |g the oo|ftst02 c|
|000001b0| 6c 61 73 73 65 73 0d 0d | 09 64 62 43 6f 6e 6e 65 |lasses..|.dbConne|
|000001c0| 63 74 5f 72 61 6d 20 20 | 20 20 74 68 65 44 42 3b |ct_ram | theDB;|
|000001d0| 0d 09 64 62 50 61 74 69 | 65 6e 74 73 20 20 20 20 |..dbPati|ents |
|000001e0| 20 50 61 74 69 65 6e 74 | 73 3b 0d 09 64 62 56 69 | Patient|s;..dbVi|
|000001f0| 73 69 74 73 09 56 69 73 | 69 74 73 3b 0d 09 64 62 |sits.Vis|its;..db|
|00000200| 52 65 6c 61 74 69 6f 6e | 73 68 69 70 20 50 61 74 |Relation|ship Pat|
|00000210| 69 65 6e 74 56 69 73 69 | 74 73 28 50 61 74 69 65 |ientVisi|ts(Patie|
|00000220| 6e 74 73 2e 56 69 73 69 | 74 73 2c 20 56 69 73 69 |nts.Visi|ts, Visi|
|00000230| 74 73 2e 50 61 74 69 65 | 6e 74 29 3b 0d 09 0d 0d |ts.Patie|nt);....|
|00000240| 69 6e 74 20 6d 61 69 6e | 28 29 0d 7b 0d 09 63 6f |int main|().{..co|
|00000250| 75 74 20 3c 3c 20 22 4f | 4f 46 49 4c 45 20 56 61 |ut << "O|OFILE Va|
|00000260| 6c 69 64 61 74 69 6f 6e | 20 53 75 69 74 65 20 2d |lidation| Suite -|
|00000270| 20 54 65 73 74 20 34 5c | 6e 22 0d 09 09 20 3c 3c | Test 4\|n"... <<|
|00000280| 20 22 53 69 6d 70 6c 65 | 20 74 65 73 74 20 74 6f | "Simple| test to|
|00000290| 20 64 65 6d 6f 6e 73 74 | 72 61 74 65 20 75 73 65 | demonst|rate use|
|000002a0| 20 6f 66 20 74 68 65 20 | 72 65 70 6f 72 74 2d 77 | of the |report-w|
|000002b0| 72 69 74 65 72 22 20 3c | 3c 20 65 6e 64 6c 0d 09 |riter" <|< endl..|
|000002c0| 09 20 3c 3c 20 22 75 73 | 69 6e 67 20 74 68 65 20 |. << "us|ing the |
|000002d0| 64 61 74 61 62 61 73 65 | 20 66 72 6f 6d 20 6f 6f |database| from oo|
|000002e0| 66 74 65 73 74 32 20 61 | 6e 64 20 6f 75 74 70 75 |ftest2 a|nd outpu|
|000002f0| 74 20 74 6f 20 61 20 66 | 69 6c 65 22 20 3c 3c 20 |t to a f|ile" << |
|00000300| 65 6e 64 6c 3b 0d 0d 09 | 74 68 65 44 42 2e 6e 65 |endl;...|theDB.ne|
|00000310| 77 43 6f 6e 6e 65 63 74 | 69 6f 6e 28 29 3b 0d 09 |wConnect|ion();..|
|00000320| 50 61 74 69 65 6e 74 73 | 2e 41 64 64 54 65 73 74 |Patients|.AddTest|
|00000330| 44 61 74 61 28 29 3b 0d | 0d 09 50 61 74 69 65 6e |Data();.|..Patien|
|00000340| 74 73 2e 73 65 74 53 6f | 72 74 4f 72 64 65 72 28 |ts.setSo|rtOrder(|
|00000350| 50 61 74 69 65 6e 74 73 | 2e 4c 61 73 74 4e 61 6d |Patients|.LastNam|
|00000360| 65 29 3b 0d 09 63 6f 75 | 74 20 3c 3c 20 22 4c 69 |e);..cou|t << "Li|
|00000370| 73 74 69 6e 67 20 72 65 | 63 6f 72 64 73 20 74 6f |sting re|cords to|
|00000380| 20 6f 6f 66 74 73 74 30 | 34 2e 6f 75 74 2e 2e 2e | ooftst0|4.out...|
|00000390| 22 3b 0d 09 6f 66 73 74 | 72 65 61 6d 20 66 73 28 |";..ofst|ream fs(|
|000003a0| 22 6f 6f 66 74 73 74 30 | 34 2e 6f 75 74 22 29 3b |"ooftst0|4.out");|
|000003b0| 0d 09 0d 09 64 62 56 69 | 65 77 20 74 68 65 56 69 |....dbVi|ew theVi|
|000003c0| 65 77 28 50 61 74 69 65 | 6e 74 73 2c 20 66 61 6c |ew(Patie|nts, fal|
|000003d0| 73 65 29 3b 20 2f 2f 20 | 70 61 73 73 20 69 6e 20 |se); // |pass in |
|000003e0| 66 61 6c 73 65 20 74 6f | 20 70 72 65 76 65 6e 74 |false to| prevent|
|000003f0| 20 69 74 65 72 61 74 6f | 72 20 63 6c 6f 6e 69 6e | iterato|r clonin|
|00000400| 67 20 2d 20 48 41 43 4b | 20 75 6e 74 69 6c 20 66 |g - HACK| until f|
|00000410| 69 78 20 64 62 56 69 65 | 77 20 63 6f 70 79 20 63 |ix dbVie|w copy c|
|00000420| 74 6f 72 0d 09 74 68 65 | 56 69 65 77 20 3c 3c 20 |tor..the|View << |
|00000430| 50 61 74 69 65 6e 74 73 | 2e 50 61 74 69 65 6e 74 |Patients|.Patient|
|00000440| 4e 6f 20 3c 3c 20 50 61 | 74 69 65 6e 74 73 2e 4c |No << Pa|tients.L|
|00000450| 61 73 74 4e 61 6d 65 20 | 3c 3c 20 50 61 74 69 65 |astName |<< Patie|
|00000460| 6e 74 73 2e 53 61 6c 61 | 72 79 3b 20 0d 0d 09 64 |nts.Sala|ry; ...d|
|00000470| 62 52 65 70 43 68 61 72 | 20 74 65 6d 70 52 65 70 |bRepChar| tempRep|
|00000480| 6f 72 74 28 64 62 52 65 | 70 53 69 7a 65 72 28 22 |ort(dbRe|pSizer("|
|00000490| 44 65 6d 6f 20 43 6f 6c | 75 6d 6e 61 72 20 52 65 |Demo Col|umnar Re|
|000004a0| 70 6f 72 74 22 29 2e 70 | 61 67 65 48 65 69 67 68 |port").p|ageHeigh|
|000004b0| 74 28 38 30 29 2c 0d 09 | 09 09 09 09 64 62 52 65 |t(80),..|....dbRe|
|000004c0| 70 43 6f 6c 57 69 64 74 | 68 73 28 29 20 3c 3c 20 |pColWidt|hs() << |
|000004d0| 38 20 3c 3c 20 31 30 20 | 3c 3c 20 33 30 2c 20 74 |8 << 10 |<< 30, t|
|000004e0| 68 65 56 69 65 77 29 3b | 0d 09 74 65 6d 70 52 65 |heView);|..tempRe|
|000004f0| 70 6f 72 74 2e 64 72 61 | 77 28 66 73 29 3b 0d 20 |port.dra|w(fs);. |
|00000500| 0d 20 09 66 73 20 3c 3c | 20 65 6e 64 6c 20 3c 3c |. .fs <<| endl <<|
|00000510| 20 65 6e 64 6c 20 3c 3c | 20 22 52 65 70 65 61 74 | endl <<| "Repeat|
|00000520| 69 6e 67 20 74 68 65 20 | 72 65 70 6f 72 74 20 77 |ing the |report w|
|00000530| 69 74 68 20 74 68 65 20 | 73 61 6d 65 20 64 61 74 |ith the |same dat|
|00000540| 61 20 76 69 65 77 22 3c | 3c 20 65 6e 64 6c 20 3c |a view"<|< endl <|
|00000550| 3c 20 65 6e 64 6c 3b 0d | 09 0d 09 64 62 52 65 70 |< endl;.|...dbRep|
|00000560| 43 68 61 72 20 74 65 6d | 70 52 65 70 6f 72 74 32 |Char tem|pReport2|
|00000570| 28 64 62 52 65 70 53 69 | 7a 65 72 28 22 44 65 6d |(dbRepSi|zer("Dem|
|00000580| 6f 20 43 6f 6c 75 6d 6e | 61 72 20 52 65 70 6f 72 |o Column|ar Repor|
|00000590| 74 22 29 2e 70 61 67 65 | 48 65 69 67 68 74 28 38 |t").page|Height(8|
|000005a0| 30 29 2c 0d 09 09 09 09 | 09 20 74 68 65 56 69 65 |0),.....|. theVie|
|000005b0| 77 2c 20 64 62 52 65 70 | 3a 3a 70 61 67 65 57 69 |w, dbRep|::pageWi|
|000005c0| 73 65 29 3b 0d 09 74 65 | 6d 70 52 65 70 6f 72 74 |se);..te|mpReport|
|000005d0| 32 2e 64 72 61 77 28 66 | 73 29 3b 0d 20 0d 09 66 |2.draw(f|s);. ..f|
|000005e0| 73 2e 63 6c 6f 73 65 28 | 29 3b 0d 09 0d 09 63 6f |s.close(|);....co|
|000005f0| 75 74 20 3c 3c 20 22 64 | 6f 6e 65 22 20 3c 3c 20 |ut << "d|one" << |
|00000600| 65 6e 64 6c 3b 0d 0d 09 | 72 65 74 75 72 6e 20 45 |endl;...|return E|
|00000610| 58 49 54 5f 53 55 43 43 | 45 53 53 3b 0d 7d 20 20 |XIT_SUCC|ESS;.} |
|00000620| 20 20 20 20 20 0d 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 |........|........|
|00000680| 00 00 01 00 00 00 02 0a | 00 00 01 0a 00 00 00 86 |........|........|
|00000690| 00 00 48 7c 08 6f 6f 66 | 31 2e 63 70 70 6f 02 00 |..H|.oof|1.cppo..|
|000006a0| 02 00 54 45 58 54 64 6f | 73 61 01 00 ff ff ff ff |..TEXTdo|sa......|
|000006b0| 0c 6f 6f 66 74 73 74 30 | 34 2e 63 70 70 30 02 00 |.ooftst0|4.cpp0..|
|000006c0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000006d0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|000006e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000006f0| 00 00 b0 1b 75 f3 00 00 | 00 00 00 00 02 90 00 00 |....u...|........|
|00000700| 00 00 00 00 0e 00 00 00 | 48 7c 08 6f 6f 66 31 2e |........|H|.oof1.|
|00000710| 68 70 70 6f 02 00 02 00 | 54 45 58 54 64 6f 73 61 |hppo....|TEXTdosa|
|00000720| 01 00 ff ff ff ff 00 00 | 00 00 57 12 00 00 00 00 |........|..W.....|
|00000730| 51 05 00 00 58 00 00 00 | 00 00 03 be 00 00 08 00 |Q...X...|........|
|00000740| aa fc b0 5a ab 52 84 d0 | 00 00 00 00 00 00 00 00 |...Z.R..|........|
|00000750| 00 00 00 00 00 00 00 00 | 00 00 5e 9d 00 00 05 2f |........|..^..../|
|00000760| 00 0b 00 00 00 00 00 00 | 00 00 05 2e 00 01 00 00 |........|........|
|00000770| 00 00 00 00 00 00 00 00 | 00 00 0d cb 00 03 00 00 |........|........|
|00000780| 00 00 00 78 00 03 00 00 | 00 48 00 48 00 00 00 00 |...x....|.H.H....|
|00000790| 03 0d 02 1a ff e2 ff e3 | 03 2c 02 36 03 47 05 7b |........|.,.6.G.{|
|000007a0| 03 e0 00 02 00 00 00 48 | 00 48 00 00 00 00 02 d8 |.......H|.H......|
|000007b0| 02 28 00 01 00 00 00 64 | 00 00 00 01 00 03 03 03 |.(.....d|........|
|000007c0| 00 ff 00 01 27 0f 00 01 | 00 01 00 00 00 00 00 00 |....'...|........|
|000007d0| 00 00 00 00 00 00 60 08 | 00 19 01 90 00 00 00 00 |......`.|........|
|000007e0| 00 00 00 00 00 00 00 00 | 00 00 00 01 00 00 00 00 |........|........|
|000007f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 16 |........|........|
|00000800| 01 00 01 00 00 00 00 00 | 01 00 01 00 00 07 07 43 |........|.......C|
|00000810| 6f 75 72 69 65 72 00 00 | 00 08 00 00 00 00 00 00 |ourier..|........|
|00000820| 00 00 00 00 00 10 00 01 | 00 00 01 ca 00 00 01 ce |........|........|
|00000830| 05 6d 61 69 6e 00 00 00 | 00 48 00 09 4d 6f 6e 61 |.main...|.H..Mona|
|00000840| 63 6f 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |co......|........|
|00000850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 03 00 04 |........|........|
|00000860| 00 58 00 04 01 b4 02 45 | 00 58 00 04 01 b4 02 45 |.X.....E|.X.....E|
|00000870| af 69 4b a1 00 00 02 b8 | 00 00 02 b8 00 00 02 3f |.iK.....|.......?|
|00000880| 01 00 00 00 00 04 00 01 | 00 01 00 00 01 00 00 00 |........|........|
|00000890| 02 0a 00 00 01 0a 00 00 | 00 86 01 a3 eb 50 25 d4 |........|.....P%.|
|000008a0| 00 00 00 1c 00 86 00 03 | 4d 50 53 52 00 02 00 22 |........|MPSR..."|
|000008b0| 46 50 52 46 00 00 00 46 | 46 50 72 66 00 00 00 52 |FPRF...F|FPrf...R|
|000008c0| 4d 57 42 42 00 00 00 5e | 03 ee ff ff 00 00 00 00 |MWBB...^|........|
|000008d0| 00 00 00 00 03 ef ff ff | 00 00 00 a2 00 00 00 00 |........|........|
|000008e0| 03 ed ff ff 00 00 00 b6 | 00 00 00 00 05 1a ff ff |........|........|
|000008f0| 00 00 00 7c 00 00 00 00 | 05 1a ff ff 00 00 00 96 |...|....|........|
|00000900| 00 00 00 00 03 f0 ff ff | 00 00 01 02 00 00 00 00 |........|........|
|00000910| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000920| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000930| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000940| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+