 /*File Name: PicturMatrix.cpp
  Author: Betti Österholz ; Date: 25.08.2003
  System: C++
  
*/

#include "PicturMatrix.h"


PicturMatrix::PicturMatrix()
//standart constructor constructs a blank object
{
Background=new Color(1);
}

PicturMatrix::PicturMatrix(unsigned long* sz,unsigned int ncc,unsigned int* dep)
//parameter constructor
//constructs a matrix sz great with everywher 0 pointer(no entry)
//pre: the size sz the new matrix should have
//  the number of components of the color vectors and the depth of
//  each of this components
{
Background=new Color(1);
}

PicturMatrix::PicturMatrix(const PicturMatrix& matrx,bool copy=true)
//if copy is true constructs a object with the same values as the given
//else constructs a object with the same values but the Matrix values/Color pointers are all set to 0
{
Background=new Color(1);
}

PicturMatrix::PicturMatrix(char* file)
//load constructor
//constructs a object with the values as the given fram a file
{
Background=new Color(1);
}

PicturMatrix::~PicturMatrix()
//destructor
{
delete Background;
}

unsigned long* PicturMatrix::getSize() const
//returns the size of the Matrix
//post: the unsigned int[4] array of the size
{
unsigned long *sz=new unsigned long[4];
for (int a=0;a<4;a++)
	sz[a]=10;
return sz;
}

bool PicturMatrix::setColorOnPosition(unsigned long* pos,Color col)
//insert on the position ps in the Matrix a copy of the given color
//object col, the eventuell old Color object on this position is deleted
//if no ReferenceColor is defined it set also the ReferenceColor to
//the same type as the given Color object col
//pre: the Color col to insert an the position pos to insert
{
return true;
}

void PicturMatrix::overlap(PicturMatrix matrix)
//if in the given matrix is on a position a Color Object a copy
//of this is insert on the same Position in the Matrix of this Object
//if on this position is a 0 pointer and the position exsists(lower
//Size)
//pre: the PicturMatrix matrix to insert with this Pictur matrix oferlapping
{
}

bool PicturMatrix::load(char* file)
//load a pictur Matrix from the file with name file
//pre: the name of the file to load the PicturMatrix from
{
return true;
}

bool PicturMatrix::store(char* file)
//store this pictur Matrix to the file with name file
//pre: the name of the file to load the PicturMatrix from
{
return true;
}

unsigned long PicturMatrix::distanceTo(PicturMatrix matrix) const
//evaluate the distance from the given PicturMatrix matrix
//pre: the PicturMatrix to evaluate the distance from this PicturMatrix
//post: a unsigned long number for the distance
{
return 0;
}

unsigned long PicturMatrix::distanceOfArea(PicturMatrix matrix, unsigned long* from, unsigned long* to) const
//evaluate the distance from the given PicturMatrix matrix in the area
//from to to(inclusiv to)
//pre: the PicturMatrix to evaluate the distance from this PicturMatrix,
//  the lower bound from and upper bound to of the area
//post: a unsigned long number for the distance
{
return 0;
}

void PicturMatrix::resize(unsigned long* nsize)
//resize the Matrix to the new size nsize
//pre: the new size of of the object nsize
{
}


void PicturMatrix::clear()
//clears the matrix; deletes all Color Objects in it
//post: a blank Matrix
{
}

bool PicturMatrix::loadBitmap(char* file)
//load a pictur Matrix from the bitmap pictur file with name file
//pre: the name of the bitmap pictur file to load the PicturMatrix from
{
return true;
}





bool PicturMatrix::saveBitmap(char* file) const
//store this pictur Matrix to the bitmap pictur file with name file
//pre: the name of the bitmap pictur file to store this PicturMatrix to
{
return true;
}


unsigned int PicturMatrix::readint(ifstream *stream,unsigned short byte) const
//reads a value with byte bytes from the stream and returns his integer value
//pre: the ifstream stream to read from and the number of bytes byte to read
//post: the readed value
{
return 0;
}

void PicturMatrix::writeint(ofstream *stream,unsigned short byte,int write) const
//writes the value of write with byte bytes to the stream stream
//pre: the value write to write, how much byte byte write should use and the stream to write to
//post: the value of write with byte bytes in the stream stream
{
}

bool PicturMatrix::load_btx(char* file)
//load a saved btx(own format)
//post: the data of the btx file in this Matrix
{
return true;
}


int PicturMatrix::charToInt(char c)
//makes the char c to a integer number
//pre: the char c
//post: the integer number the char c represents(e.g. "1"=1)
{
switch (c)
{
	case '0':return 0;
	case '1':return 1;
	case '2':return 2;
	case '3':return 3;
	case '4':return 4;
	case '5':return 5;
	case '6':return 6;
	case '7':return 7;
	case '8':return 8;
	case '9':return 9;
}
return -1;//error
}

