Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/itemtype.cc

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


Revision 1.2 - (hide annotations) (download) (as text)
Mon Jan 24 10:51:11 2005 UTC (19 years, 2 months ago) by youi
Branch: MAIN
CVS Tags: mv_to_sourceforge_20050217, demo20050128
Changes since 1.1: +20 -7 lines
File MIME type: text/x-c++src
モジュールID,アイテムタイプ表示名の扱いを追加した.

1 youi 1.1 /*
2     *
3 youi 1.2 * $Revision: 1.1 $
4     * $Log: itemtype.cc,v $
5     * Revision 1.1 2005/01/14 04:28:07 youi
6     * initial version
7     *
8 youi 1.1 *
9     */
10     #include <string.h>
11    
12     #include "common.h"
13     #include "itemtype.h"
14    
15    
16     itemtype::itemtype()
17     {
18     item_type_id = 0;
19 youi 1.2 mid = 0;
20     memset( name, '\0', XNP_ITEMTYPE_NAME_LEN + 1 );
21     memset( display_name, '\0', XNP_ITEMTYPE_DISPLAY_NAME_LEN + 1 );
22 youi 1.1 }
23    
24     itemtype::~itemtype(){}
25    
26     itemtypeid_t itemtype::getItemTypeID() const { return item_type_id; }
27 youi 1.2 const char* itemtype::getName() const { return name; }
28     const char* itemtype::getDisplayName() const { return display_name; }
29     itemtypeid_t itemtype::getModuleID() const { return mid; }
30 youi 1.1
31     void itemtype::setItemTypeID( itemtypeid_t x ){ this -> item_type_id = x; }
32 youi 1.2 void itemtype::setName( const char* x )
33 youi 1.1 {
34 youi 1.2 strncpy( this -> name, x, XNP_ITEMTYPE_NAME_LEN );
35     this -> name[ XNP_ITEMTYPE_NAME_LEN ] = '\0';
36 youi 1.1 }
37 youi 1.2 void itemtype::setDisplayName( const char* x )
38     {
39     strncpy( this -> display_name, x, XNP_ITEMTYPE_DISPLAY_NAME_LEN );
40     this -> display_name[ XNP_ITEMTYPE_DISPLAY_NAME_LEN ] = '\0';
41     }
42     void itemtype::setModuleID( unsigned int x ){ this -> mid = x; }

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