00001 #ifndef LIVING_ITEM_IMPLEMENTATION_FILE 00002 #define LIVING_ITEM_IMPLEMENTATION_FILE 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : living_item * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 1996-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00018 #include "living_item.h" 00019 00020 #include <basis/istring.h> 00021 #include <basis/function.h> 00022 #include <mechanisms/heartbeat.h> 00023 00024 living_item::living_item(const unique_int &id, const heartbeat &initial_beat) 00025 : catalogable(id), 00026 _liveness(new heartbeat(initial_beat)) 00027 {} 00028 00029 living_item::~living_item() { WHACK(_liveness); } 00030 00031 heartbeat &living_item::liveness() { return *_liveness; } 00032 00033 const heartbeat &living_item::liveness() const { return *_liveness; } 00034 00035 void living_item::liveness(const heartbeat &new_beat) 00036 { *_liveness = new_beat; } 00037 00038 00039 #endif //LIVING_ITEM_IMPLEMENTATION_FILE 00040
1.5.1