Added methods AddToMessage() and SetFromMessage() to add the value of the

variant as a field to a message, respectively initialize the variant from
one.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33901 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2009-11-05 17:24:58 +00:00
parent 6309d64e37
commit be350af3d9
2 changed files with 68 additions and 0 deletions
+8
View File
@@ -19,6 +19,9 @@ enum {
};
class BMessage;
class BVariant {
public:
inline BVariant();
@@ -95,6 +98,11 @@ public:
// has effect only on scalar types (pointer
// counting as scalar, not string, though)
status_t AddToMessage(BMessage& message,
const char* fieldName) const;
status_t SetFromMessage(const BMessage& message,
const char* fieldName);
static size_t SizeOfType(type_code type);
static bool TypeIsNumber(type_code type);
static bool TypeIsInteger(type_code type,