#include "graphics/GraphicsCacheItem.h"
#include "graphics/GraphicsCacheItem_pimpl.h"
+
GraphicsCacheItem::GraphicsCacheItem()
: pimpl(new GraphicsCacheItem_pimpl)
{
pimpl->refCount = 1;
}
+
GraphicsCacheItem::~GraphicsCacheItem()
{
destroy();
}
+
bool
GraphicsCacheItem::setFilename(string const & filename)
{
return pimpl->setFilename(filename);
}
+
GraphicsCacheItem::GraphicsCacheItem(GraphicsCacheItem const & gci)
{
pimpl = 0;
copy(gci);
}
-GraphicsCacheItem const &
+GraphicsCacheItem &
GraphicsCacheItem::operator=(GraphicsCacheItem const & gci)
{
// Are we trying to copy the object onto itself.
if (this == &gci)
return *this;
- // Destory old copy
+ // Destroy old copy
destroy();
// And then copy new object.
return *this;
}
+
void
GraphicsCacheItem::copy(GraphicsCacheItem const & gci)
{
++(pimpl->refCount);
}
+
void
GraphicsCacheItem::destroy()
{
}
}
+
GraphicsCacheItem::ImageStatus
GraphicsCacheItem::getImageStatus() const { return pimpl->imageStatus_; }
+
int
GraphicsCacheItem::getHeight() const { return pimpl->height_; }
-
+
+
int
GraphicsCacheItem::getWidth() const { return pimpl->width_; }
+
Pixmap
GraphicsCacheItem::getImage() const { return pimpl->pixmap_; }