| 1 |
/* |
| 2 |
* |
| 3 |
* -------------------------------------------------------------------------- |
| 4 |
* XooNiPs Xoops modules for Neuroinformatics Platforms |
| 5 |
* Copyright (C) 2005 RIKEN, Japan. All rights reserved. |
| 6 |
* http://sourceforge.jp/projects/xoonips/ |
| 7 |
* -------------------------------------------------------------------------- |
| 8 |
* This program is free software; you can redistribute it and/or |
| 9 |
* modify it under the terms of the GNU General Public License |
| 10 |
* as published by the Free Software Foundation; either version 2 |
| 11 |
* of the License, or (at your option) any later version. |
| 12 |
* |
| 13 |
* This program is distributed in the hope that it will be useful, |
| 14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 |
* GNU General Public License for more details. |
| 17 |
* |
| 18 |
* You should have received a copy of the GNU General Public License |
| 19 |
* along with this program; if not, write to the Free Software |
| 20 |
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
| 21 |
* -------------------------------------------------------------------------- |
| 22 |
* |
| 23 |
* $Revision: 1.3 $ |
| 24 |
* |
| 25 |
*/ |
| 26 |
|
| 27 |
#include <stdlib.h> |
| 28 |
#include <time.h> |
| 29 |
|
| 30 |
#include "common.h" |
| 31 |
#include "changelog.h" |
| 32 |
|
| 33 |
changelog::changelog() |
| 34 |
{ |
| 35 |
logid = 0; |
| 36 |
date = 0; |
| 37 |
log = 0; setValue( &log, "" ); |
| 38 |
} |
| 39 |
|
| 40 |
changelog::changelog( changelogid_t logid_, time_t date_, const char* log_ ) |
| 41 |
{ |
| 42 |
logid = logid_; |
| 43 |
date = date_; |
| 44 |
log = 0; setValue( &log, log_ ); |
| 45 |
} |
| 46 |
|
| 47 |
changelog::~changelog() |
| 48 |
{ |
| 49 |
if( log != 0 ) delete[] log; |
| 50 |
} |
| 51 |
|
| 52 |
changelogid_t changelog::getChangelogID( ) const { return logid; } |
| 53 |
time_t changelog::getDate( ) const { return date; } |
| 54 |
itemid_t changelog::getItemID( ) const { return item_id; } |
| 55 |
const char *changelog::getLog( ) const { return log; } |
| 56 |
|
| 57 |
void changelog::setChangelogID( changelogid_t logid_ ){ logid = logid_; } |
| 58 |
void changelog::setDate( time_t date_ ){ date = date_; } |
| 59 |
void changelog::setItemID( itemid_t item_id_ ){ item_id = item_id_; } |
| 60 |
void changelog::setLog( const char* log_ ){ setValue( &this -> log, log_ ); } |