1/* 2 * Copyright (c) 2001-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 59 unchanged lines hidden (view full) --- 68 : _params(p) 69{ 70#ifdef DEBUG 71 doDebugBreak = false; 72#endif 73 74 doRecordEvent = !Stats::event_ignore.match(name()); 75 simObjectList.push_back(this); |
76} 77 78// 79// SimObject constructor: used to maintain static simObjectList 80// 81SimObject::SimObject(const string &_name) 82 : _params(new Params) 83{ 84 _params->name = _name; 85#ifdef DEBUG 86 doDebugBreak = false; 87#endif 88 89 doRecordEvent = !Stats::event_ignore.match(name()); 90 simObjectList.push_back(this); |
91} 92 93void 94SimObject::connect() 95{ 96} 97 98void --- 115 unchanged lines hidden (view full) --- 214 215 for (; ri != rend; ++ri) { 216 SimObject *obj = *ri; 217 obj->nameOut(os); 218 obj->serialize(os); 219 } 220} 221 |
222#ifdef DEBUG 223// 224// static function: flag which objects should have the debugger break 225// 226void 227SimObject::debugObjectBreak(const string &objs) 228{ 229 SimObjectList::const_iterator i = simObjectList.begin(); 230 SimObjectList::const_iterator end = simObjectList.end(); 231 232 ObjectMatch match(objs); 233 for (; i != end; ++i) { 234 SimObject *obj = *i; 235 obj->doDebugBreak = match.match(obj->name()); 236 } 237} 238 |
239void 240debugObjectBreak(const char *objs) 241{ 242 SimObject::debugObjectBreak(string(objs)); 243} 244#endif 245 246void 247SimObject::recordEvent(const std::string &stat) 248{ 249 if (doRecordEvent) 250 Stats::recordEvent(stat); 251} 252 |
253void |
254SimObject::drain(Serializer *serializer) |
255{ |
256 serializer->signalDrained(); |
257} 258 |
259DEFINE_SIM_OBJECT_CLASS_NAME("SimObject", SimObject) |