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.8 - (show annotations) (download) (as text)
Mon Aug 29 02:02:56 2005 UTC (18 years, 6 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.7: +5 -1 lines
File MIME type: text/x-c++src
・valgrindでエラーが出るのを修正.

1 /*
2 * --------------------------------------------------------------------------
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 * Platform鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
23 *
24 * $Revision: 1.7 $
25 * $Log: group.cc,v $
26 * Revision 1.7 2005/03/15 04:49:40 tani
27 * 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申.
28 *
29 * Revision 1.6 2005/02/25 07:00:37 tani
30 * item_number_limit, index_number_limit, item_storage_limit鐃緒申鐃緒申鐃緒申.
31 *
32 * Revision 1.5 2005/01/15 05:31:43 youi
33 * groupid_t鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申.
34 *
35 * Revision 1.4 2005/01/14 10:33:53 aga
36 * 鐃緒申int groupIndexID鐃緒申鐃緒申鐃緒申.
37 *
38 * Revision 1.3 2004/11/30 02:29:54 aga
39 * 鐃緒申getXxxx()鐃緒申const鐃緒申鐃緒申鐃緒申.
40 *
41 * Revision 1.2 2004/11/25 08:58:39 youi
42 * gname, desc鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申0鐃緒申鐃緒申鐃緒申鐃緒申.
43 *
44 * Revision 1.1 2004/11/22 08:25:16 youi
45 * initial version.
46 *
47 *
48 */
49 #include <time.h>
50 #include <string.h>
51
52 #include "group.h"
53 #include "common.h"
54
55 group::group()
56 {
57 // char鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申0鐃緒申鐃緒申鐃緒申鐃緒申
58 gname = 0;
59 desc = 0;
60
61 gid = 0;
62 setValue( &this -> gname, "" );
63 setValue( &this -> desc, "" );
64 groupIndexID = 0;
65 itemStorageLimit = 0;
66 }
67
68 group::group( groupid_t gid, const char* gname, const char* desc )
69 {
70 this -> gid = gid;
71 setValue( &this -> gname, gname );
72 setValue( &this -> desc, desc );
73 }
74
75 group::~group()
76 {
77 if( gname != 0 ){ delete[] gname; }
78 if( desc != 0 ){ delete[] desc; }
79 }
80
81 groupid_t group::getGID() const{ return gid; }
82 const char* group::getGname() const{ return gname; }
83 const char* group::getDesc() const{ return desc; }
84 int group::getGroupIndexID() const{ return groupIndexID; }
85 int group::getItemNumberLimit() const { return itemNumberLimit; }
86 int group::getIndexNumberLimit() const { return indexNumberLimit; }
87 double group::getItemStorageLimit() const { return itemStorageLimit; }
88
89 void group::setGID( groupid_t gid ){ this -> gid = gid; }
90 void group::setGname( const char *gname ){ setValue( &this -> gname, gname ); }
91 void group::setDesc( const char *desc ){ setValue( &this -> desc, desc ); }
92 void group::setGroupIndexID( int xid ){ this -> groupIndexID = xid; }
93 void group::setItemNumberLimit( int x ){ itemNumberLimit = x; }
94 void group::setIndexNumberLimit( int x ){ indexNumberLimit = x; }
95 void group::setItemStorageLimit( double x ){ itemStorageLimit = x; }
96

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