| 1 |
youi |
1.1 |
/* |
| 2 |
|
|
* $Revision$ |
| 3 |
|
|
*/ |
| 4 |
|
|
|
| 5 |
|
|
#include "pubmed.h" |
| 6 |
|
|
#include "common.h" |
| 7 |
|
|
|
| 8 |
|
|
#if defined(_MSC_VER) |
| 9 |
|
|
#define snprintf _snprintf |
| 10 |
|
|
int _fltused = 0x9875; |
| 11 |
|
|
#endif |
| 12 |
|
|
|
| 13 |
|
|
pubmed::pubmed() |
| 14 |
|
|
{ |
| 15 |
|
|
title=0; setValue( &title, "" ); |
| 16 |
|
|
author=0; setValue( &author, "" ); |
| 17 |
|
|
journal=0; setValue( &journal, "" ); |
| 18 |
|
|
abstract=0; setValue( &abstract, "" ); |
| 19 |
|
|
page=0; setValue( &page, "" ); |
| 20 |
|
|
id = pub_year = volume = number = 0; |
| 21 |
|
|
} |
| 22 |
|
|
|
| 23 |
|
|
pubmed::~pubmed() |
| 24 |
|
|
{ |
| 25 |
|
|
delete[] title; |
| 26 |
|
|
delete[] author; |
| 27 |
|
|
delete[] journal; |
| 28 |
|
|
delete[] abstract; |
| 29 |
|
|
delete[] page; |
| 30 |
|
|
} |
| 31 |
|
|
|
| 32 |
|
|
pubmedid_t pubmed::getID( ) const { return id; } |
| 33 |
|
|
const char* pubmed::getTitle( ) const { return title; } |
| 34 |
|
|
const char* pubmed::getAuthor( ) const { return author; } |
| 35 |
|
|
const char* pubmed::getJournal( ) const { return journal; } |
| 36 |
|
|
int pubmed::getPubYear( ) const { return pub_year; } |
| 37 |
|
|
int pubmed::getVolume( ) const { return volume; } |
| 38 |
|
|
int pubmed::getNumber( ) const { return number; } |
| 39 |
|
|
const char* pubmed::getPage( ) const { return page; } |
| 40 |
|
|
const char* pubmed::getAbstract( ) const { return abstract; } |
| 41 |
|
|
|
| 42 |
|
|
void pubmed::setID( pubmedid_t x ){ this -> id = x; } |
| 43 |
|
|
void pubmed::setTitle( const char* x ){ setValue( &this -> title, x ); } |
| 44 |
|
|
void pubmed::setAuthor( const char* x ){ setValue( &this -> author, x ); } |
| 45 |
|
|
void pubmed::setJournal( const char* x ){ setValue( &this -> journal, x ); } |
| 46 |
|
|
void pubmed::setPubYear( int x ){ this -> pub_year = x; } |
| 47 |
|
|
void pubmed::setVolume( int x ){ this -> volume = x; } |
| 48 |
|
|
void pubmed::setNumber( int x ){ this -> number = x; } |
| 49 |
|
|
void pubmed::setPage( const char* x ){ setValue( &this -> page, x ); } |
| 50 |
|
|
void pubmed::setAbstract( const char* x ){ setValue( &this -> abstract, x ); } |