doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
DeclPDA.h
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 
29 #ifndef __DECLPDA_H__
30 #define __DECLPDA_H__
31 
32 /*
33 ===============================================================================
34 
35  idDeclPDA
36 
37 ===============================================================================
38 */
39 
40 
41 class idDeclEmail : public idDecl {
42 public:
44 
45  virtual size_t Size( void ) const;
46  virtual const char * DefaultDefinition( void ) const;
47  virtual bool Parse( const char *text, const int textLength );
48  virtual void FreeData( void );
49  virtual void Print( void ) const;
50  virtual void List( void ) const;
51 
52  const char * GetFrom() const { return from; }
53  const char * GetBody() const { return text; }
54  const char * GetSubject() const { return subject; }
55  const char * GetDate() const { return date; }
56  const char * GetTo() const { return to; }
57  const char * GetImage() const { return image; }
58 
59 private:
66 };
67 
68 
69 class idDeclVideo : public idDecl {
70 public:
72 
73  virtual size_t Size( void ) const;
74  virtual const char * DefaultDefinition( void ) const;
75  virtual bool Parse( const char *text, const int textLength );
76  virtual void FreeData( void );
77  virtual void Print( void ) const;
78  virtual void List( void ) const;
79 
80  const char * GetRoq() const { return video; }
81  const char * GetWave() const { return audio; }
82  const char * GetVideoName() const { return videoName; }
83  const char * GetInfo() const { return info; }
84  const char * GetPreview() const { return preview; }
85 
86 private:
92 };
93 
94 
95 class idDeclAudio : public idDecl {
96 public:
98 
99  virtual size_t Size( void ) const;
100  virtual const char * DefaultDefinition( void ) const;
101  virtual bool Parse( const char *text, const int textLength );
102  virtual void FreeData( void );
103  virtual void Print( void ) const;
104  virtual void List( void ) const;
105 
106  const char * GetAudioName() const { return audioName; }
107  const char * GetWave() const { return audio; }
108  const char * GetInfo() const { return info; }
109  const char * GetPreview() const { return preview; }
110 
111 private:
116 };
117 
118 
119 class idDeclPDA : public idDecl {
120 public:
122 
123  virtual size_t Size( void ) const;
124  virtual const char * DefaultDefinition( void ) const;
125  virtual bool Parse( const char *text, const int textLength );
126  virtual void FreeData( void );
127  virtual void Print( void ) const;
128  virtual void List( void ) const;
129 
130  virtual void AddVideo( const char *name, bool unique = true ) const;
131  virtual void AddAudio( const char *name, bool unique = true ) const;
132  virtual void AddEmail( const char *name, bool unique = true ) const;
133  virtual void RemoveAddedEmailsAndVideos() const;
134 
135  virtual const int GetNumVideos() const;
136  virtual const int GetNumAudios() const;
137  virtual const int GetNumEmails() const;
138  virtual const idDeclVideo *GetVideoByIndex( int index ) const;
139  virtual const idDeclAudio *GetAudioByIndex( int index ) const;
140  virtual const idDeclEmail *GetEmailByIndex( int index ) const;
141 
142  virtual void SetSecurity( const char *sec ) const;
143 
144  const char * GetPdaName() const { return pdaName; }
145  const char * GetSecurity() const {return security; }
146  const char * GetFullName() const { return fullName; }
147  const char * GetIcon() const { return icon; }
148  const char * GetPost() const { return post; }
149  const char * GetID() const { return id; }
150  const char * GetTitle() const { return title; }
151 
152 private:
153  mutable idStrList videos;
154  mutable idStrList audios;
155  mutable idStrList emails;
162  mutable idStr security;
163  mutable int originalEmails;
164  mutable int originalVideos;
165 };
166 
167 #endif /* !__DECLPDA_H__ */
virtual void SetSecurity(const char *sec) const
Definition: DeclPDA.cpp:256
const char * GetPost() const
Definition: DeclPDA.h:148
idStr info
Definition: DeclPDA.h:114
idStrList videos
Definition: DeclPDA.h:153
const char * GetFrom() const
Definition: DeclPDA.h:52
const char * GetPdaName() const
Definition: DeclPDA.h:144
virtual void AddAudio(const char *name, bool unique=true) const
Definition: DeclPDA.cpp:204
virtual size_t Size(void) const
Definition: DeclPDA.cpp:328
virtual const int GetNumVideos() const
Definition: DeclPDA.cpp:265
const char * GetWave() const
Definition: DeclPDA.h:107
idStr id
Definition: DeclPDA.h:159
const char * GetPreview() const
Definition: DeclPDA.h:109
idDeclVideo()
Definition: DeclPDA.h:71
idStr preview
Definition: DeclPDA.h:115
idStr audioName
Definition: DeclPDA.h:113
idStr post
Definition: DeclPDA.h:160
idStr icon
Definition: DeclPDA.h:158
virtual void FreeData(void)
Definition: DeclPDA.cpp:446
virtual const char * DefaultDefinition(void) const
Definition: DeclPDA.cpp:546
virtual void Print(void) const
Definition: DeclPDA.cpp:46
const char * GetFullName() const
Definition: DeclPDA.h:146
idStr title
Definition: DeclPDA.h:161
const char * GetTo() const
Definition: DeclPDA.h:56
virtual bool Parse(const char *text, const int textLength)
Definition: DeclPDA.cpp:355
idDeclEmail()
Definition: DeclPDA.h:43
idStrList audios
Definition: DeclPDA.h:154
virtual size_t Size(void) const
Definition: DeclPDA.cpp:568
virtual const idDeclAudio * GetAudioByIndex(int index) const
Definition: DeclPDA.cpp:304
virtual void Print(void) const
Definition: DeclPDA.cpp:463
const char * GetID() const
Definition: DeclPDA.h:149
virtual bool Parse(const char *text, const int textLength)
Definition: DeclPDA.cpp:595
idStr to
Definition: DeclPDA.h:63
GLuint index
Definition: glext.h:3476
virtual const idDeclVideo * GetVideoByIndex(int index) const
Definition: DeclPDA.cpp:292
idStr date
Definition: DeclPDA.h:62
virtual void AddEmail(const char *name, bool unique=true) const
Definition: DeclPDA.cpp:220
idStr preview
Definition: DeclPDA.h:87
idStr from
Definition: DeclPDA.h:64
idStr videoName
Definition: DeclPDA.h:89
const char * GetBody() const
Definition: DeclPDA.h:53
virtual const int GetNumAudios() const
Definition: DeclPDA.cpp:274
idStr audio
Definition: DeclPDA.h:112
int originalEmails
Definition: DeclPDA.h:163
virtual void List(void) const
Definition: DeclPDA.cpp:472
idStr subject
Definition: DeclPDA.h:61
idStr image
Definition: DeclPDA.h:65
virtual void Print(void) const
Definition: DeclPDA.cpp:337
int originalVideos
Definition: DeclPDA.h:164
idStr audio
Definition: DeclPDA.h:91
const char * GetDate() const
Definition: DeclPDA.h:55
const char * GetIcon() const
Definition: DeclPDA.h:147
const char * GetWave() const
Definition: DeclPDA.h:81
virtual const char * DefaultDefinition(void) const
Definition: DeclPDA.cpp:653
const char * GetInfo() const
Definition: DeclPDA.h:83
const char * GetImage() const
Definition: DeclPDA.h:57
virtual const int GetNumEmails() const
Definition: DeclPDA.cpp:283
idDeclPDA()
Definition: DeclPDA.h:121
const char * GetSecurity() const
Definition: DeclPDA.h:145
virtual bool Parse(const char *text, const int textLength)
Definition: DeclPDA.cpp:64
virtual const idDeclEmail * GetEmailByIndex(int index) const
Definition: DeclPDA.cpp:316
virtual size_t Size(void) const
Definition: DeclPDA.cpp:37
virtual bool Parse(const char *text, const int textLength)
Definition: DeclPDA.cpp:481
const char * GetPreview() const
Definition: DeclPDA.h:84
virtual void RemoveAddedEmailsAndVideos() const
Definition: DeclPDA.cpp:236
virtual void AddVideo(const char *name, bool unique=true) const
Definition: DeclPDA.cpp:188
virtual void List(void) const
Definition: DeclPDA.cpp:346
idStr video
Definition: DeclPDA.h:88
const GLcharARB * name
Definition: glext.h:3629
idStrList emails
Definition: DeclPDA.h:155
idStr text
Definition: DeclPDA.h:60
const char * GetTitle() const
Definition: DeclPDA.h:150
idStr fullName
Definition: DeclPDA.h:157
const char * GetSubject() const
Definition: DeclPDA.h:54
Definition: Str.h:116
virtual void FreeData(void)
Definition: DeclPDA.cpp:560
idStr security
Definition: DeclPDA.h:162
virtual void FreeData(void)
Definition: DeclPDA.cpp:175
const char * GetVideoName() const
Definition: DeclPDA.h:82
idStr pdaName
Definition: DeclPDA.h:156
virtual void List(void) const
Definition: DeclPDA.cpp:586
virtual void Print(void) const
Definition: DeclPDA.cpp:577
virtual void List(void) const
Definition: DeclPDA.cpp:55
const char * GetAudioName() const
Definition: DeclPDA.h:106
virtual const char * DefaultDefinition(void) const
Definition: DeclPDA.cpp:163
virtual const char * DefaultDefinition(void) const
Definition: DeclPDA.cpp:430
const char * GetInfo() const
Definition: DeclPDA.h:108
idStr info
Definition: DeclPDA.h:90
virtual void FreeData(void)
Definition: DeclPDA.cpp:667
const char * GetRoq() const
Definition: DeclPDA.h:80
virtual size_t Size(void) const
Definition: DeclPDA.cpp:454
idDeclAudio()
Definition: DeclPDA.h:97