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

Doomwad Namespace Reference


Detailed Description

This namespace contains all Doom-related classes, structs, types, constants, and functions. Everything in libdoomwad is contained in this namespace.

There are many classes, constants, structs, etc. in the Doomwad namespace. WadGroup represents a group of loaded wads, for example, an IWAD and map PWAD loaded in a map editor. The Wad class represents one .wad file on disk in raw format. The Lump class represents a single data lump in the wad.

The other side of the class hierarchy represents more concrete data structures such as VERTEXES, PNAMES, COLORMAP, et al. Those are the ones you probably want to use while editing, and drop down to the Lump and Wad classes when dealing with file I/O.

WadEntry is an abstract base class used to define a common interface for all entry types as well as allow for polymorphic behavior. Rather than tie classes into the Lump class, I did it this way because the internal data format changes significantly. It makes no sense to inherit from Lump when a Lump object is essentially a char vector and each entry has its own format.


Classes

class  Animated
 ANIMATED resource. More...
class  Animation
 Single animation in an ANIMATED Lump. More...
class  Blockmap
 BLOCKMAP map resource. More...
class  ColorMap
 Represents a COLORMAP wad entry. More...
class  EventLog
 Event logger class. More...
class  Flat
 Represents a single Flat, a ceiling or floor texture. More...
class  GLMap
 Holds data for OpenGL nodes. More...
class  GLNode
 Represents a single GLNode in a map. More...
class  GLNodes
 Collection of GLNode objects. More...
class  GLSeg
 Represents a single GLSeg in a map. More...
class  GLSegs
 Collection of GLSeg objects. More...
class  GLSsector
 Represents a single GLSsector in a map. More...
class  GLSsectors
 Collection of GLSsector objects. More...
class  GLVertex
 Represents a single GLVertex in a map. More...
class  GLVertexes
 Collection of GLVertex objects. More...
class  HexenLinedef
 Represents a single Linedef in a HexenMap. More...
class  HexenLinedefs
 Collection of HexenLinedef objects. More...
class  HexenMap
 Represents a map the user plays in Hexen and ZDoom. More...
class  HexenThing
 Represents a single Thing in a Hexen or ZDoom map. More...
class  HexenThings
 Collection of HexenThing objects. More...
class  HTranMap
 HTranMap resource. More...
class  Linedef
 Represents a single Linedef in a map. More...
class  Linedefs
 Collection of Linedef objects. More...
class  Lump
 The Lump class represents a general piece of data in a Doom wad file. More...
class  Map
 Represents a level the user plays. More...
class  Node
 Represents a single Node in a map. More...
class  Nodes
 Collection of Node objects. More...
class  Patch
 Represents a single Patch in a Texture. More...
class  PlayPal
 Represents a PLAYPAL wad entry. More...
class  PNames
 Represents a PNames resource in a Wad. More...
class  Reject
 Reject map resource. More...
class  Sector
 Represents a single Sector in a map. More...
class  Sectors
 Collection of Sector objects. More...
class  Seg
 Represents a single Seg in a map. More...
class  Segs
 Collection of Seg objects. More...
class  Sidedef
 Represents a single Sidedef in a map. More...
class  Sidedefs
 Collection of Sidedef objects. More...
class  Ssector
 Represents a single SubSector in a map. More...
class  Ssectors
 Collection of Ssector objects. More...
class  Switch
 Single switch in a Switches lump. More...
class  Switches
 Switches resource. More...
class  Texture
 Represents a single Texture in a Textures resource. More...
class  Textures
 Represents all of the Textures in an IWAD or PWAD. More...
class  TextWadEntry
 Class for text entries in a Wad. More...
class  Thing
 Represents a single Thing in a map. More...
class  Things
 Collection of Thing objects. More...
class  Vertex
 Represents a single Vertex in a map. More...
class  Vertexes
 Collection of Vertex objects. More...
class  Wad
 Collection of Lump objects that abastracts a single .wad file. More...
class  WadEntry
 Abstract base class for entries in a Wad. More...
class  WadEntryElement
 Interface for sub-elements in a WadEntry. More...
class  WadGroup
 Group of Wad objects. More...

Typedefs

typedef uint8 byte
 8 bits.
typedef uint32 dword
 32 bits.
typedef short int int16
 16 bit integer.
typedef int int32
 32 bit integer.
typedef long long int int64
 64 bit integer.
typedef char int8
 8 bit integer.
typedef uint64 qword
 64 bits.
typedef unsigned short int uint16
 16 bit unsigned integer.
typedef unsigned int uint32
 32 bit unsigned integer.
typedef unsigned long long int uint64
 64 bit unsigned integer.
