/*  $Id: zip_file_entry.cpp,v 1.5 2003/07/20 22:30:53 grumbel Exp $
**
**  ClanLib Game SDK
**  Copyright (C) 2003  The ClanLib Team
**  For a total list of contributers see the file CREDITS.
**
**  This library is free software; you can redistribute it and/or
**  modify it under the terms of the GNU Lesser General Public
**  License as published by the Free Software Foundation; either
**  version 2.1 of the License, or (at your option) any later version.
**
**  This library is distributed in the hope that it will be useful,
**  but WITHOUT ANY WARRANTY; without even the implied warranty of
**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
**  Lesser General Public License for more details.
**
**  You should have received a copy of the GNU Lesser General Public
**  License along with this library; if not, write to the Free Software
**  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
*/

#include "Core/precomp.h"
#include "API/Core/IOData/zip_file_entry.h"
#include "zip_file_entry_generic.h"

/////////////////////////////////////////////////////////////////////////////
// CL_Zip_FileEntry construction:

CL_Zip_FileEntry::CL_Zip_FileEntry() : impl(new CL_Zip_FileEntry_Generic)
{
	impl->type = CL_Zip_FileEntry_Generic::type_file;
}
	
CL_Zip_FileEntry::CL_Zip_FileEntry(const CL_Zip_FileEntry &copy) : impl(new CL_Zip_FileEntry_Generic)
{
	*impl = *copy.impl;
}
	
CL_Zip_FileEntry::~CL_Zip_FileEntry()
{
	delete impl;
}

/////////////////////////////////////////////////////////////////////////////
// CL_Zip_FileEntry attributes:

const std::string &CL_Zip_FileEntry::get_filename() const
{
	return impl->record.filename;
}
	
cl_int64 CL_Zip_FileEntry::get_uncompressed_size()
{
	return impl->record.uncompressed_size;
}
	
cl_int64 CL_Zip_FileEntry::get_compressed_size()
{
	return impl->record.compressed_size;
}

/////////////////////////////////////////////////////////////////////////////
// CL_Zip_FileEntry operations:

CL_Zip_FileEntry &CL_Zip_FileEntry::operator =(const CL_Zip_FileEntry &copy)
{
	*impl = *copy.impl;
	return *this;
}
	
void CL_Zip_FileEntry::set_filename(const std::string &filename)
{
	impl->record.file_name_length = filename.length();
	impl->record.filename = filename;
}

/////////////////////////////////////////////////////////////////////////////
// CL_Zip_FileEntry implementation:
