Added BMessage::Append(), and new(std::nothrow_t).

* Append() copies all fields from the specified message.
* The nothrow operator new allows you to add BMessages to a BObjectList.
This commit is contained in:
Axel Dörfler
2012-11-02 23:42:29 +01:00
parent 1d910b5e2b
commit 009fd25715
2 changed files with 44 additions and 4 deletions
+6 -1
View File
@@ -1,5 +1,5 @@
/*
* Copyright 2005-2010, Haiku Inc. All Rights Reserved.
* Copyright 2005-2012, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*
* Authors:
@@ -9,6 +9,8 @@
#define _MESSAGE_H
#include <new>
#include <BeBuild.h>
#include <DataIO.h>
#include <Flattenable.h>
@@ -146,6 +148,8 @@ class BMessage {
const void *data, ssize_t numBytes,
bool isFixedSize = true, int32 count = 1);
status_t Append(const BMessage &message);
// Removing data
status_t RemoveData(const char *name, int32 index = 0);
status_t RemoveName(const char *name);
@@ -268,6 +272,7 @@ class BMessage {
void *operator new(size_t size);
void *operator new(size_t, void *pointer);
void *operator new(size_t, const std::nothrow_t &noThrow);
void operator delete(void *pointer, size_t size);
// Private, reserved, or obsolete