00001 //********************************************************************** 00002 // * 00003 // Filename: bclarch.cpp * 00004 // Date: 23 Mar 2002 * 00005 // File Version: 1 * 00006 // * 00007 // Author: Chris White (whitecf@bcs.org.uk) * 00008 // Company: Monitor Computing Services Ltd. * 00009 // * 00010 //********************************************************************** 00011 // * 00012 // Copyright (C) 2002 Monitor Computing Services Ltd. * 00013 // * 00014 // This program is free software; you can redistribute it and/or * 00015 // modify it under the terms of the GNU General Public License * 00016 // as published by the Free Software Foundation; either version 2 * 00017 // of the License, or any later version. * 00018 // * 00019 // This program is distributed in the hope that it will be useful, * 00020 // but WITHOUT ANY WARRANTY; without even the implied warranty of * 00021 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00022 // GNU General Public License for more details. * 00023 // * 00024 // You should have received a copy of the GNU General Public * 00025 // License (http://www.gnu.org/copyleft/gpl.html) along with this * 00026 // program; if not, write to: * 00027 // The Free Software Foundation Inc., * 00028 // 59 Temple Place - Suite 330, * 00029 // Boston, MA 02111-1307, * 00030 // USA. * 00031 // * 00032 //********************************************************************** 00033 // * 00034 // Notes: * 00035 // * 00036 //********************************************************************** 00037 00038 #include "bcarch.h" 00039 #include "bclist.h" 00040 #include "bellcode.h" 00041 #include "mytrace.h" 00042 00043 #include "bclarch.h" 00044 00045 00046 using namespace Monitor::BellMaster; 00047 00048 00049 00050 BellCodeListArchive::BellCodeListArchive( 00051 BellCodeArchive& newBellCodeArchive) : 00052 bellCodeArchive(newBellCodeArchive) 00053 { 00054 _USEMYTRACE_("BellCodeListArchive::BellCodeListArchive()") 00055 } 00056 00057 00058 00059 void 00060 BellCodeListArchive::store(const BellCodeList& target) 00061 { 00062 _USEMYTRACE_("BellCodeListArchive::store()") 00063 00064 unsigned index = target.size(); 00065 00066 while (0 < index) 00067 { 00068 index--; 00069 bellCodeArchive.store(target[index]); 00070 } 00071 } 00072 00073 00074 00075 void 00076 BellCodeListArchive::retrieve(BellCodeList& target) 00077 { 00078 _USEMYTRACE_("BellCodeListArchive::retrieve()") 00079 00080 target.clear(); 00081 00082 BellCode retrievedBellCode; 00083 00084 while (bellCodeArchive.retrieve(retrievedBellCode)) 00085 { 00086 target.addBellCode(retrievedBellCode); 00087 } 00088 }