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

Doomwad::Ssector Class Reference

Inheritance diagram for Doomwad::Ssector:

Doomwad::WadEntryElement List of all members.

Detailed Description

Represents a single SubSector in a map.

See also:
Seg Ssectors
Subsectors are created during the BSP process. When the BSP program uses Nodes to partition a map, it splits up Linedefs and Sectors. Linedefs become Segs, and Sectors become Ssectors.

Definition at line 74 of file ssectors.hpp.

Public Member Functions

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

Public Attributes

uint16 firstseg
 Number of first seg.
uint16 numsegs
 Number of segs in this subsector.

Static Public Attributes

static const size_t LENGTH = 0x00000004
 Length of a single record.


Constructor & Destructor Documentation

Ssector::Ssector uint16  _num = 0,
uint16  _first = 0
throw ()
 

SubSector constructor.

Constructs a SubSector.

Parameters:
_num Number of segs in this SubSector.
_first Reference number of the first Seg.

Definition at line 60 of file ssectors.cpp.


Member Function Documentation

size_t Ssector::getLength void   )  const throw () [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.

Implements Doomwad::WadEntryElement.

Definition at line 71 of file ssectors.cpp.

References LENGTH.

bool Ssector::read const Lump lump,
Lump::size_type  i
throw () [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.

Implements Doomwad::WadEntryElement.

Definition at line 90 of file ssectors.cpp.

Referenced by Doomwad::Ssectors::setFromLump().

std::string Ssector::toString void   )  const throw () [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.

Implements Doomwad::WadEntryElement.

Definition at line 104 of file ssectors.cpp.

References firstseg, and numsegs.

bool Ssector::write Lump lump,
Lump::size_type  i
const throw () [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.

Implements Doomwad::WadEntryElement.

Definition at line 76 of file ssectors.cpp.


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