/*
 * short_buffer.h
 *
 *  Created on: 09.03.2011
 *      Author: uwe
 */

#ifndef SHORT_BUFFER_H_
#define SHORT_BUFFER_H_

#include <stdlib.h>
#include "MPT_Exception.h"

namespace MobilePhotoTool{
	class short_buffer {
	public:
		int width;
		int length;
		int linestride;

		unsigned short *delete_buffer;
		unsigned short *buffer;

		short_buffer(MPT_Exception *exception, int width, int length, int extra_size);

		unsigned short *get_Row(int row);

		virtual ~short_buffer();
	};

	class int_buffer {
	public:
		int width;
		int length;
		int linestride;

		int *delete_buffer;
		int *buffer;

		int_buffer(MPT_Exception *exception, int width, int length, int extra_size);

		int *get_Row(int row);

		virtual ~int_buffer();
	};

	class uchar_buffer {
	public:
		int width;
		int length;
		int linestride;

		unsigned char *delete_buffer;
		unsigned char *buffer;

		uchar_buffer(MPT_Exception *exception, int width, int length, int extra_size);

		unsigned char *get_Row(int row);

		virtual ~uchar_buffer();
	};
}

#endif /* SHORT_BUFFER_H_ */
