Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips/AL/itemtype.cc

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


Revision 1.3 - (show annotations) (download) (as text)
Tue Mar 15 04:49:40 2005 UTC (19 years ago) by tani
Branch: MAIN
CVS Tags: RELEASE_1_0_0, RELEASE_1_0_1
Changes since 1.2: +24 -1 lines
File MIME type: text/x-c++src
ライセンス文を追加.

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 *
23 * $Revision: 1.2 $
24 * $Log: itemtype.cc,v $
25 * Revision 1.2 2005/01/24 10:51:11 youi
26 * 鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申ID鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申.
27 *
28 * Revision 1.1 2005/01/14 04:28:07 youi
29 * initial version
30 *
31 *
32 */
33 #include <string.h>
34
35 #include "common.h"
36 #include "itemtype.h"
37
38
39 itemtype::itemtype()
40 {
41 item_type_id = 0;
42 mid = 0;
43 memset( name, '\0', XNP_ITEMTYPE_NAME_LEN + 1 );
44 memset( display_name, '\0', XNP_ITEMTYPE_DISPLAY_NAME_LEN + 1 );
45 }
46
47 itemtype::~itemtype(){}
48
49 itemtypeid_t itemtype::getItemTypeID() const { return item_type_id; }
50 const char* itemtype::getName() const { return name; }
51 const char* itemtype::getDisplayName() const { return display_name; }
52 itemtypeid_t itemtype::getModuleID() const { return mid; }
53
54 void itemtype::setItemTypeID( itemtypeid_t x ){ this -> item_type_id = x; }
55 void itemtype::setName( const char* x )
56 {
57 strncpy( this -> name, x, XNP_ITEMTYPE_NAME_LEN );
58 this -> name[ XNP_ITEMTYPE_NAME_LEN ] = '\0';
59 }
60 void itemtype::setDisplayName( const char* x )
61 {
62 strncpy( this -> display_name, x, XNP_ITEMTYPE_DISPLAY_NAME_LEN );
63 this -> display_name[ XNP_ITEMTYPE_DISPLAY_NAME_LEN ] = '\0';
64 }
65 void itemtype::setModuleID( unsigned int x ){ this -> mid = x; }

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