[Box Backup-dev] COMMIT r348 - in box/chris/bb-save-state: . bin/bbackupd lib/common lib/server
Ben Summers
boxbackup-dev at fluffy.co.uk
Mon Jan 30 20:17:25 GMT 2006
On 30 Jan 2006, at 20:02, Gary wrote:
> Just some (loose) thoughts...
>
>> OK, I've done something similar (entirely replaced Get() and Add()
>> with
>> Read() and Write()) in the bb-save-state branch. I removed all
>> operator
>> overloading.
>
> Well, the whole purpose of the Archive class with operator
> overloading and multiple type-dependent
> store/retrieve calls was to simplify the main body of code
> (functionality implementation) as much
> as possible. Once those are gone, the whole Archive class should go
> as well, as there is no reason
> for it to exist anymore.
Sorry.
>
>>> Also, in my experience, defining virtual functions inline in header
>>> files causes problems with compilers. I'm sure MSVC has been
>>> fixed now,
>>> but still... :-)
>
>> From my experience, a vtable (polymorphic) call is always
>> guaranteed, unless the compiler can
> figure out that it is not possible for an object can be polymorphic
> (no derivations exist, or a
> local stack variable, or RTTI disabled in complier settings, etc.),
> in which case it can inline to
> speed up processing. I think it works correctly under any compiler
> I have encountered, but I
> certainly understand that it's best to be on the safe side, when it
> comes to such a cross-platform
> project.
The problems I encountered were when the compiler got confused about
generating functions for vtables, and kind of doing a mix between
inline and virtual functions. It wasn't amusing.
Ben
More information about the Boxbackup-dev
mailing list