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

ssectors.hpp

Go to the documentation of this file.
00001 // libdoomwad: manipulates Doom wad files.
00002 // Copyright (C) 2005  John Gaughan
00003 //
00004 // This library is free software; you can redistribute it and/or
00005 // modify it under the terms of the GNU Lesser General Public
00006 // License as published by the Free Software Foundation; either
00007 // version 2.1 of the License, or (at your option) any later version.
00008 //
00009 // This library is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012 // Lesser General Public License for more details.
00013 //
00014 // You should have received a copy of the GNU Lesser General Public
00015 // License along with this library; if not, write to the Free Software
00016 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 //
00018 // This library is distributed with the full text of the LGPL. Please see
00019 // the accompanying file named COPYING.
00020 // 
00021 // You may contact the author at john@johngaughan.net
00022 
00045 // C++ required.
00046 #if !defined __cplusplus
00047 #error C++ compiler required
00048 #endif
00049 
00050 // Include guard
00051 #if !defined SSECTORS_H
00052 #define SSECTORS_H
00053 
00054 // C++ headers
00055 #include <vector>
00056 
00057 // Doom headers
00058 #include "global.hpp"
00059 #include "lump.hpp"
00060 #include "wadentry.hpp"
00061 
00062 namespace Doomwad
00063 {
00064 
00074   EXPORT class Ssector : public WadEntryElement
00075   {
00076     public:
00077 
00079     static const size_t LENGTH;
00080 
00081     uint16 numsegs;  
00082     uint16 firstseg; 
00083 
00084     Ssector (uint16 = 0, uint16 = 0) throw ();
00085     virtual ~Ssector (void) throw ();
00086 
00087     virtual size_t getLength (void) const throw ();
00088     virtual bool write (Lump &lump, Lump::size_type i) const throw ();
00089     virtual bool read (const Lump &lump, Lump::size_type i) throw ();
00090     virtual std::string toString (void) const throw ();
00091   };
00092 
00102   EXPORT class GLSsector : public WadEntryElement
00103   {
00104     public:
00105 
00107     static const size_t LENGTH;
00108 
00109     uint16 numsegs;  
00110     uint16 firstseg; 
00111 
00112     GLSsector (uint16 = 0, uint16 = 0) throw ();
00113     virtual ~GLSsector (void) throw ();
00114 
00115     virtual size_t getLength (void) const throw ();
00116     virtual bool write (Lump &lump, Lump::size_type i) const throw ();
00117     virtual bool read (const Lump &lump, Lump::size_type i) throw ();
00118     virtual std::string toString (void) const throw ();
00119   };
00120 
00126   EXPORT class Ssectors : public WadEntry, public std::vector<Ssector>
00127   {
00128     public:
00129 
00131     static const std::string NAME;
00132 
00133     Ssectors (void) throw ();
00134     Ssectors (const Lump&) throw ();
00135     virtual ~Ssectors (void) throw ();
00136 
00137     virtual bool setFromLump (const Lump &lump) throw ();
00138     virtual Lump toLump (void) const throw ();
00139     virtual std::string toString (void) const throw ();
00140   };
00141 
00147   EXPORT class GLSsectors : public WadEntry, public std::vector<GLSsector>
00148   {
00149     public:
00150 
00152     static const std::string NAME;
00153 
00154     GLSsectors (void) throw ();
00155     GLSsectors (const Lump&) throw ();
00156     virtual ~GLSsectors (void) throw ();
00157 
00158     virtual bool setFromLump (const Lump &lump) throw ();
00159     virtual Lump toLump (void) const throw ();
00160     virtual std::string toString (void) const throw ();
00161   };
00162 }
00163 #endif

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