Develop and Download Open Source Software

Browse CVS Repository

Annotation of /xoonips/AL/item.cc

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


Revision 1.9 - (hide annotations) (download) (as text)
Tue Aug 23 07:34:52 2005 UTC (18 years, 7 months ago) by tani
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.8: +4 -2 lines
File MIME type: text/x-c++src
Language対応:getLang, setLangを追加.

1 aga 1.1 /*
2 tani 1.8 * --------------------------------------------------------------------------
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 aga 1.1 *
23     * 鐃緒申鐃緒申鐃緒申鐃緒申(BasicInformation)鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申鐃緒申
24     *
25 tani 1.9 * $Revision: 1.8 $
26 aga 1.1 */
27    
28     #include <stdlib.h>
29 orrisroot 1.7 #include <time.h>
30 aga 1.1
31     #include "item.h"
32     #include "common.h"
33    
34     item::item()
35     {
36     iid = 0;
37     itemTypeID = 0;
38     contributorUID = 0;
39 aga 1.2 title = 0; setValue( &title, "" );
40     keywords = 0; setValue( &keywords, "" );
41     description = 0; setValue( &description, "" );
42 youi 1.4 doi = 0; setValue( &doi, "" );
43 tani 1.9 strncpy( ( char* )lang, "eng", XNP_ITEM_LANG_LEN + 1);
44 aga 1.1 lastUpdateDate = 0;
45     creationDate = 0;
46     }
47    
48     item::~item()
49     {
50     if( title != 0 ) delete[] title;
51     if( keywords != 0 ) delete[] keywords;
52     if( description != 0 ) delete[] description;
53 youi 1.4 if( doi != 0 ) delete[] doi;
54 aga 1.1 }
55    
56 youi 1.4 itemid_t item::getItemID() const { return iid; }
57     itemtypeid_t item::getItemTypeID() const { return itemTypeID; }
58     userid_t item::getContributorUID() const { return contributorUID; }
59 aga 1.1 const char *item::getTitle() const { return title; }
60     const char *item::getKeywords() const { return keywords; }
61     const char *item::getDescription() const { return description; }
62 youi 1.4 const char* item::getDOI() const { return doi; }
63 aga 1.1 time_t item::getLastUpdateDate() const { return lastUpdateDate; }
64     time_t item::getCreationDate() const { return creationDate; }
65 youi 1.6 unsigned int item::getPublicationYear() const { return publicationYear; }
66     unsigned int item::getPublicationMonth() const { return publicationMonth; }
67     unsigned int item::getPublicationMday() const { return publicationMday; }
68 tani 1.9 const char* item::getLang() const { return lang; }
69 aga 1.1
70 youi 1.4 void item::setItemID(itemid_t iid_){ iid = iid_; }
71     void item::setItemTypeID(itemtypeid_t itemTypeID_){ itemTypeID = itemTypeID_; }
72     void item::setContributorUID(userid_t contributorUID_){ contributorUID = contributorUID_; }
73 aga 1.1 void item::setTitle(const char* title_){ setValue( &this -> title, title_ ); }
74     void item::setKeywords(const char* keywords_){ setValue( &this -> keywords, keywords_ ); }
75 aga 1.2 void item::setDescription(const char* description_){ setValue( &this -> description, description_ ); }
76 youi 1.4 void item::setDOI( const char* doi_ ){ setValue( &this -> doi, doi_ ); }
77 aga 1.1 void item::setLastUpdateDate(time_t lastUpdateDate_){ lastUpdateDate = lastUpdateDate_; }
78     void item::setCreationDate(time_t creationDate_){ creationDate = creationDate_; }
79 youi 1.6 void item::setPublicationYear(unsigned int publicationYear_){ publicationYear = publicationYear_; }
80     void item::setPublicationMonth(unsigned int publicationMonth_){ publicationMonth = publicationMonth_; }
81     void item::setPublicationMday(unsigned int publicationMday_){ publicationMday = publicationMday_; }
82 tani 1.9 void item::setLang( const char* lang_ ){ strncpy( ( char* )lang, lang_, XNP_ITEM_LANG_LEN + 1 ); lang[ XNP_ITEM_LANG_LEN ] = '\0'; }

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