Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

Doomwad::WadEntryElement Class Reference

Inheritance diagram for Doomwad::WadEntryElement:

Doomwad::Animation Doomwad::GLNode Doomwad::GLSeg Doomwad::GLSsector Doomwad::GLVertex Doomwad::Linedef Doomwad::Node Doomwad::Patch Doomwad::Sector Doomwad::Seg Doomwad::Sidedef Doomwad::Ssector Doomwad::Switch Doomwad::Texture Doomwad::Thing Doomwad::Vertex List of all members.

Detailed Description

Interface for sub-elements in a WadEntry.

Many WadEntry subclasses are containers for records of various types. This class provides a common base class for those records.

See also:
WadEntry

Definition at line 238 of file wadentry.hpp.

Public Member Functions

virtual size_t getLength (void) const =0 throw ()
 Get the length of an element.
virtual bool read (const Lump &lump, Lump::size_type i)=0 throw ()
 Read this element from a Lump.
virtual std::string toString (void) const =0 throw ()
 Convert this element to a string.
virtual bool write (Lump &lump, Lump::size_type i) const =0 throw ()
 Write this element into a Lump.


Member Function Documentation

virtual size_t Doomwad::WadEntryElement::getLength void   )  const throw () [pure virtual]
 

Get the length of an element.

Each element record type has a length. Some are fixed, in which case this function returns that length. Some records are variable-length, in which case this function returns zero.

Returns:
Length of the record.

Implemented in Doomwad::Animation, Doomwad::Linedef, Doomwad::HexenLinedef, Doomwad::Node, Doomwad::GLNode, Doomwad::Sector, Doomwad::Seg, Doomwad::GLSeg, Doomwad::Sidedef, Doomwad::Ssector, Doomwad::GLSsector, Doomwad::Switch, Doomwad::Thing, Doomwad::HexenThing, Doomwad::Vertex, and Doomwad::GLVertex.

virtual bool Doomwad::WadEntryElement::read const Lump lump,
Lump::size_type  i
throw () [pure virtual]
 

Read this element from a Lump.

Read one element from a Lump at the specified index.

Parameters:
lump Reference to the target Lump.
i Index into the Lump's buffer.
Returns:
True if successful, false if not.

Implemented in Doomwad::Animation, Doomwad::Linedef, Doomwad::HexenLinedef, Doomwad::Node, Doomwad::GLNode, Doomwad::Sector, Doomwad::Seg, Doomwad::GLSeg, Doomwad::Sidedef, Doomwad::Ssector, Doomwad::GLSsector, Doomwad::Switch, Doomwad::Thing, Doomwad::HexenThing, Doomwad::Vertex, and Doomwad::GLVertex.

virtual std::string Doomwad::WadEntryElement::toString void   )  const throw () [pure virtual]
 

Convert this element to a string.

The format of the string will vary from class to class, but every subclass must be able to format itself as a string. IMPORTANT: this string representation is not guaranteed to preserve all data. Reading back in is not supported. This function's goal is to make the object's state user-readable, not machine-readable.

Returns:
std::string object containing object state.

Implemented in Doomwad::Animation, Doomwad::Linedef, Doomwad::HexenLinedef, Doomwad::Node, Doomwad::GLNode, Doomwad::Sector, Doomwad::Seg, Doomwad::GLSeg, Doomwad::Sidedef, Doomwad::Ssector, Doomwad::GLSsector, Doomwad::Switch, Doomwad::Thing, Doomwad::HexenThing, Doomwad::Vertex, and Doomwad::GLVertex.

virtual bool Doomwad::WadEntryElement::write Lump lump,
Lump::size_type  i
const throw () [pure virtual]
 

Write this element into a Lump.

Write one element into a Lump at the specified index.

Parameters:
lump Reference to the target Lump.
i Index into the Lump's buffer.
Returns:
True if successful, false if not.

Implemented in Doomwad::Animation, Doomwad::Linedef, Doomwad::HexenLinedef, Doomwad::Node, Doomwad::GLNode, Doomwad::Sector, Doomwad::Seg, Doomwad::GLSeg, Doomwad::Sidedef, Doomwad::Ssector, Doomwad::GLSsector, Doomwad::Switch, Doomwad::Thing, Doomwad::HexenThing, Doomwad::Vertex, and Doomwad::GLVertex.


Generated on Fri Jun 10 19:38:52 2005 for libdoomwad by  doxygen 1.4.0