bytebuffer.h
// Copyright (c) 2002 David Muse
// See the COPYING file for more information.
#ifndef RUDIMENTS_BYTEBUFFER_H
#define RUDIMENTS_BYTEBUFFER_H
#include <rudiments/private/bytebufferincludes.h>
class bytebufferprivate;
class RUDIMENTS_DLLSPEC bytebuffer {
public:
bytebuffer();
bytebuffer(size_t initialsize, size_t increment);
bytebuffer(unsigned char *initialcontents,
size_t initialsize, size_t increment);
bytebuffer(const bytebuffer &v);
bytebuffer &operator=(const bytebuffer &v);
virtual ~bytebuffer();
void setPosition(size_t pos);
size_t getPosition();
bytebuffer *write(const unsigned char *data, size_t size);
bytebuffer *write(const char *string);
bytebuffer *write(const char *string, size_t size);
bytebuffer *write(char character);
bytebuffer *write(int16_t number);
bytebuffer *write(int32_t number);
bytebuffer *write(int64_t number);
bytebuffer *write(unsigned char character);
bytebuffer *write(uint16_t number);
bytebuffer *write(uint32_t number);
bytebuffer *write(uint64_t number);
bytebuffer *write(float number);
bytebuffer *write(double number);
bytebuffer *writeFormatted(const char *format, ...);
bytebuffer *writeFormatted(const char *format,
va_list *argp);
bytebuffer *append(const unsigned char *data, size_t size);
bytebuffer *append(const char *string);
bytebuffer *append(const char *string, size_t size);
bytebuffer *append(char character);
bytebuffer *append(int16_t number);
bytebuffer *append(int32_t number);
bytebuffer *append(int64_t number);
bytebuffer *append(unsigned char character);
bytebuffer *append(uint16_t number);
bytebuffer *append(uint32_t number);
bytebuffer *append(uint64_t number);
bytebuffer *append(float number);
bytebuffer *append(double number);
bytebuffer *appendFormatted(const char *format, ...);
bytebuffer *appendFormatted(const char *format,
va_list *argp);
virtual void truncate(size_t pos);
virtual void truncate();
ssize_t read(unsigned char *data, size_t size);
void clear();
const unsigned char *getBuffer();
size_t getSize();
size_t getEnd();
size_t getActualSize();
unsigned char *detachBuffer();
#include <rudiments/private/bytebuffer.h>
};
#endif
character
Definition: character.h:11
bytebuffer
Definition: bytebuffer.h:21