Browse CVS Repository
Contents of /xoonips/AL/itemtype.cc
Parent Directory
| Revision Log
| Revision Graph
Revision 1.1 -
( show annotations)
( download)
( as text)
Fri Jan 14 04:28:07 2005 UTC
(19 years, 2 months ago)
by youi
Branch: MAIN
File MIME type: text/x-c++src
initial version
| 1 |
/* |
| 2 |
* |
| 3 |
* $Revision$ |
| 4 |
* $Log$ |
| 5 |
* |
| 6 |
*/ |
| 7 |
#include <string.h> |
| 8 |
|
| 9 |
#include "common.h" |
| 10 |
#include "itemtype.h" |
| 11 |
|
| 12 |
|
| 13 |
itemtype::itemtype() |
| 14 |
{ |
| 15 |
item_type_id = 0; |
| 16 |
memset( item_type, '\0', XNP_ITEMTYPE_ITEMTYPE_LEN + 1 ); |
| 17 |
} |
| 18 |
|
| 19 |
itemtype::~itemtype(){} |
| 20 |
|
| 21 |
itemtypeid_t itemtype::getItemTypeID() const { return item_type_id; } |
| 22 |
const char* itemtype::getItemType() const { return item_type; } |
| 23 |
|
| 24 |
void itemtype::setItemTypeID( itemtypeid_t x ){ this -> item_type_id = x; } |
| 25 |
void itemtype::setItemType( const char* x ) |
| 26 |
{ |
| 27 |
strncpy( this -> item_type, x, XNP_ITEMTYPE_ITEMTYPE_LEN ); |
| 28 |
this -> item_type[ XNP_ITEMTYPE_ITEMTYPE_LEN ] = '\0'; |
| 29 |
} |
|