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.9 - (hide annotations) (download) (as text)
Mon Aug 29 02:02:56 2005 UTC (18 years, 7 months ago) by aga4096
Branch: MAIN
CVS Tags: AL_PORTING, MergePnt_20051116, REL20051226, XOONIPS_RC1, REL20060323, tag20060615, tag20070307current, tag20061115, MergePnt_20051220, tag20061130, merge_to_20060605, tag20070307, REL20060213, RELENG_2_0_0a_RELEASE, tag20060622, merge_to_20060411, HEAD
Branch point for: XOONIPS_STABLE_32, XOONIPS_STABLE, XOONIPS_STABLE_3, XOONIPS_STABLE_2
Changes since 1.8: +5 -1 lines
File MIME type: text/x-c++src
・valgrindでエラーが出るのを修正.

1 youi 1.1 /*
2 tani 1.8 * --------------------------------------------------------------------------
3     * XooNiPs Xoops modules for Neuroinformatics Platforms
4     * Copyright (C) 2005 RIKEN, Japan. All rights reserved.
5     * http://sourceforge.jp/projects/xoonips/
6     * --------------------------------------------------------------------------
7     * This program is free software; you can redistribute it and/or
8     * modify it under the terms of the GNU General Public License
9     * as published by the Free Software Foundation; either version 2
10     * of the License, or (at your option) any later version.
11     *
12     * This program is distributed in the hope that it will be useful,
13     * but WITHOUT ANY WARRANTY; without even the implied warranty of
14     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15     * GNU General Public License for more details.
16     *
17     * You should have received a copy of the GNU General Public License
18     * along with this program; if not, write to the Free Software
19     * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20     * --------------------------------------------------------------------------
21     *
22 youi 1.1 * XOOPS&Platform鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
23     *
24 aga4096 1.9 * $Revision: 1.8 $
25 youi 1.2 * $Log: account.cc,v $
26 aga4096 1.9 * Revision 1.8 2005/03/15 04:49:40 tani
27     * 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申.
28     *
29 tani 1.8 * Revision 1.7 2005/02/25 07:00:37 tani
30     * item_number_limit, index_number_limit, item_storage_limit鐃緒申鐃緒申鐃緒申.
31     *
32 tani 1.7 * Revision 1.6 2005/02/09 07:23:50 aga
33     * 鐃緒申URL to My Personal Archive 鐃緒申DB鐃緒申AL鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申.
34     *
35 aga 1.6 * Revision 1.5 2005/01/15 05:31:16 youi
36     * userid_t鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申.
37     *
38 youi 1.5 * Revision 1.4 2005/01/14 10:33:37 aga
39     * 鐃緒申int privateIndexID鐃緒申鐃緒申鐃緒申.
40     *
41 aga 1.4 * Revision 1.3 2004/12/01 10:28:58 youi
42     * DB鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
43     * institute -> division
44     * organizaion -> company_name
45     *
46 youi 1.3 * Revision 1.2 2004/11/25 08:57:01 youi
47     * 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申char*鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申0鐃緒申鐃緒申鐃緒申鐃緒申.
48     * get鐃緒申鐃緒申鐃緒申鐃緒申const鐃緒申鐃緒申.
49     *
50 youi 1.2 * Revision 1.1 2004/11/22 08:25:16 youi
51     * initial version.
52     *
53 youi 1.1 *
54     */
55     #include <time.h>
56     #include <string.h>
57    
58     #include "account.h"
59     #include "common.h"
60    
61     account::account()
62     {
63 youi 1.2 // char鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申0鐃緒申鐃緒申鐃緒申鐃緒申
64     address = 0;
65 youi 1.3 division = 0;
66 youi 1.2 tel = 0;
67 youi 1.3 company_name = 0;
68 youi 1.2 country = 0;
69     zipcode = 0;
70     fax = 0;
71     uname = 0;
72     name = 0;
73     email = 0;
74     url = 0;
75     user_avatar = 0;
76     user_icq = 0;
77     user_from = 0;
78     user_sig = 0;
79     actkey = 0;
80     user_aim = 0;
81     user_yim = 0;
82     user_msnm = 0;
83     pass = 0;
84     theme = 0;
85     umode = 0;
86     user_occ = 0;
87     bio = 0;
88     user_intrest = 0;
89 aga4096 1.9 itemStorageLimit = 0;
90 youi 1.2
91 youi 1.1 uid = 0;
92     activate = false;
93     setValue( &address, "" );
94 youi 1.3 setValue( &division, "" );
95 youi 1.1 setValue( &tel, "" );
96 youi 1.3 setValue( &company_name, "" );
97 youi 1.1 setValue( &country, "" );
98     setValue( &zipcode, "" );
99     setValue( &fax, "" );
100     noticeMail = 1;
101     noticeMailSince = 0;
102 aga 1.4 privateIndexID = 0;
103 youi 1.1
104     setValue( &uname, "" );
105     setValue( &name, "" );
106     setValue( &email, "" );
107     setValue( &url, "" );
108     setValue( &user_avatar, "" );
109     user_regdate = 0;
110     setValue( &user_icq, "" );
111     setValue( &user_from, "" );
112     setValue( &user_sig, "" );
113     user_viewemail = 0;
114     setValue( &actkey, "" );
115     setValue( &user_aim, "" );
116     setValue( &user_yim, "" );
117     setValue( &user_msnm, "" );
118     setValue( &pass, "" );
119     posts = 0;
120     attachsig = 0;
121     rank = 0;
122     level = 0;
123     setValue( &theme, "" );
124     timezone_offset = 0.0;
125     last_login = 0;
126     setValue( &umode, "" );
127     uorder = 0;
128     notify_method = 0;
129     notify_mode = 0;
130     setValue( &user_occ, "" );
131     setValue( &bio, "" );
132     setValue( &user_intrest, "" );
133     user_mailok = 0;
134     }
135    
136     account::~account()
137     {
138     if( address != 0 ) delete[] address;
139 youi 1.3 if( division != 0 ) delete[] division;
140 youi 1.1 if( tel != 0 ) delete[] tel;
141 youi 1.3 if( company_name != 0 ) delete[] company_name;
142 youi 1.1 if( country != 0 ) delete[] country;
143     if( zipcode != 0 ) delete[] zipcode;
144     if( fax != 0 ) delete[] fax;
145    
146     if( uname != 0 ) delete[] uname;
147     if( name != 0 ) delete[] name;
148     if( email != 0 ) delete[] email;
149     if( url != 0 ) delete[] url;
150     if( user_avatar != 0 ) delete[] user_avatar;
151     if( user_icq != 0 ) delete[] user_icq;
152     if( user_from != 0 ) delete[] user_from;
153     if( user_sig != 0 ) delete[] user_sig;
154     if( actkey != 0 ) delete[] actkey;
155     if( user_aim != 0 ) delete[] user_aim;
156     if( user_yim != 0 ) delete[] user_yim;
157     if( user_msnm != 0 ) delete[] user_msnm;
158     if( pass != 0 ) delete[] pass;
159     if( theme != 0 ) delete[] theme;
160     if( umode != 0 ) delete[] umode;
161     if( user_occ != 0 ) delete[] user_occ;
162     if( bio != 0 ) delete[] bio;
163     if( user_intrest != 0 ) delete[] user_intrest;
164     }
165    
166 youi 1.5 userid_t account::getUID() const { return uid; }
167 youi 1.1
168 youi 1.2 bool account::getActivate() const { return activate; }
169 youi 1.1
170 youi 1.2 const char * account::getAddress() const { return address; }
171 youi 1.1
172 youi 1.3 const char * account::getDivision() const { return division; }
173 youi 1.1
174 youi 1.2 const char * account::getTel() const { return tel; }
175 youi 1.1
176 youi 1.3 const char * account::getCompanyName() const { return company_name; }
177 youi 1.1
178 youi 1.2 const char * account::getCountry() const { return country; }
179 youi 1.1
180 youi 1.2 const char * account::getZipcode() const { return zipcode; }
181 youi 1.1
182 youi 1.2 const char * account::getFax() const { return fax; }
183 youi 1.1
184 youi 1.2 int account::getNoticeMail() const { return noticeMail; }
185 youi 1.1
186 youi 1.2 time_t account::getNoticeMailSince() const { return noticeMailSince; }
187 youi 1.1
188 aga 1.4 int account::getPrivateIndexID() const { return privateIndexID; }
189    
190 tani 1.7 int account::getItemNumberLimit() const { return itemNumberLimit; }
191    
192     int account::getIndexNumberLimit() const { return indexNumberLimit; }
193    
194     double account::getItemStorageLimit() const { return itemStorageLimit; }
195    
196 youi 1.1 // xoops_user
197 youi 1.2 const char* account::getUname( ) const { return uname; }
198 youi 1.1
199 youi 1.2 const char* account::getName( ) const { return name; }
200 youi 1.1
201 youi 1.2 const char* account::getEmail( ) const { return email; }
202 youi 1.1
203 youi 1.2 const char* account::getURL( ) const { return url; }
204 youi 1.1
205 youi 1.2 const char* account::getUserAvatar( ) const { return user_avatar; }
206 youi 1.1
207 youi 1.2 int account::getUserRegdate( ) const { return user_regdate; }
208 youi 1.1
209 youi 1.2 const char* account::getUserIcq( ) const { return user_icq; }
210 youi 1.1
211 youi 1.2 const char* account::getUserFrom( ) const { return user_from; }
212 youi 1.1
213 youi 1.2 const char* account::getUserSig( ) const { return user_sig; }
214 youi 1.1
215 youi 1.2 int account::getUserViewemail( ) const { return user_viewemail; }
216 youi 1.1
217 youi 1.2 const char* account::getActkey( ) const { return actkey; }
218 youi 1.1
219 youi 1.2 const char* account::getUserAim( ) const { return user_aim; }
220 youi 1.1
221 youi 1.2 const char* account::getUserYim( ) const { return user_yim; }
222 youi 1.1
223 youi 1.2 const char* account::getUserMsnm( ) const { return user_msnm; }
224 youi 1.1
225 youi 1.2 const char* account::getPass( ) const { return pass; }
226 youi 1.1
227 youi 1.2 int account::getPosts( ) const { return posts; }
228 youi 1.1
229 youi 1.2 int account::getAttachsig( ) const { return attachsig; }
230 youi 1.1
231 youi 1.2 int account::getRank( ) const { return rank; }
232 youi 1.1
233 youi 1.2 int account::getLevel( ) const { return level; }
234 youi 1.1
235 youi 1.2 const char* account::getTheme( ) const { return theme; }
236 youi 1.1
237 youi 1.2 double account::getTimezoneOffset( ) const { return timezone_offset; }
238 youi 1.1
239 youi 1.2 int account::getLastLogin( ) const { return last_login; }
240 youi 1.1
241 youi 1.2 const char* account::getUmode( ) const { return umode; }
242 youi 1.1
243 youi 1.2 int account::getUorder( ) const { return uorder; }
244 youi 1.1
245 youi 1.2 int account::getNotifyMethod( ) const { return notify_method; }
246 youi 1.1
247 youi 1.2 int account::getNotifyMode( ) const { return notify_mode; }
248 youi 1.1
249 youi 1.2 const char* account::getUserOcc( ) const { return user_occ; }
250 youi 1.1
251 youi 1.2 const char* account::getBio( ) const { return bio; }
252 youi 1.1
253 youi 1.2 const char* account::getUserIntrest( ) const { return user_intrest; }
254 youi 1.1
255 youi 1.2 int account::getUserMailok( ) const { return user_mailok; }
256 youi 1.1
257    
258     //
259 youi 1.5 void account::setUID(userid_t uid){ this -> uid = uid; }
260 youi 1.1
261     void account::setActivate(bool activate){ this -> activate = activate; }
262    
263     void account::setAddress( const char* address)
264     {
265     setValue( &this -> address, address );
266     }
267    
268 youi 1.3 void account::setDivision( const char* division)
269 youi 1.1 {
270 youi 1.3 setValue( &this -> division, division );
271 youi 1.1 }
272    
273     void account::setTel( const char* tel)
274     {
275     setValue( &this -> tel, tel );
276     }
277    
278 youi 1.3 void account::setCompanyName( const char* company_name)
279 youi 1.1 {
280 youi 1.3 setValue( &this -> company_name, company_name );
281 youi 1.1 }
282    
283     void account::setCountry( const char* country)
284     {
285     setValue( &this -> country, country );
286     }
287    
288     void account::setZipcode( const char* zipcode)
289     {
290     setValue( &this -> zipcode, zipcode );
291     }
292    
293     void account::setFax( const char* fax)
294     {
295     setValue( &this -> fax, fax );
296     }
297    
298     void account::setNoticeMail(int noticeMail){ this -> noticeMail = noticeMail; }
299    
300     void account::setNoticeMailSince(time_t noticeMailSince){ this -> noticeMailSince = noticeMailSince; }
301 aga 1.4
302     void account::setPrivateIndexID(int xid){ this -> privateIndexID = xid; }
303 youi 1.1
304 tani 1.7 void account::setItemNumberLimit( int x ){ itemNumberLimit = x; }
305    
306     void account::setIndexNumberLimit( int x ){ indexNumberLimit = x; }
307    
308     void account::setItemStorageLimit( double x ){ itemStorageLimit = x; }
309    
310 youi 1.1 // xoops_user
311     void account::setUname( const char* uname )
312     {
313     setValue( &this -> uname, uname );
314     }
315    
316     void account::setName( const char* name )
317     {
318     setValue( &this -> name, name );
319     }
320    
321     void account::setEmail( const char* email )
322     {
323     setValue( &this -> email, email );
324     }
325    
326     void account::setURL( const char* url )
327     {
328     setValue( &this -> url, url );
329     }
330    
331     void account::setUserAvatar( const char* user_avatar )
332     {
333     setValue( &this -> user_avatar, user_avatar );
334     }
335    
336     void account::setUserRegdate( int user_regdate ){ this -> user_regdate = user_regdate; }
337    
338     void account::setUserIcq( const char* user_icq )
339     {
340     setValue( &this -> user_icq, user_icq );
341     }
342    
343     void account::setUserFrom( const char* user_from )
344     {
345     setValue( &this -> user_from, user_from );
346     }
347    
348     void account::setUserSig( const char* user_sig )
349     {
350     setValue( &this -> user_sig, user_sig );
351     }
352    
353     void account::setUserViewemail( int user_viewemail ){ this -> user_viewemail = user_viewemail; }
354    
355     void account::setActkey( const char* actkey )
356     {
357     setValue( &this -> actkey, actkey );
358     }
359    
360     void account::setUserAim( const char* user_aim )
361     {
362     setValue( &this -> user_aim, user_aim );
363     }
364    
365     void account::setUserYim( const char* user_yim )
366     {
367     setValue( &this -> user_yim, user_yim );
368     }
369    
370     void account::setUserMsnm( const char* user_msnm )
371     {
372     setValue( &this -> user_msnm, user_msnm );
373     }
374    
375    
376     void account::setPass( const char* pass )
377     {
378     setValue( &this -> pass, pass );
379     }
380    
381     void account::setPosts( int posts ){ this -> posts = posts; }
382    
383     void account::setAttachsig( int attachsig ){ this -> attachsig = attachsig; }
384    
385     void account::setRank( int rank ){ this -> rank = rank; }
386    
387     void account::setLevel( int level ){ this -> level = level; }
388    
389     void account::setTheme( const char* theme )
390     {
391     setValue( &this -> theme, theme );
392     }
393    
394     void account::setTimezoneOffset( double timezone_offset ){ this -> timezone_offset = timezone_offset; }
395    
396     void account::setLastLogin( int last_login ){ this -> last_login = last_login; }
397    
398     void account::setUmode( const char* umode )
399     {
400     setValue( &this -> umode, umode );
401     }
402    
403     void account::setUorder( int uorder ){ this -> uorder = uorder; }
404    
405     void account::setNotifyMethod( int notify_method ){ this -> notify_method = notify_method; }
406    
407     void account::setNotifyMode( int notify_mode ){ this -> notify_mode = notify_mode; }
408    
409     void account::setUserOcc( const char* user_occ )
410     {
411     setValue( &this -> user_occ, user_occ );
412     }
413    
414    
415     void account::setBio( const char* bio )
416     {
417     setValue( &this -> bio, bio );
418     }
419    
420     void account::setUserIntrest( const char* user_intrest )
421     {
422     setValue( &this->user_intrest, user_intrest );
423     }
424    
425     void account::setUserMailok( int user_mailok ){ this -> user_mailok = user_mailok; }
426    
427    
428    
429    
430    

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