Develop and Download Open Source Software

Browse CVS Repository

Contents of /xoonips/AL/itembasic.cc

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


Revision 1.2 - (show annotations) (download) (as text)
Wed Jan 19 10:29:10 2005 UTC (19 years, 2 months ago) by youi
Branch: MAIN
CVS Tags: MergePnt_20051220, merge_to_20060605, XOONIPS_RC1, RELEASE_1_0_1, AL_PORTING, HEAD
Branch point for: XOONIPS_STABLE, XOONIPS_STABLE_3
Changes since 1.1: +5 -2 lines
File MIME type: text/x-c++src
FILE REMOVED
*** empty log message ***

1 /*
2 *
3 * $Revision: 1.1 $
4 * $Log: itembasic.cc,v $
5 * Revision 1.1 2005/01/14 04:28:07 youi
6 * initial version
7 *
8 *
9 */
10 #include <time.h>
11 #include <string.h>
12
13 #include "common.h"
14 #include "itembasic.h"
15 #include "itemtype.h"
16
17
18 itembasic::itembasic()
19 {
20 item_id = 0;
21 item_type_id = 0;
22 memset( title, '\0', XNP_ITEMBASIC_TITLE_LEN + 1 );
23 keywords = 0;
24 description = 0;
25 doi = 0;
26 creation_date = 0;
27 last_update_date = 0;
28
29 setValue( &keywords, "" );
30 setValue( &description, "" );
31 setValue( &doi, "" );
32 }
33
34 itembasic::~itembasic()
35 {
36 if( keywords != 0 ) delete[] keywords;
37 if( description != 0 ) delete[] description;
38 if( doi != 0 ) delete[] doi;
39 }
40
41 itemid_t itembasic::getItemID() const { return item_id; }
42 itemtypeid_t itembasic::getItemTypeID() const { return item_type_id; }
43 const char* itembasic::getTitle() const { return title; }
44 const char* itembasic::getKeywords() const { return keywords; }
45 const char* itembasic::getDescription() const { return description; }
46 const char* itembasic::getDOI() const { return doi; }
47 time_t itembasic::getCreationDate() const { return creation_date; }
48 time_t itembasic::getLastModifiedDate() const { return last_update_date; }
49
50 void itembasic::setItemID( itemid_t x ){ this -> item_id = x; }
51 void itembasic::setItemTypeID( itemtypeid_t x ){ this -> item_type_id = x; }
52 void itembasic::setTitle( const char* x )
53 {
54 strncpy( this -> title, x, XNP_ITEMBASIC_TITLE_LEN );
55 this -> title[ XNP_ITEMBASIC_TITLE_LEN ] = '\0';
56 }
57 void itembasic::setKeywords( const char* x ){ setValue( &this -> keywords, x ); }
58 void itembasic::setDescription( const char* x ){ setValue( &this -> description, x ); }
59 void itembasic::setDOI( const char* x ){ setValue( &this -> doi, x ); }
60 void itembasic::setCreationDate( time_t x ){ this -> creation_date = x; }
61 void itembasic::setLastModifiedDate( time_t x ){ this -> last_update_date = x; }

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