Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/account.cc

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (hide annotations) (download) (as text)
Thu Nov 25 08:57:01 2004 UTC (19 years, 4 months ago) by youi
Branch: MAIN
Changes since 1.1: +75 -44 lines
File MIME type: text/x-c++src
コンストラクタ内でchar*型のメンバ変数を0で初期化.
get系関数にconst修飾.

1 youi 1.1 /*
2     * XOOPS&Platform???若?句????????????????劫?臂?/span>
3     *
4 youi 1.2 * $Revision: 1.1 $
5     * $Log: account.cc,v $
6     * Revision 1.1 2004/11/22 08:25:16 youi
7     * initial version.
8     *
9 youi 1.1 *
10     */
11     #include <time.h>
12     #include <string.h>
13    
14     #include "account.h"
15     #include "common.h"
16    
17     account::account()
18     {
19 youi 1.2 // char???ゃ?潟?帥??0?у??????/span>
20     address = 0;
21     institute = 0;
22     tel = 0;
23     organization = 0;
24     country = 0;
25     zipcode = 0;
26     fax = 0;
27     baseURL = 0;
28     uname = 0;
29     name = 0;
30     email = 0;
31     url = 0;
32     user_avatar = 0;
33     user_icq = 0;
34     user_from = 0;
35     user_sig = 0;
36     actkey = 0;
37     user_aim = 0;
38     user_yim = 0;
39     user_msnm = 0;
40     pass = 0;
41     theme = 0;
42     umode = 0;
43     user_occ = 0;
44     bio = 0;
45     user_intrest = 0;
46    
47 youi 1.1 uid = 0;
48     activate = false;
49     setValue( &address, "" );
50     setValue( &institute, "" );
51     setValue( &tel, "" );
52     setValue( &organization, "" );
53     setValue( &country, "" );
54     setValue( &zipcode, "" );
55     setValue( &fax, "" );
56     setValue( &baseURL, "" );
57     noticeMail = 1;
58     noticeMailSince = 0;
59    
60     setValue( &uname, "" );
61     setValue( &name, "" );
62     setValue( &email, "" );
63     setValue( &url, "" );
64     setValue( &user_avatar, "" );
65     user_regdate = 0;
66     setValue( &user_icq, "" );
67     setValue( &user_from, "" );
68     setValue( &user_sig, "" );
69     user_viewemail = 0;
70     setValue( &actkey, "" );
71     setValue( &user_aim, "" );
72     setValue( &user_yim, "" );
73     setValue( &user_msnm, "" );
74     setValue( &pass, "" );
75     posts = 0;
76     attachsig = 0;
77     rank = 0;
78     level = 0;
79     setValue( &theme, "" );
80     timezone_offset = 0.0;
81     last_login = 0;
82     setValue( &umode, "" );
83     uorder = 0;
84     notify_method = 0;
85     notify_mode = 0;
86     setValue( &user_occ, "" );
87     setValue( &bio, "" );
88     setValue( &user_intrest, "" );
89     user_mailok = 0;
90     }
91    
92     account::~account()
93     {
94     if( address != 0 ) delete[] address;
95     if( institute != 0 ) delete[] institute;
96     if( tel != 0 ) delete[] tel;
97     if( organization != 0 ) delete[] organization;
98     if( country != 0 ) delete[] country;
99     if( zipcode != 0 ) delete[] zipcode;
100     if( fax != 0 ) delete[] fax;
101     if( baseURL != 0 ) delete[] baseURL;
102    
103     if( uname != 0 ) delete[] uname;
104     if( name != 0 ) delete[] name;
105     if( email != 0 ) delete[] email;
106     if( url != 0 ) delete[] url;
107     if( user_avatar != 0 ) delete[] user_avatar;
108     if( user_icq != 0 ) delete[] user_icq;
109     if( user_from != 0 ) delete[] user_from;
110     if( user_sig != 0 ) delete[] user_sig;
111     if( actkey != 0 ) delete[] actkey;
112     if( user_aim != 0 ) delete[] user_aim;
113     if( user_yim != 0 ) delete[] user_yim;
114     if( user_msnm != 0 ) delete[] user_msnm;
115     if( pass != 0 ) delete[] pass;
116     if( theme != 0 ) delete[] theme;
117     if( umode != 0 ) delete[] umode;
118     if( user_occ != 0 ) delete[] user_occ;
119     if( bio != 0 ) delete[] bio;
120     if( user_intrest != 0 ) delete[] user_intrest;
121     }
122    
123 youi 1.2 int account::getUID() const { return uid; }
124 youi 1.1
125 youi 1.2 bool account::getActivate() const { return activate; }
126 youi 1.1
127 youi 1.2 const char * account::getAddress() const { return address; }
128 youi 1.1
129 youi 1.2 const char * account::getInstitute() const { return institute; }
130 youi 1.1
131 youi 1.2 const char * account::getTel() const { return tel; }
132 youi 1.1
133 youi 1.2 const char * account::getOrganization() const { return organization; }
134 youi 1.1
135 youi 1.2 const char * account::getCountry() const { return country; }
136 youi 1.1
137 youi 1.2 const char * account::getZipcode() const { return zipcode; }
138 youi 1.1
139 youi 1.2 const char * account::getFax() const { return fax; }
140 youi 1.1
141 youi 1.2 const char * account::getBaseURL() const { return baseURL; }
142 youi 1.1
143 youi 1.2 int account::getNoticeMail() const { return noticeMail; }
144 youi 1.1
145 youi 1.2 time_t account::getNoticeMailSince() const { return noticeMailSince; }
146 youi 1.1
147     // xoops_user
148 youi 1.2 const char* account::getUname( ) const { return uname; }
149 youi 1.1
150 youi 1.2 const char* account::getName( ) const { return name; }
151 youi 1.1
152 youi 1.2 const char* account::getEmail( ) const { return email; }
153 youi 1.1
154 youi 1.2 const char* account::getURL( ) const { return url; }
155 youi 1.1
156 youi 1.2 const char* account::getUserAvatar( ) const { return user_avatar; }
157 youi 1.1
158 youi 1.2 int account::getUserRegdate( ) const { return user_regdate; }
159 youi 1.1
160 youi 1.2 const char* account::getUserIcq( ) const { return user_icq; }
161 youi 1.1
162 youi 1.2 const char* account::getUserFrom( ) const { return user_from; }
163 youi 1.1
164 youi 1.2 const char* account::getUserSig( ) const { return user_sig; }
165 youi 1.1
166 youi 1.2 int account::getUserViewemail( ) const { return user_viewemail; }
167 youi 1.1
168 youi 1.2 const char* account::getActkey( ) const { return actkey; }
169 youi 1.1
170 youi 1.2 const char* account::getUserAim( ) const { return user_aim; }
171 youi 1.1
172 youi 1.2 const char* account::getUserYim( ) const { return user_yim; }
173 youi 1.1
174 youi 1.2 const char* account::getUserMsnm( ) const { return user_msnm; }
175 youi 1.1
176 youi 1.2 const char* account::getPass( ) const { return pass; }
177 youi 1.1
178 youi 1.2 int account::getPosts( ) const { return posts; }
179 youi 1.1
180 youi 1.2 int account::getAttachsig( ) const { return attachsig; }
181 youi 1.1
182 youi 1.2 int account::getRank( ) const { return rank; }
183 youi 1.1
184 youi 1.2 int account::getLevel( ) const { return level; }
185 youi 1.1
186 youi 1.2 const char* account::getTheme( ) const { return theme; }
187 youi 1.1
188 youi 1.2 double account::getTimezoneOffset( ) const { return timezone_offset; }
189 youi 1.1
190 youi 1.2 int account::getLastLogin( ) const { return last_login; }
191 youi 1.1
192 youi 1.2 const char* account::getUmode( ) const { return umode; }
193 youi 1.1
194 youi 1.2 int account::getUorder( ) const { return uorder; }
195 youi 1.1
196 youi 1.2 int account::getNotifyMethod( ) const { return notify_method; }
197 youi 1.1
198 youi 1.2 int account::getNotifyMode( ) const { return notify_mode; }
199 youi 1.1
200 youi 1.2 const char* account::getUserOcc( ) const { return user_occ; }
201 youi 1.1
202 youi 1.2 const char* account::getBio( ) const { return bio; }
203 youi 1.1
204 youi 1.2 const char* account::getUserIntrest( ) const { return user_intrest; }
205 youi 1.1
206 youi 1.2 int account::getUserMailok( ) const { return user_mailok; }
207 youi 1.1
208    
209     //
210     void account::setUID(int uid){ this -> uid = uid; }
211    
212     void account::setActivate(bool activate){ this -> activate = activate; }
213    
214     void account::setAddress( const char* address)
215     {
216     setValue( &this -> address, address );
217     }
218    
219     void account::setInstitute( const char* institute)
220     {
221     setValue( &this -> institute, institute );
222     }
223    
224     void account::setTel( const char* tel)
225     {
226     setValue( &this -> tel, tel );
227     }
228    
229     void account::setOrganization( const char* organization)
230     {
231     setValue( &this -> organization, organization );
232     }
233    
234     void account::setCountry( const char* country)
235     {
236     setValue( &this -> country, country );
237     }
238    
239     void account::setZipcode( const char* zipcode)
240     {
241     setValue( &this -> zipcode, zipcode );
242     }
243    
244     void account::setFax( const char* fax)
245     {
246     setValue( &this -> fax, fax );
247     }
248    
249     void account::setBaseURL( const char* baseURL)
250     {
251     setValue( &this -> baseURL, baseURL );
252     }
253    
254     void account::setNoticeMail(int noticeMail){ this -> noticeMail = noticeMail; }
255    
256     void account::setNoticeMailSince(time_t noticeMailSince){ this -> noticeMailSince = noticeMailSince; }
257    
258     // xoops_user
259     void account::setUname( const char* uname )
260     {
261     setValue( &this -> uname, uname );
262     }
263    
264     void account::setName( const char* name )
265     {
266     setValue( &this -> name, name );
267     }
268    
269     void account::setEmail( const char* email )
270     {
271     setValue( &this -> email, email );
272     }
273    
274     void account::setURL( const char* url )
275     {
276     setValue( &this -> url, url );
277     }
278    
279     void account::setUserAvatar( const char* user_avatar )
280     {
281     setValue( &this -> user_avatar, user_avatar );
282     }
283    
284     void account::setUserRegdate( int user_regdate ){ this -> user_regdate = user_regdate; }
285    
286     void account::setUserIcq( const char* user_icq )
287     {
288     setValue( &this -> user_icq, user_icq );
289     }
290    
291     void account::setUserFrom( const char* user_from )
292     {
293     setValue( &this -> user_from, user_from );
294     }
295    
296     void account::setUserSig( const char* user_sig )
297     {
298     setValue( &this -> user_sig, user_sig );
299     }
300    
301     void account::setUserViewemail( int user_viewemail ){ this -> user_viewemail = user_viewemail; }
302    
303     void account::setActkey( const char* actkey )
304     {
305     setValue( &this -> actkey, actkey );
306     }
307    
308     void account::setUserAim( const char* user_aim )
309     {
310     setValue( &this -> user_aim, user_aim );
311     }
312    
313     void account::setUserYim( const char* user_yim )
314     {
315     setValue( &this -> user_yim, user_yim );
316     }
317    
318     void account::setUserMsnm( const char* user_msnm )
319     {
320     setValue( &this -> user_msnm, user_msnm );
321     }
322    
323    
324     void account::setPass( const char* pass )
325     {
326     setValue( &this -> pass, pass );
327     }
328    
329     void account::setPosts( int posts ){ this -> posts = posts; }
330    
331     void account::setAttachsig( int attachsig ){ this -> attachsig = attachsig; }
332    
333     void account::setRank( int rank ){ this -> rank = rank; }
334    
335     void account::setLevel( int level ){ this -> level = level; }
336    
337     void account::setTheme( const char* theme )
338     {
339     setValue( &this -> theme, theme );
340     }
341    
342     void account::setTimezoneOffset( double timezone_offset ){ this -> timezone_offset = timezone_offset; }
343    
344     void account::setLastLogin( int last_login ){ this -> last_login = last_login; }
345    
346     void account::setUmode( const char* umode )
347     {
348     setValue( &this -> umode, umode );
349     }
350    
351     void account::setUorder( int uorder ){ this -> uorder = uorder; }
352    
353     void account::setNotifyMethod( int notify_method ){ this -> notify_method = notify_method; }
354    
355     void account::setNotifyMode( int notify_mode ){ this -> notify_mode = notify_mode; }
356    
357     void account::setUserOcc( const char* user_occ )
358     {
359     setValue( &this -> user_occ, user_occ );
360     }
361    
362    
363     void account::setBio( const char* bio )
364     {
365     setValue( &this -> bio, bio );
366     }
367    
368     void account::setUserIntrest( const char* user_intrest )
369     {
370     setValue( &this->user_intrest, user_intrest );
371     }
372    
373     void account::setUserMailok( int user_mailok ){ this -> user_mailok = user_mailok; }
374    
375    
376    
377    
378    

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26