basis::byte_array Class Reference

A very common template for a dynamic array of bytes. More...

#include <byte_array.h>

Inheritance diagram for basis::byte_array:
Inheritance graph
[legend]
Collaboration diagram for basis::byte_array:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 byte_array (int number=0, const abyte *initial_contents=NIL)
 constructs an array of "number" bytes from "initial_contents".
 byte_array (const byte_array &to_copy)
 constructs an array bytes by copying the "to_copy" array.
 byte_array (const array< abyte > &to_copy)
 constructs an array bytes by copying the "to_copy" array.
virtual ~byte_array ()
 DEFINE_CLASS_NAME ("byte_array")
 returns an array of zero bytes.
virtual bool equal_to (const equalizable &s2) const
virtual bool less_than (const orderable &s2) const
int comparator (const byte_array &s2) const

Static Public Member Functions

static const byte_arrayempty_array ()

Detailed Description

A very common template for a dynamic array of bytes.

byte_array provides a simple wrapper around array<byte>, but with the exponential growth and simple copy modes automatically enabled. Note that it is almost always best to forward declare byte_arrays in ones own headers rather than including this header.

Definition at line 35 of file byte_array.h.


Constructor & Destructor Documentation

basis::byte_array::byte_array ( int  number = 0,
const abyte initial_contents = NIL 
) [inline]

constructs an array of "number" bytes from "initial_contents".

Definition at line 38 of file byte_array.h.

basis::byte_array::byte_array ( const byte_array to_copy  )  [inline]

constructs an array bytes by copying the "to_copy" array.

Definition at line 42 of file byte_array.h.

basis::byte_array::byte_array ( const array< abyte > &  to_copy  )  [inline]

constructs an array bytes by copying the "to_copy" array.

Definition at line 46 of file byte_array.h.

virtual basis::byte_array::~byte_array (  )  [inline, virtual]

Definition at line 49 of file byte_array.h.


Member Function Documentation

int basis::byte_array::comparator ( const byte_array s2  )  const [inline]
basis::byte_array::DEFINE_CLASS_NAME ( "byte_array"   ) 

returns an array of zero bytes.

note that this is implemented in the opsystem library to avoid bad issues with static objects mixed into multiple dlls from a static library.

static const byte_array& basis::byte_array::empty_array (  )  [inline, static]

Definition at line 57 of file byte_array.h.

virtual bool basis::byte_array::equal_to ( const equalizable s2  )  const [inline, virtual]

Implements basis::equalizable.

Definition at line 61 of file byte_array.h.

References comparator().

virtual bool basis::byte_array::less_than ( const orderable s2  )  const [inline, virtual]

Implements basis::orderable.

Definition at line 66 of file byte_array.h.

References comparator().


The documentation for this class was generated from the following file:
Generated on Sat Jan 28 04:25:21 2012 for hoople2 project by  doxygen 1.6.3