00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef __ZStreamer__
00026 #define __ZStreamer__ 1
00027 #include "zconfig.h"
00028
00029 #include "ZRefCount.h"
00030 #include "ZStream.h"
00031
00032
00033 #pragma mark -
00034 #pragma mark * ZStreamerR
00035
00040 class ZStreamerR : public virtual ZRefCountedWithFinalization
00041 {
00042 public:
00043 virtual const ZStreamR& GetStreamR() = 0;
00044 };
00045
00046
00047 #pragma mark -
00048 #pragma mark * ZStreamerU
00049
00054 class ZStreamerU : public ZStreamerR
00055 {
00056 public:
00057
00058 virtual const ZStreamR& GetStreamR();
00059
00060
00061 virtual const ZStreamU& GetStreamU() = 0;
00062 };
00063
00064
00065 #pragma mark -
00066 #pragma mark * ZStreamerRPos
00067
00072 class ZStreamerRPos : public ZStreamerU
00073 {
00074 public:
00075
00076 virtual const ZStreamR& GetStreamR();
00077
00078
00079 virtual const ZStreamU& GetStreamU();
00080
00081
00082 virtual const ZStreamRPos& GetStreamRPos() = 0;
00083 };
00084
00085
00086 #pragma mark -
00087 #pragma mark * ZStreamerW
00088
00093 class ZStreamerW : public virtual ZRefCountedWithFinalization
00094 {
00095 public:
00096 virtual const ZStreamW& GetStreamW() = 0;
00097 };
00098
00099
00100 #pragma mark -
00101 #pragma mark * ZStreamerWPos
00102
00107 class ZStreamerWPos : public ZStreamerW
00108 {
00109 public:
00110
00111 virtual const ZStreamW& GetStreamW();
00112
00113
00114 virtual const ZStreamWPos& GetStreamWPos() = 0;
00115 };
00116
00117
00118 #pragma mark -
00119 #pragma mark * ZStreamerRWPos
00120
00125 class ZStreamerRWPos : public ZStreamerRPos, public ZStreamerWPos
00126 {
00127 public:
00128
00129 virtual const ZStreamR& GetStreamR();
00130
00131
00132 virtual const ZStreamU& GetStreamU();
00133
00134
00135 virtual const ZStreamRPos& GetStreamRPos();
00136
00137
00138 virtual const ZStreamW& GetStreamW();
00139
00140
00141 virtual const ZStreamWPos& GetStreamWPos();
00142
00143
00144 virtual const ZStreamRWPos& GetStreamRWPos() = 0;
00145 };
00146
00147
00148 #pragma mark -
00149 #pragma mark * ZStreamerRW
00150
00156 class ZStreamerRW : public ZStreamerR, public ZStreamerW
00157 {
00158 };
00159
00160
00161 #pragma mark -
00162 #pragma mark * ZStreamerR_T
00163
00164 template <class Stream_t>
00165 class ZStreamerR_T : public ZStreamerR
00166 {
00167 public:
00168 ZStreamerR_T() {}
00169
00170 virtual ~ZStreamerR_T() {}
00171
00172 template <class P>
00173 ZStreamerR_T(P& iParam) : fStream(iParam) {}
00174
00175 template <class P>
00176 ZStreamerR_T(const P& iParam) : fStream(iParam) {}
00177
00178
00179 virtual const ZStreamR& GetStreamR() { return fStream; }
00180
00181
00182 Stream_t& GetStream() { return fStream; }
00183
00184 protected:
00185 Stream_t fStream;
00186 };
00187
00188
00189 #pragma mark -
00190 #pragma mark * ZStreamerR_FT
00191
00192 template <class Stream_t>
00193 class ZStreamerR_FT : public ZStreamerR
00194 {
00195 protected:
00196 ZStreamerR_FT() {}
00197
00198 public:
00199 virtual ~ZStreamerR_FT() {}
00200
00201 template <class P>
00202 ZStreamerR_FT(P& iParam, ZRef<ZStreamerR> iStreamer)
00203 : fStreamerReal(iStreamer),
00204 fStream(iParam, iStreamer->GetStreamR())
00205 {}
00206
00207 template <class P>
00208 ZStreamerR_FT(const P& iParam, ZRef<ZStreamerR> iStreamer)
00209 : fStreamerReal(iStreamer),
00210 fStream(iParam, iStreamer->GetStreamR())
00211 {}
00212
00213 ZStreamerR_FT(ZRef<ZStreamerR> iStreamer)
00214 : fStreamerReal(iStreamer),
00215 fStream(iStreamer->GetStreamR())
00216 {}
00217
00218
00219 virtual const ZStreamR& GetStreamR() { return fStream; }
00220
00221
00222 ZRef<ZStreamerR> GetStreamerR() { return fStreamerReal; }
00223
00224 Stream_t& GetStream() { return fStream; }
00225
00226 protected:
00227 ZRef<ZStreamerR> fStreamerReal;
00228 Stream_t fStream;
00229 };
00230
00231
00232 #pragma mark -
00233 #pragma mark * ZStreamerU_T
00234
00235 template <class Stream_t>
00236 class ZStreamerU_T : public ZStreamerU
00237 {
00238 public:
00239 ZStreamerU_T() {}
00240
00241 virtual ~ZStreamerU_T() {}
00242
00243 template <class P>
00244 ZStreamerU_T(P& iParam) : fStream(iParam) {}
00245
00246 template <class P>
00247 ZStreamerU_T(const P& iParam) : fStream(iParam) {}
00248
00249
00250 virtual const ZStreamR& GetStreamR() { return fStream; }
00251
00252
00253 virtual const ZStreamU& GetStreamU() { return fStream; }
00254
00255
00256 Stream_t& GetStream() { return fStream; }
00257
00258 protected:
00259 Stream_t fStream;
00260 };
00261
00262
00263 #pragma mark -
00264 #pragma mark * ZStreamerU_FT
00265
00266 template <class Stream_t>
00267 class ZStreamerU_FT : public ZStreamerU
00268 {
00269 protected:
00270 ZStreamerU_FT() {}
00271
00272 public:
00273 virtual ~ZStreamerU_FT() {}
00274
00275 template <class P>
00276 ZStreamerU_FT(P& iParam, ZRef<ZStreamerU> iStreamer)
00277 : fStreamerReal(iStreamer),
00278 fStream(iParam, iStreamer->GetStreamU())
00279 {}
00280
00281 template <class P>
00282 ZStreamerU_FT(const P& iParam, ZRef<ZStreamerU> iStreamer)
00283 : fStreamerReal(iStreamer),
00284 fStream(iParam, iStreamer->GetStreamU())
00285 {}
00286
00287 ZStreamerU_FT(ZRef<ZStreamerU> iStreamer)
00288 : fStreamerReal(iStreamer),
00289 fStream(iStreamer->GetStreamU())
00290 {}
00291
00292
00293 virtual const ZStreamR& GetStreamR() { return fStream; }
00294
00295
00296 virtual const ZStreamU& GetStreamU() { return fStream; }
00297
00298
00299 ZRef<ZStreamerU> GetStreamerU() { return fStreamerReal; }
00300
00301 Stream_t& GetStream() { return fStream; }
00302
00303 protected:
00304 ZRef<ZStreamerU> fStreamerReal;
00305 Stream_t fStream;
00306 };
00307
00308
00309 #pragma mark -
00310 #pragma mark * ZStreamerRPos_T
00311
00312 template <class Stream_t>
00313 class ZStreamerRPos_T : public ZStreamerRPos
00314 {
00315 public:
00316 ZStreamerRPos_T() {}
00317
00318 virtual ~ZStreamerRPos_T() {}
00319
00320 template <class P>
00321 ZStreamerRPos_T(P& iParam) : fStream(iParam) {}
00322
00323 template <class P>
00324 ZStreamerRPos_T(const P& iParam) : fStream(iParam) {}
00325
00326
00327 virtual const ZStreamR& GetStreamR() { return fStream; }
00328
00329
00330 virtual const ZStreamU& GetStreamU() { return fStream; }
00331
00332
00333 virtual const ZStreamRPos& GetStreamRPos() { return fStream; }
00334
00335
00336 Stream_t& GetStream() { return fStream; }
00337
00338 protected:
00339 Stream_t fStream;
00340 };
00341
00342
00343 #pragma mark -
00344 #pragma mark * ZStreamerRPos_FT
00345
00346 template <class Stream_t>
00347 class ZStreamerRPos_FT : public ZStreamerU
00348 {
00349 protected:
00350 ZStreamerRPos_FT() {}
00351
00352 public:
00353 virtual ~ZStreamerRPos_FT() {}
00354
00355 template <class P>
00356 ZStreamerRPos_FT(P& iParam, ZRef<ZStreamerRPos> iStreamer)
00357 : fStreamerReal(iStreamer),
00358 fStream(iParam, iStreamer->GetStreamRPos())
00359 {}
00360
00361 template <class P>
00362 ZStreamerRPos_FT(const P& iParam, ZRef<ZStreamerRPos> iStreamer)
00363 : fStreamerReal(iStreamer),
00364 fStream(iParam, iStreamer->GetStreamRPos())
00365 {}
00366
00367 ZStreamerRPos_FT(ZRef<ZStreamerRPos> iStreamer)
00368 : fStreamerReal(iStreamer),
00369 fStream(iStreamer->GetStreamRPos())
00370 {}
00371
00372
00373 virtual const ZStreamR& GetStreamR() { return fStream; }
00374
00375
00376 virtual const ZStreamU& GetStreamU() { return fStream; }
00377
00378
00379 virtual const ZStreamRPos& GetStreamRPos() { return fStream; }
00380
00381
00382 ZRef<ZStreamerRPos> GetStreamerRPos() { return fStreamerReal; }
00383
00384 Stream_t& GetStream() { return fStream; }
00385
00386 protected:
00387 ZRef<ZStreamerRPos> fStreamerReal;
00388 Stream_t fStream;
00389 };
00390
00391
00392 #pragma mark -
00393 #pragma mark * ZStreamerW_T
00394
00395 template <class Stream_t>
00396 class ZStreamerW_T : public ZStreamerW
00397 {
00398 public:
00399 ZStreamerW_T() {}
00400
00401 virtual ~ZStreamerW_T() {}
00402
00403 template <class P>
00404 ZStreamerW_T(P& iParam) : fStream(iParam) {}
00405
00406 template <class P>
00407 ZStreamerW_T(const P& iParam) : fStream(iParam) {}
00408
00409
00410 virtual const ZStreamW& GetStreamW() { return fStream; }
00411
00412
00413 Stream_t& GetStream() { return fStream; }
00414
00415 protected:
00416 Stream_t fStream;
00417 };
00418
00419
00420 #pragma mark -
00421 #pragma mark * ZStreamerW_FT
00422
00423 template <class Stream_t>
00424 class ZStreamerW_FT : public ZStreamerW
00425 {
00426 protected:
00427 ZStreamerW_FT() {}
00428
00429 public:
00430 virtual ~ZStreamerW_FT() {}
00431
00432 template <class P>
00433 ZStreamerW_FT(P& iParam, ZRef<ZStreamerW> iStreamer)
00434 : fStreamerReal(iStreamer),
00435 fStream(iParam, iStreamer->GetStreamW())
00436 {}
00437
00438 template <class P>
00439 ZStreamerW_FT(const P& iParam, ZRef<ZStreamerW> iStreamer)
00440 : fStreamerReal(iStreamer),
00441 fStream(iParam, iStreamer->GetStreamW())
00442 {}
00443
00444 ZStreamerW_FT(ZRef<ZStreamerW> iStreamer)
00445 : fStreamerReal(iStreamer),
00446 fStream(iStreamer->GetStreamW())
00447 {}
00448
00449
00450 virtual const ZStreamW& GetStreamW() { return fStream; }
00451
00452
00453 ZRef<ZStreamerW> GetStreamerW() { return fStreamerReal; }
00454
00455 Stream_t& GetStream() { return fStream; }
00456
00457 protected:
00458 ZRef<ZStreamerW> fStreamerReal;
00459 Stream_t fStream;
00460 };
00461
00462
00463 #pragma mark -
00464 #pragma mark * ZStreamerWPos_T
00465
00466 template <class Stream_t>
00467 class ZStreamerWPos_T : public ZStreamerWPos
00468 {
00469 public:
00470 ZStreamerWPos_T() {}
00471
00472 virtual ~ZStreamerWPos_T() {}
00473
00474 template <class P>
00475 ZStreamerWPos_T(P& iParam) : fStream(iParam) {}
00476
00477 template <class P>
00478 ZStreamerWPos_T(const P& iParam) : fStream(iParam) {}
00479
00480
00481 virtual const ZStreamW& GetStreamW() { return fStream; }
00482
00483
00484 virtual const ZStreamWPos& GetStreamWPos() { return fStream; }
00485
00486
00487 Stream_t& GetStream() { return fStream; }
00488
00489 protected:
00490 Stream_t fStream;
00491 };
00492
00493
00494 #pragma mark -
00495 #pragma mark * ZStreamerWPos_FT
00496
00497 template <class Stream_t>
00498 class ZStreamerWPos_FT : public ZStreamerWPos
00499 {
00500 protected:
00501 ZStreamerWPos_FT() {}
00502
00503 public:
00504 virtual ~ZStreamerWPos_FT() {}
00505
00506 template <class P>
00507 ZStreamerWPos_FT(P& iParam, ZRef<ZStreamerWPos> iStreamer)
00508 : fStreamerReal(iStreamer),
00509 fStream(iParam, iStreamer->GetStreamWPos())
00510 {}
00511
00512 template <class P>
00513 ZStreamerWPos_FT(const P& iParam, ZRef<ZStreamerWPos> iStreamer)
00514 : fStreamerReal(iStreamer),
00515 fStream(iParam, iStreamer->GetStreamWPos())
00516 {}
00517
00518 ZStreamerWPos_FT(ZRef<ZStreamerWPos> iStreamer)
00519 : fStreamerReal(iStreamer),
00520 fStream(iStreamer->GetStreamWPos())
00521 {}
00522
00523
00524 virtual const ZStreamW& GetStreamW() { return fStream; }
00525
00526
00527 virtual const ZStreamWPos& GetStreamWPos() { return fStream; }
00528
00529
00530 ZRef<ZStreamerWPos> GetStreamerWPos() { return fStreamerReal; }
00531
00532 Stream_t& GetStream() { return fStream; }
00533
00534 protected:
00535 ZRef<ZStreamerWPos> fStreamerReal;
00536 Stream_t fStream;
00537 };
00538
00539
00540 #pragma mark -
00541 #pragma mark * ZStreamerRWPos_T
00542
00543 template <class Stream_t>
00544 class ZStreamerRWPos_T : public ZStreamerRWPos
00545 {
00546 public:
00547 ZStreamerRWPos_T() {}
00548
00549 virtual ~ZStreamerRWPos_T() {}
00550
00551 template <class P>
00552 ZStreamerRWPos_T(P& iParam) : fStream(iParam) {}
00553
00554 template <class P>
00555 ZStreamerRWPos_T(const P& iParam) : fStream(iParam) {}
00556
00557
00558 virtual const ZStreamR& GetStreamR() { return fStream; }
00559
00560
00561 virtual const ZStreamU& GetStreamU() { return fStream; }
00562
00563
00564 virtual const ZStreamRPos& GetStreamRPos() { return fStream; }
00565
00566
00567 virtual const ZStreamW& GetStreamW() { return fStream; }
00568
00569
00570 virtual const ZStreamWPos& GetStreamWPos() { return fStream; }
00571
00572
00573 virtual const ZStreamRWPos& GetStreamRWPos() { return fStream; }
00574
00575
00576 Stream_t& GetStream() { return fStream; }
00577
00578 protected:
00579 Stream_t fStream;
00580 };
00581
00582
00583 #pragma mark -
00584 #pragma mark * ZStreamerRWPos_FT
00585
00586 template <class Stream_t>
00587 class ZStreamerRWPos_FT : public ZStreamerRWPos
00588 {
00589 protected:
00590 ZStreamerRWPos_FT() {}
00591
00592 public:
00593 virtual ~ZStreamerRWPos_FT() {}
00594
00595 template <class P>
00596 ZStreamerRWPos_FT(P& iParam, ZRef<ZStreamerRWPos> iStreamer)
00597 : fStreamerReal(iStreamer),
00598 fStream(iParam, iStreamer->GetStreamRWPos())
00599 {}
00600
00601 template <class P>
00602 ZStreamerRWPos_FT(const P& iParam, ZRef<ZStreamerRWPos> iStreamer)
00603 : fStreamerReal(iStreamer),
00604 fStream(iParam, iStreamer->GetStreamRWPos())
00605 {}
00606
00607 ZStreamerRWPos_FT(ZRef<ZStreamerRWPos> iStreamer)
00608 : fStreamerReal(iStreamer),
00609 fStream(iStreamer->GetStreamRWPos())
00610 {}
00611
00612
00613 virtual const ZStreamR& GetStreamR() { return fStream; }
00614
00615
00616 virtual const ZStreamU& GetStreamU() { return fStream; }
00617
00618
00619 virtual const ZStreamRPos& GetStreamRPos() { return fStream; }
00620
00621
00622 virtual const ZStreamW& GetStreamW() { return fStream; }
00623
00624
00625 virtual const ZStreamWPos& GetStreamWPos() { return fStream; }
00626
00627
00628 virtual const ZStreamRWPos& GetStreamRWPos() { return fStream; }
00629
00630
00631 ZRef<ZStreamerRWPos> GetStreamerRWPos() { return fStreamerReal; }
00632
00633 Stream_t& GetStream() { return fStream; }
00634
00635 protected:
00636 ZRef<ZStreamerRWPos> fStreamerReal;
00637 Stream_t fStream;
00638 };
00639
00640
00641 #pragma mark -
00642 #pragma mark * ZStreamR_Streamer
00643
00644 class ZStreamR_Streamer : public ZStreamR
00645 {
00646 public:
00647 ZStreamR_Streamer(ZRef<ZStreamerR> iStreamer);
00648 ~ZStreamR_Streamer();
00649
00650
00651 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00652
00653 virtual void Imp_CopyToDispatch(const ZStreamW& iStreamW, uint64 iCount,
00654 uint64* oCountRead, uint64* oCountWritten);
00655
00656 virtual void Imp_CopyTo(const ZStreamW& iStreamW, uint64 iCount,
00657 uint64* oCountRead, uint64* oCountWritten);
00658
00659 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00660
00661 private:
00662 ZRef<ZStreamerR> fStreamer;
00663 };
00664
00665
00666 #pragma mark -
00667 #pragma mark * ZStreamU_Streamer
00668
00669 class ZStreamU_Streamer : public ZStreamU
00670 {
00671 public:
00672 ZStreamU_Streamer(ZRef<ZStreamerU> iStreamer);
00673 ~ZStreamU_Streamer();
00674
00675
00676 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00677
00678 virtual void Imp_CopyToDispatch(const ZStreamW& iStreamW, uint64 iCount,
00679 uint64* oCountRead, uint64* oCountWritten);
00680
00681 virtual void Imp_CopyTo(const ZStreamW& iStreamW, uint64 iCount,
00682 uint64* oCountRead, uint64* oCountWritten);
00683
00684 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00685
00686
00687 virtual void Imp_Unread();
00688
00689 private:
00690 ZRef<ZStreamerU> fStreamer;
00691 };
00692
00693
00694 #pragma mark -
00695 #pragma mark * ZStreamRPos_Streamer
00696
00697 class ZStreamRPos_Streamer : public ZStreamRPos
00698 {
00699 public:
00700 ZStreamRPos_Streamer(ZRef<ZStreamerRPos> iStreamer);
00701 ~ZStreamRPos_Streamer();
00702
00703
00704 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00705
00706 virtual void Imp_CopyToDispatch(const ZStreamW& iStreamW, uint64 iCount,
00707 uint64* oCountRead, uint64* oCountWritten);
00708
00709 virtual void Imp_CopyTo(const ZStreamW& iStreamW, uint64 iCount,
00710 uint64* oCountRead, uint64* oCountWritten);
00711
00712 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00713
00714
00715 virtual uint64 Imp_GetPosition();
00716 virtual void Imp_SetPosition(uint64 iPosition);
00717
00718 virtual uint64 Imp_GetSize();
00719
00720 private:
00721 ZRef<ZStreamerRPos> fStreamer;
00722 };
00723
00724
00725 #pragma mark -
00726 #pragma mark * ZStreamW_Streamer
00727
00728 class ZStreamW_Streamer : public ZStreamW
00729 {
00730 public:
00731 ZStreamW_Streamer(ZRef<ZStreamerW> iStreamer);
00732 ~ZStreamW_Streamer();
00733
00734
00735 virtual void Imp_Write(const void* iSource, size_t iCount, size_t* oCountWritten);
00736
00737 virtual void Imp_CopyFromDispatch(const ZStreamR& iStreamR, uint64 iCount,
00738 uint64* oCountRead, uint64* oCountWritten);
00739
00740 virtual void Imp_CopyFrom(const ZStreamR& iStreamR, uint64 iCount,
00741 uint64* oCountRead, uint64* oCountWritten);
00742
00743 virtual void Imp_Flush();
00744
00745 private:
00746 ZRef<ZStreamerW> fStreamer;
00747 };
00748
00749
00750 #pragma mark -
00751 #pragma mark * ZStreamWPos_Streamer
00752
00753 class ZStreamWPos_Streamer : public ZStreamWPos
00754 {
00755 public:
00756 ZStreamWPos_Streamer(ZRef<ZStreamerWPos> iStreamer);
00757 ~ZStreamWPos_Streamer();
00758
00759
00760 virtual void Imp_Write(const void* iSource, size_t iCount, size_t* oCountWritten);
00761
00762 virtual void Imp_CopyFromDispatch(const ZStreamR& iStreamR, uint64 iCount,
00763 uint64* oCountRead, uint64* oCountWritten);
00764
00765 virtual void Imp_CopyFrom(const ZStreamR& iStreamR, uint64 iCount,
00766 uint64* oCountRead, uint64* oCountWritten);
00767
00768 virtual void Imp_Flush();
00769
00770
00771 virtual uint64 Imp_GetPosition();
00772 virtual void Imp_SetPosition(uint64 iPosition);
00773
00774 virtual uint64 Imp_GetSize();
00775 virtual void Imp_SetSize(uint64 iSize);
00776
00777 private:
00778 ZRef<ZStreamerWPos> fStreamer;
00779 };
00780
00781
00782 #pragma mark -
00783 #pragma mark * ZStreamRWPos_Streamer
00784
00785 class ZStreamRWPos_Streamer : public ZStreamRWPos
00786 {
00787 public:
00788 ZStreamRWPos_Streamer(ZRef<ZStreamerRWPos> iStreamer);
00789 ~ZStreamRWPos_Streamer();
00790
00791
00792 virtual void Imp_Read(void* iDest, size_t iCount, size_t* oCountRead);
00793
00794 virtual void Imp_CopyToDispatch(const ZStreamW& iStreamW, uint64 iCount,
00795 uint64* oCountRead, uint64* oCountWritten);
00796
00797 virtual void Imp_CopyTo(const ZStreamW& iStreamW, uint64 iCount,
00798 uint64* oCountRead, uint64* oCountWritten);
00799
00800 virtual void Imp_Skip(uint64 iCount, uint64* oCountSkipped);
00801
00802
00803 virtual void Imp_Write(const void* iSource, size_t iCount, size_t* oCountWritten);
00804
00805 virtual void Imp_CopyFromDispatch(const ZStreamR& iStreamR, uint64 iCount,
00806 uint64* oCountRead, uint64* oCountWritten);
00807
00808 virtual void Imp_CopyFrom(const ZStreamR& iStreamR, uint64 iCount,
00809 uint64* oCountRead, uint64* oCountWritten);
00810
00811
00812 virtual uint64 Imp_GetPosition();
00813 virtual void Imp_SetPosition(uint64 iPosition);
00814
00815 virtual uint64 Imp_GetSize();
00816
00817
00818 virtual void Imp_SetSize(uint64 iSize);
00819
00820
00821 ZRef<ZStreamerRWPos> GetStreamer()
00822 { return fStreamer; }
00823
00824 void SetStreamer(ZRef<ZStreamerRWPos> iStreamer)
00825 { fStreamer = iStreamer; }
00826 private:
00827 ZRef<ZStreamerRWPos> fStreamer;
00828 };
00829
00830
00831 #pragma mark -
00832 #pragma mark * ZStreamerRW_Wrapper
00833
00835
00836 class ZStreamerRW_Wrapper : public ZStreamerRW
00837 {
00838 public:
00839 ZStreamerRW_Wrapper(ZRef<ZStreamerR> iStreamerR, ZRef<ZStreamerW> iStreamerW);
00840 virtual ~ZStreamerRW_Wrapper();
00841
00842
00843 virtual const ZStreamR& GetStreamR();
00844
00845
00846 virtual const ZStreamW& GetStreamW();
00847
00848
00849 ZRef<ZStreamerR> GetStreamerR();
00850 ZRef<ZStreamerW> GetStreamerW();
00851
00852 protected:
00853 ZRef<ZStreamerR> fStreamerR;
00854 const ZStreamR& fStreamR;
00855 ZRef<ZStreamerW> fStreamerW;
00856 const ZStreamW& fStreamW;
00857 };
00858
00859
00860 #pragma mark -
00861 #pragma mark * ZStreamerR_Stream
00862
00868 class ZStreamerR_Stream : public ZStreamerR
00869 {
00870 public:
00871 ZStreamerR_Stream(const ZStreamR& iStreamR)
00872 : fStreamR(iStreamR)
00873 {}
00874
00875
00876 virtual const ZStreamR& GetStreamR() { return fStreamR; }
00877
00878 protected:
00879 const ZStreamR& fStreamR;
00880 };
00881
00882
00883 #pragma mark -
00884 #pragma mark * ZStreamerW_Stream
00885
00891 class ZStreamerW_Stream : public ZStreamerW
00892 {
00893 public:
00894 ZStreamerW_Stream(const ZStreamW& iStreamW)
00895 : fStreamW(iStreamW)
00896 {}
00897
00898
00899 virtual const ZStreamW& GetStreamW() { return fStreamW; }
00900
00901 protected:
00902 const ZStreamW& fStreamW;
00903 };
00904
00905
00906 #pragma mark -
00907 #pragma mark * ZStreamerRWFactory
00908
00909 class ZStreamerRWFactory : public ZRefCountedWithFinalization
00910 {
00911 protected:
00912 ZStreamerRWFactory();
00913 virtual ~ZStreamerRWFactory();
00914
00915 public:
00916 virtual ZRef<ZStreamerRW> MakeStreamerRW() = 0;
00917 };
00918
00919 #endif // __ZStreamer__