#include "gosGml.hpp"
#include "GMLFont.h"
//===========================================================================//
// File:	 GmlFont.cpp													 //
// Project:  gosGml				                                         //
// Contents: 																 //
//---------------------------------------------------------------------------//
// Date      Who    Modification                                             //
// 4/10/00   DP     Created													 //
//---------------------------------------------------------------------------//
// Copyright (C) 2000 Microsoft Corp.						                 //
// All Rights reserved worldwide                                             //
// This unpublished sourcecode is PROPRIETARY and CONFIDENTIAL               //
//===========================================================================//

GmlFont::GmlFont()
	:Color(0),Size(0),Face(0),iSize(0)
{
}

GmlFont::~GmlFont()
{
	if(Color)
		delete[] Color;
	if(Size) 
		delete[] Size;
	if(Face) 
		delete[] Face;
}

GmlFont& GmlFont::operator= (const GmlFont& rhs)
{
	if(this == &rhs)
		return *this;
	if(this->Color) 
		delete[] this->Color;
	if(this->Size) 
		delete[] this->Size;
	if(this->Face) 
		delete[] this->Face;

	Size= new char[mstrlen(rhs.Size)+1];
	mstrcpy(Size,rhs.Size);

	iSize=rhs.iSize;

	Color=new char[mstrlen(rhs.Color)+1];
	mstrcpy(Color,rhs.Color);

	Face= new char[mstrlen(rhs.Face)+1];
	mstrcpy(Face,rhs.Face);

	return *this;
}

GmlFont::GmlFont(GmlFont& rhs)
{
	Size= new char[mstrlen(rhs.Size)+1];
	mstrcpy(Size,rhs.Size);

	iSize=rhs.iSize;

	Color=new char[mstrlen(rhs.Color)+1];
	mstrcpy(Color,rhs.Color);

	Face= new char[mstrlen(rhs.Face)+1];
	mstrcpy(Face,rhs.Face);
}