Re: [Nutshell-devel] Basic class information : Byte Arrays
Status: Planning
Brought to you by:
alexandream
|
From: Rodrigo C. <rc...@gm...> - 2006-08-26 15:23:44
|
>
> ByteArray is an abstract class, it has a few methods implemented, but
> cannot be instantiated.
> what it does is to give a common interface to access things that wraps a
> byte array (char *). This can be used to aid in the serialization of many
> data types.
>
> ByteArray
> public:
> const char& operator[](int index) const;
> char& operator[](int index);
> int getCapacity();
> void copyFrom(const ByteArray& source, int srcIndex, int dstIndex, int
> size);
> private:
> char& fetchCharacter(int index); // a wrapper to common functionality
> shared
> // by both [] operators.
> ByteArray(char * wrappedData, int capacity);
>
Wait a moment, this constructor is really to be private?
OTOH I don't see a default constructor (as this one is private), did you
miss this or was intentional?
virtual ~ByteArray();
> protected:
> int capacity;
> char* data;
> --
>
>
--=20
Abra=E7os,
Rodrigo
|