typedef unsigned char uint8
 8 bit unsigned integer.
typedef uint16 word
 16 bits.

Functions

uint16 convertEndian (uint16 x)
 Convert an unsigned short int to this machine's endianness.
uint32 convertEndian (uint32 x)
 Convert an unsigned int to this machine's endianness.
EXPORT std::string exceptionString (const std::string &, const std::string &, size_t) throw ()
 Create an exception description.
bool isInvalidPointer (void *p, size_t size=1)
 Test if a pointer is invalid.
bool isNullPointer (void *p)
 Test if a pointer is null.
char * makeDoomString (char *buffer, const std::string &str) throw ()
 Convert a String to a DoomString.
std::string & makeStdString (std::string &str, const char *buffer) throw ()
 Convert a DoomString to a String.


Function Documentation

uint16 convertEndian uint16  x  )  [inline]
 

Convert an unsigned short int to this machine's endianness.

Parameters:
x unsigned short int to convert.
Returns:
unsigned short int in this machine's endian representation.

Definition at line 83 of file util.hpp.

uint32 convertEndian uint32  x  )  [inline]
 

Convert an unsigned int to this machine's endianness.

Parameters:
x unsigned int to convert.
Returns:
unsigned int in this machine's endian representation.

Definition at line 67 of file util.hpp.

std::string Doomwad::exceptionString const std::string &  description,
const std::string &  file,
size_t  line
throw ()
 

Create an exception description.

There are several options for creating consistent and meaningful exceptions. Rather than define new exceptions, this library uses the ones in <stdexcept> and relies on its internal string buffer to describe the error. To keep exception descriptions consistent, this function creates a string based on the file name, line number, and a custom description. The user of this function uses its return value to create an exception.

To use this function, type a string description as the first argument. Use the __FILE__ and __LINE__ macros for the other two.

Parameters:
description Description of what caused the exception.
file File name in which the exception occurred.
line Line number at which the exception occurred.
Returns:
std::string representation of the exception string on the stack.

Definition at line 62 of file util.cpp.

Referenced by Doomwad::Lump::append(), Doomwad::Lump::assign(), Doomwad::Lump::at(), Doomwad::Flat::at(), Doomwad::Lump::getByte(), Doomwad::Lump::getDString(), Doomwad::Lump::getDWord(), Doomwad::Lump::getInt16(), Doomwad::Lump::getInt32(), Doomwad::Lump::getInt64(), Doomwad::Lump::getInt8(), Doomwad::Lump::getQWord(), Doomwad::Lump::getString(), Doomwad::Lump::getUInt16(), Doomwad::Lump::getUInt32(), Doomwad::Lump::getUInt64(), Doomwad::Lump::getUInt8(), Doomwad::Lump::getWord(), Doomwad::Lump::grow(), Doomwad::Lump::Lump(), Doomwad::Lump::operator+(), Doomwad::Lump::operator+=(), Doomwad::Lump::setByte(), Doomwad::Lump::setDString(), Doomwad::Lump::setDWord(), Doomwad::Lump::setInt16(), Doomwad::Lump::setInt32(), Doomwad::Lump::setInt64(), Doomwad::Lump::setInt8(), Doomwad::Lump::setQWord(), Doomwad::Lump::setString(), Doomwad::Lump::setUInt16(), Doomwad::Lump::setUInt32(), Doomwad::Lump::setUInt64(), Doomwad::Lump::setUInt8(), Doomwad::Lump::setWord(), and Doomwad::Lump::shrink().

bool isInvalidPointer void *  p,
size_t  size = 1
[inline]
 

Test if a pointer is invalid.

Parameters:
p Pointer to test.
size Size of the buffer pointed to by the pointer.
Returns:
True if invalid, false if valid.

Definition at line 112 of file util.hpp.

bool isNullPointer void *  p  )  [inline]
 

Test if a pointer is null.

Parameters:
p Pointer to test.
Returns:
True if null, false if not null.

Definition at line 99 of file util.hpp.

char* makeDoomString char *  buffer,
const std::string &  str
throw () [inline]
 

Convert a String to a DoomString.

Takes a std::string input and converts it to the format used in wad files.

Parameters:
buffer Character output buffer, assumed to be 8 characters.
str String input.
Returns:
Pointer to the output buffer.

Definition at line 132 of file util.hpp.

std::string& makeStdString std::string &  str,
const char *  buffer
throw () [inline]
 

Convert a DoomString to a String.

Takes a character buffer in the Doom wad file string format and converts it to a std::string. Assumes the buffer is 8 characters and has no terminating null.

Parameters:
str String output.
buffer Character input buffer.
Returns:
Reference to the output string.

Definition at line 152 of file util.hpp.


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