ShapeArchive Class Reference

#include <ShapeArchive.h>

Inheritance diagram for ShapeArchive:

Pentagram::Archive FontShapeArchive GumpShapeArchive MainShapeArchive List of all members.

Public Member Functions

 ENABLE_RUNTIME_CLASSTYPE ()
 ShapeArchive (uint16 id_, Pentagram::Palette *pal_=0, const ConvertShapeFormat *format_=0)
 ShapeArchive (ArchiveFile *af, uint16 id_, Pentagram::Palette *pal_=0, const ConvertShapeFormat *format_=0)
 ShapeArchive (IDataSource *ds, uint16 id_, Pentagram::Palette *pal_=0, const ConvertShapeFormat *format_=0)
 ShapeArchive (const std::string &path, uint16 id_, Pentagram::Palette *pal_=0, const ConvertShapeFormat *format_=0)
virtual ~ShapeArchive ()
ShapegetShape (uint32 shapenum)
virtual void cache (uint32 shapenum)
virtual void uncache (uint32 shapenum)
virtual bool isCached (uint32 shapenum)

Protected Attributes

uint16 id
const ConvertShapeFormatformat
Pentagram::Palettepalette
std::vector< Shape * > shapes

Detailed Description

Definition at line 28 of file ShapeArchive.h.


Constructor & Destructor Documentation

ShapeArchive::ShapeArchive ( uint16  id_,
Pentagram::Palette pal_ = 0,
const ConvertShapeFormat format_ = 0 
) [inline]

Definition at line 33 of file ShapeArchive.h.

ShapeArchive::ShapeArchive ( ArchiveFile af,
uint16  id_,
Pentagram::Palette pal_ = 0,
const ConvertShapeFormat format_ = 0 
) [inline]

Definition at line 36 of file ShapeArchive.h.

ShapeArchive::ShapeArchive ( IDataSource ds,
uint16  id_,
Pentagram::Palette pal_ = 0,
const ConvertShapeFormat format_ = 0 
) [inline]

Definition at line 39 of file ShapeArchive.h.

ShapeArchive::ShapeArchive ( const std::string &  path,
uint16  id_,
Pentagram::Palette pal_ = 0,
const ConvertShapeFormat format_ = 0 
) [inline]

Definition at line 42 of file ShapeArchive.h.

ShapeArchive::~ShapeArchive (  )  [virtual]

Definition at line 28 of file ShapeArchive.cpp.


Member Function Documentation

void ShapeArchive::cache ( uint32  shapenum  )  [virtual]

Cache a single object.

Implements Pentagram::Archive.

Reimplemented in FontShapeArchive.

Definition at line 41 of file ShapeArchive.cpp.

References Pentagram::Archive::count, Shape::DetectShapeFormat(), format, Pentagram::Archive::getRawObject(), ConvertShapeFormat::name, palette, perr, pout, Shape::setPalette(), and shapes.

ShapeArchive::ENABLE_RUNTIME_CLASSTYPE (  ) 

Reimplemented from Pentagram::Archive.

Reimplemented in FontShapeArchive, GumpShapeArchive, and MainShapeArchive.

Shape * ShapeArchive::getShape ( uint32  shapenum  ) 

Definition at line 33 of file ShapeArchive.cpp.

References Pentagram::Archive::cache(), Pentagram::Archive::count, and shapes.

Referenced by ItemSorter::AddItem(), Actor::die(), FontShapeArchive::getFont(), GameData::getShape(), Item::getShapeObject(), SliderGump::InitGump(), ScrollGump::InitGump(), ReadableGump::InitGump(), QuitGump::InitGump(), PagedGump::InitGump(), MiniStatsGump::InitGump(), MenuGump::InitGump(), BookGump::InitGump(), TypeFlags::loadArmourInfo(), Gump::loadData(), ButtonWidget::loadData(), ShapeViewerGump::OnKeyDown(), Item::openGump(), ItemSorter::PaintSortItem(), and ShapeViewerGump::PaintThis().

bool ShapeArchive::isCached ( uint32  shapenum  )  [virtual]

Check if an object is cached.

Implements Pentagram::Archive.

Definition at line 81 of file ShapeArchive.cpp.

References Pentagram::Archive::count, and shapes.

void ShapeArchive::uncache ( uint32  shapenum  )  [virtual]

Uncache a single object Potentially dangerous. See uncache()

Implements Pentagram::Archive.

Definition at line 72 of file ShapeArchive.cpp.

References Pentagram::Archive::count, and shapes.


Member Data Documentation

const ConvertShapeFormat* ShapeArchive::format [protected]

Definition at line 57 of file ShapeArchive.h.

Referenced by cache(), and FontShapeArchive::cache().

uint16 ShapeArchive::id [protected]

Definition at line 56 of file ShapeArchive.h.

Pentagram::Palette* ShapeArchive::palette [protected]

Definition at line 58 of file ShapeArchive.h.

Referenced by cache(), and FontShapeArchive::cache().

std::vector<Shape*> ShapeArchive::shapes [protected]

Definition at line 59 of file ShapeArchive.h.

Referenced by cache(), FontShapeArchive::cache(), getShape(), isCached(), and uncache().


The documentation for this class was generated from the following files:
Generated on Fri Jul 27 22:29:55 2007 for pentagram by  doxygen 1.4.7