| 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 |
* $Revision: 1.2 $ |
| 23 |
*/ |
| 24 |
|
| 25 |
#include "pubmed.h" |
| 26 |
#include "common.h" |
| 27 |
|
| 28 |
#if defined(_MSC_VER) |
| 29 |
#define snprintf _snprintf |
| 30 |
int _fltused = 0x9875; |
| 31 |
#endif |
| 32 |
|
| 33 |
pubmed::pubmed() |
| 34 |
{ |
| 35 |
title=0; setValue( &title, "" ); |
| 36 |
author=0; setValue( &author, "" ); |
| 37 |
journal=0; setValue( &journal, "" ); |
| 38 |
abstract=0; setValue( &abstract, "" ); |
| 39 |
page=0; setValue( &page, "" ); |
| 40 |
id = pub_year = volume = number = 0; |
| 41 |
} |
| 42 |
|
| 43 |
pubmed::~pubmed() |
| 44 |
{ |
| 45 |
delete[] title; |
| 46 |
delete[] author; |
| 47 |
delete[] journal; |
| 48 |
delete[] abstract; |
| 49 |
delete[] page; |
| 50 |
} |
| 51 |
|
| 52 |
pubmedid_t pubmed::getID( ) const { return id; } |
| 53 |
const char* pubmed::getTitle( ) const { return title; } |
| 54 |
const char* pubmed::getAuthor( ) const { return author; } |
| 55 |
const char* pubmed::getJournal( ) const { return journal; } |
| 56 |
int pubmed::getYearOfPublication( ) const { return pub_year; } |
| 57 |
int pubmed::getVolume( ) const { return volume; } |
| 58 |
int pubmed::getNumber( ) const { return number; } |
| 59 |
const char* pubmed::getPage( ) const { return page; } |
| 60 |
const char* pubmed::getAbstract( ) const { return abstract; } |
| 61 |
|
| 62 |
void pubmed::setID( pubmedid_t x ){ this -> id = x; } |
| 63 |
void pubmed::setTitle( const char* x ){ setValue( &this -> title, x ); } |
| 64 |
void pubmed::setAuthor( const char* x ){ setValue( &this -> author, x ); } |
| 65 |
void pubmed::setJournal( const char* x ){ setValue( &this -> journal, x ); } |
| 66 |
void pubmed::setYearOfPublication( int x ){ this -> pub_year = x; } |
| 67 |
void pubmed::setVolume( int x ){ this -> volume = x; } |
| 68 |
void pubmed::setNumber( int x ){ this -> number = x; } |
| 69 |
void pubmed::setPage( const char* x ){ setValue( &this -> page, x ); } |
| 70 |
void pubmed::setAbstract( const char* x ){ setValue( &this -> abstract, x ); } |