|
Boost : |
From: Robert Ramey (ramey_at_[hidden])
Date: 2005-10-09 16:15:44
Attached is a sketch of what I have in mind. It does compile without
error on VC 7.1
With this approach you would make one fast_oarchive adaptor class
and one small and trivial *.hpp file for each archive it is adapted to. So
that
Robert Ramey
Matthias Troyer wrote:
> On Oct 9, 2005, at 7:36 PM, Robert Ramey wrote:
>>
>> I believe:
>>
>> a) that by using derivation similar to demo_fast_archive you can
>> achieve
>> all the goals you desire without modification of the library itself.
>> b) that this approach will result in smallest amount of additional
>> coding
>> effort.
>> c) that the result will be applicable to current and future archives
>> without
>> any other coding changes.
>
> Sorry, but I still do not see how this can avoid an MxN problem,
> since for each of M archive class I will need to overload the
> serialization of N classes. Maybe I am just not seeing a trick that
> you have in mind, but I would think that I
>
> - need to overload the serialization for all N classes (array,
> vector, valarray, .....) for the demo_fast_archive.
> - again overload the serialization for all N classes for the fast
> portable binary archive
> - again overload the serialization for all N classes for the MPI
> archive
> - again overload the serialization for all N classes for the
> polymorphic archives
> and so on...
>
> Can you tell me what I'm missing here?
>
> Matthias
>
>
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
begin 666 fast_oarchive.hpp.cpp
M+R\@9F%S=%]O87)C:&EV92YH<' -"@T*+R\@861A<'1O<B!T96UP;&%T92!T
M;R!C:&%N9V4_at_86YY(&%R8VAI=F4_at_8VQA<W,@:6YT;R!A(&9A<W0_at_87)C:&EV
M92!C;&%S<PT*#0HC:6YC;'5D92 \=F5C=&]R/@T*(VEN8VQU9&4@/&]S=')E
M86T^#0H-"B-I;F-L=61E(#QB;V]S="]P9G1O+FAP<#X-"B-I;F-L=61E(#QB
M;V]S="]S=&%T:6-?87-S97)T+FAP<#X-"@T*;F%M97-P86-E(&)O;W-T('L-
M"FYA;65S<&%C92!A<F-H:79E('L-"@T*=&5M<&QA=&4\8VQA<W,@0F%S93X-
M"F-L87-S(&9A<W1?;V%R8VAI=F5?:6UP;" Z#0H@(" @<'5B;&EC($)A<V4-
M"GL-"B @("!T>7!E9&5F(&9A<W1?;V%R8VAI=F5?:6UP;#Q"87-E/B!D97)I
M=F5D7W0[#0HC:68@," O+T)/3U-47TY/7TU%34)%4E]414U03$%415]&4DE%
M3D13("T_at_17AE<F-I<V4_at_9F]R('1H92!R96%D97(-"B @("!F<FEE;F0_at_8VQA
M<W,@8F]O<W0Z.F%R8VAI=F4Z.F1E=&%I;#HZ:6YT97)F86-E7V]A<F-H:79E
M/&1E<FEV961?=#X[#0H@(" @9G)I96YD(&-L87-S(&)A<VEC7V)I;F%R>5]O
M87)C:&EV93QD97)I=F5D7W0^.PT*(" @(&9R:65N9"!C;&%S<R!B87-I8U]B
M:6YA<GE?;W!R:6UI=&EV93QD97)I=F5D7W0L('-T9#HZ;W-T<F5A;3X[#0H@
M(" @9G)I96YD(&-L87-S(&)O;W-T.CIA<F-H:79E.CIS879E7V%C8V5S<SL-
M"B-E;'-E#0IP=6)L:6,Z#0HC96YD:68-"B @(" O+R!F86QL('1H<F]U9V@@
M=&\@0F%S92!F;W(@86YY(&]V97)R:61E<R!N;W0@<W!E8VEF:65D(&AE<F4-
M"B @("!T96UP;&%T93QC;&%S<R!4/@T*(" @('9O:60@<V%V95]O=F5R<FED
M92A4("8@="P_at_0D]/4U1?4$943R!I;G0I>PT*(" @(" @("!"87-E.CIS879E
M7V]V97)R:61E*'0L(# I.PT*(" @('T-"B @(" O+R!C=7-T;VT@<W!E8VEA
M;&EZ871I;VYS#0H@(" @=F]I9"!S879E7V]V97)R:61E*&-O;G-T('-T9#HZ
M=F5C=&]R/&EN=#X@)B!T+"!I;G0I>PT*(" @(" @("!S879E7V)I;F%R>2AT
M+"!S:7IE;V8H:6YT*2 J('0N<VEZ92_at_I*3L-"B @("!]#0H@(" @=F]I9"!S
M879E7V]V97)R:61E*&-O;G-T('-T9#HZ=F5C=&]R/&1O=6)L93X@)B!T+"!I
M;G0I>PT*(" @(" @("!S879E7V)I;F%R>2AT+"!S:7IE;V8H9&]U8FQE*2 J
M('0N<VEZ92_at_I*3L-"B @("!]#0H@(" @+R\@+BXN#0H-"B @(" O+R!H97)E
M)W,@82!W87D@=&\@9&\@:70_at_9F]R(&%L;"!V96-T;W)S(&EN(&]N92!S:&]T
M"0T*(" @('1E;7!L871E/&-L87-S(%0^#0H@(" @=F]I9"!S879E7V]V97)R
M:61E*&-O;G-T('-T9#HZ=F5C=&]R/%0^("8@="P@:6YT*7L-"B @(" @(" @
M<V%V95]B:6YA<GDH="P@<VEZ96]F*%0I("H@="YS:7IE*"DI.PT*(" @(" @
M(" O+R!T:&ES('9E<G-I;VX@;F]T(&-E<G1I9FEE9"!F;W(@;6]R92!C;VUP
M;&5X('1Y<&5S("$A(0T*(" @(" @("!"3T]35%]35$%424-?05-315)4*&)O
M;W-T.CII<U]P<FEM:71I=F4\5#XZ.G9A;'5E*3L-"B @(" @(" @+R\@;W(@
M<&]I;G1E<G,@96ET:&5R("$A(0T*(" @(" @("!"3T]35%]35$%424-?05-3
M15)4*&)O;W-T.CII<U]P;VEN=&5R/%0^.CIV86QU92D[#0H@(" @?0T*<'5B
M;&EC._at_T*(" @(&9A<W1?;V%R8VAI=F5?:6UP;"AS=&0Z.F]S=')E86T@)B!O
M<RP@=6YS:6=N960_at_9FQA9W,@/2 P*2 Z#0H@(" @(" @($)A<V4H;W,L(&9L
M86=S*0T*(" @('M]#0I].PT*#0I]?0T*#0HO+R!N;W<@;6%K92!A('-M86QL
M(&9I;&4_at_9F]R(&5A8V@@87!P;&EC871I;VX@#0HO+R!O9B!T:&4_at_861A<'1O
M<BX_at_5&AI<R!F:6QE('=I;&P_at_8V]N=&%I;B!T:&4_at_9F]L;&]W:6YG#0H-"B\O
M(&9A<W1?=&5X=%]O87)C:&EV92YH<' -"@T*+R\@(VEN8VQU9&4_at_9F%S=%]O
M87)C:&EV92YH<' -"B-I;F-L=61E(#QB;V]S="]A<F-H:79E+W1E>'1?;V%R
M8VAI=F4N:'!P/@T*#0HO+R!U;F9O<G1U;F%T96Q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"B\O("XN+@T*#0H`
`
end
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk