class c4_Bytes

Generic data buffer, with optional automatic clean up.

Public:

c4_Bytes ();
Constructs an empty binary object.
c4_Bytes (const void* buffer_, int length_);
Constructs an object with contents, no copy.
c4_Bytes (const void* buffer_, int length_, bool makeCopy_);
Constructs an object with contents, optionally as a copy.
c4_Bytes (const c4_Bytes& bytes_);
Copy constructor.
~c4_Bytes ();

c4_Bytes& operator= (const c4_Bytes& bytes_);
Assignment, this may make a private copy of contents.
void Swap (c4_Bytes& bytes_);
Swaps the contents and ownership of two byte objects.
int Size () const;
Returns the number of bytes of its contents.
const t4_byte* Contents () const;
Returns a pointer to the contents.
t4_byte* SetBuffer (int length_);
Defines contents as a freshly allocated buffer of given size.
t4_byte* SetBufferClear (int length_);
Allocates a buffer and fills its contents with zero bytes.
Friends:

friend bool operator== (const c4_Bytes& a_, const c4_Bytes& b_);
Returns true if the contents of both objects are equal.
friend bool operator!= (const c4_Bytes& a_, const c4_Bytes& b_);
Returns true if the contents of both objects are not equal.


#include "k4view.h"   // Jun 8, 1997