1 /* 2 * Simulator of microcontrollers (sim.src/varcl.h) 3 * 4 * Copyright (C) @@S@@,@@Y@@ Drotos Daniel, Talker Bt. 5 * 6 * To contact author send email to drdani@mazsola.iit.uni-miskolc.hu 7 * 8 */ 9 10 /* 11 This file is part of microcontroller simulator: ucsim. 12 13 UCSIM is free software; you can redistribute it and/or modify 14 it under the terms of the GNU General Public License as published by 15 the Free Software Foundation; either version 2 of the License, or 16 (at your option) any later version. 17 18 UCSIM is distributed in the hope that it will be useful, 19 but WITHOUT ANY WARRANTY; without even the implied warranty of 20 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 GNU General Public License for more details. 22 23 You should have received a copy of the GNU General Public License 24 along with UCSIM; see the file COPYING. If not, write to the Free 25 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 26 02111-1307, USA. 27 */ 28 /*@1@*/ 29 30 #ifndef SIM_VARCL_HEADER 31 #define SIM_VARCL_HEADER 32 33 34 #include "pobjcl.h" 35 36 #include "newcmdcl.h" 37 38 #include "memcl.h" 39 40 41 class cl_var: public cl_base 42 { 43 public: 44 class cl_address_space *as; // reference 45 t_addr addr; 46 int bitnr; 47 chars desc; 48 protected: 49 class cl_memory_cell *cell; 50 public: 51 cl_var(const char *iname, class cl_address_space *ias, t_addr iaddr, chars adesc, int ibitnr= -1); 52 virtual int init(void); get_cell(void)53 virtual class cl_memory_cell *get_cell(void) { return cell; } 54 55 virtual void print_info(cl_console_base *con); 56 }; 57 58 59 class cl_var_list: public cl_sorted_list 60 { 61 public: cl_var_list()62 cl_var_list(): cl_sorted_list(10, 10, "symlist") {} 63 public: 64 virtual void *key_of(void *item); 65 virtual int compare(void *key1, void *key2); 66 }; 67 68 69 #endif 70 71 /* End of sim.src/varcl.h */ 72