Patch by Alex Wilson (minor changes by myself) related to the new archiving
features:
* Some cosmetic adjustments of the API, like using references instead of
pointers, argument order, method names, etc.
* Added convenience template methods for archiving and unarchiving to BArchiver
and BUnarchiver.
* BUnarchiver (respectively the private BUnarchiveManager) explicitly deals with
object ownership, now. This is necessary since an error while unarchiving
could leave an already unarchived object without owning object, which would
result in it being leaked. The BUnarchiver::{Get,Find}Object() methods do now
have an optional parameter to specify whether object ownership shall be
transferred.
* Fixed incorrect header guard in headers/private/binary_compatibility/Global.h.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37538 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -54,11 +54,11 @@ public:
|
||||
|
||||
virtual status_t Archive(BMessage* into, bool deep = true) const;
|
||||
virtual status_t AllUnarchived(const BMessage* from);
|
||||
virtual status_t ArchiveLayoutData(BMessage* into,
|
||||
const BLayoutItem* of) const;
|
||||
virtual status_t RestoreItemAndData(const BMessage* from,
|
||||
BLayoutItem* item);
|
||||
|
||||
virtual status_t ItemArchived(BMessage* into, BLayoutItem* item,
|
||||
int32 index) const;
|
||||
virtual status_t ItemUnarchived(const BMessage* from,
|
||||
BLayoutItem* item, int32 index);
|
||||
protected:
|
||||
// TODO: Since memory allocations can fail, we should return a bool and
|
||||
// undo the addition, if false.
|
||||
|
||||
Reference in New Issue
Block a user