class c4_Bytes

Generic data buffer, with optional automatic clean up.

Public members
c4_Bytes ();
Construct an empty binary object
c4_Bytes (const void* buffer_, int length_);
Construct an object with contents, no copy
c4_Bytes (const void* buffer_, int length_, bool makeCopy_);
Construct an object with contents, optionally as a copy
c4_Bytes (const c4_Bytes& bytes_);
Copy constructor
~c4_Bytes ();
Destructor
c4_Bytes& operator= (const c4_Bytes& bytes_);
Assignment, this may make a private copy of contents
void Swap (c4_Bytes& bytes_);
Swap the contents and ownership of two byte objects
int Size () const;
Return the number of bytes of its contents
const t4_byte* Contents () const;
Return a pointer to the contents
t4_byte* SetBuffer (int length_);
Define contents as a freshly allocated buffer of given size
t4_byte* SetBufferClear (int length_);
Allocate a buffer and fills its contents with zero bytes
Friends
friend bool operator== (const c4_Bytes& a_, const c4_Bytes& b_);
Return true if the contents of both objects are equal
friend bool operator!= (const c4_Bytes& a_, const c4_Bytes& b_);
Return true if the contents of both objects are not equal


Header file "mk4.h"   --   Dec 9, 1999