Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips/AL/group.cc

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


Revision 1.2 - (show annotations) (download) (as text)
Thu Nov 25 08:58:39 2004 UTC (19 years, 4 months ago) by youi
Branch: MAIN
Changes since 1.1: +9 -2 lines
File MIME type: text/x-c++src
gname, descをコンストラクタ内で0に初期化.

1 /*
2 * Platform?違???若??膊∞???????????????劫?臂?/span>
3 *
4 * $Revision: 1.1 $
5 * $Log: group.cc,v $
6 * Revision 1.1 2004/11/22 08:25:16 youi
7 * initial version.
8 *
9 *
10 */
11 #include <time.h>
12 #include <string.h>
13
14 #include "group.h"
15 #include "common.h"
16
17 group::group()
18 {
19 // char???ゃ?潟?帥??0?у??????/span>
20 gname = 0;
21 desc = 0;
22
23 gid = 0;
24 setValue( &this -> gname, "" );
25 setValue( &this -> desc, "" );
26 }
27
28 group::group( int gid, const char* gname, const char* desc )
29 {
30 this -> gid = gid;
31 setValue( &this -> gname, gname );
32 setValue( &this -> desc, desc );
33 }
34
35 group::~group()
36 {
37 if( gname != 0 ){ delete[] gname; }
38 if( desc != 0 ){ delete[] desc; }
39 }
40
41 int group::getGID(){ return gid; }
42 const char* group::getGname(){ return gname; }
43 const char* group::getDesc(){ return desc; }
44
45 void group::setGID( int gid ){ this -> gid = gid; }
46 void group::setGname( const char *gname ){ setValue( &this -> gname, gname ); }
47 void group::setDesc( const char *desc ){ setValue( &this -> desc, desc ); }
48

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