haiku/src/kits/app/MessageField.cpp
ejakowatz b1055b4c2d This is all the code for the backing store for BMessage (BMessageBody &
BMessageField) for the "template madness" version.  Also included is
BDataBuffer which is a little reference counting raw data container.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2955 a95241bf-73f2-0310-859d-f6bbb57e9c96
2003-03-19 07:58:17 +00:00

51 lines
1.3 KiB
C++

//------------------------------------------------------------------------------
// MessageField.cpp
//
//------------------------------------------------------------------------------
// Standard Includes -----------------------------------------------------------
// System Includes -------------------------------------------------------------
#include <ByteOrder.h>
// Project Includes ------------------------------------------------------------
#include "MessageField.h"
// Local Includes --------------------------------------------------------------
// Local Defines ---------------------------------------------------------------
// Globals ---------------------------------------------------------------------
namespace BPrivate {
const char* BMessageField::sNullData = "\0\0\0\0\0\0\0\0";
//------------------------------------------------------------------------------
void BMessageField::PrintToStream(const char* name) const
{
int32 type = B_BENDIAN_TO_HOST_INT32(Type());
printf(" entry %14s, type='%.4s', c=%2ld, ",
name, (char*)&type, CountItems());
for (int32 i = 0; i < CountItems(); ++i)
{
if (i)
{
printf(" ");
}
PrintDataItem(i);
}
}
//------------------------------------------------------------------------------
} // namespace BPrivate
/*
* $Log $
*
* $Id $
*
*/