Deleted Added
sdiff udiff text old ( 13127:d3318222cf09 ) new ( 13161:8bef8ce2784f )
full compact
1/*
2 * Copyright 2018 Google, Inc.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met: redistributions of source code must retain the above copyright
7 * notice, this list of conditions and the following disclaimer;
8 * redistributions in binary form must reproduce the above copyright

--- 21 unchanged lines hidden (view full) ---

30#include "systemc/core/object.hh"
31
32#include <algorithm>
33
34#include "base/logging.hh"
35#include "systemc/core/event.hh"
36#include "systemc/core/module.hh"
37#include "systemc/core/scheduler.hh"
38
39namespace sc_gem5
40{
41
42namespace
43{
44
45ObjectsIt

--- 31 unchanged lines hidden (view full) ---

77 for (auto event: *events)
78 if (!strcmp(event->basename(), name.c_str()))
79 return false;
80 return true;
81}
82
83} // anonymous namespace
84
85Object::Object(sc_core::sc_object *_sc_obj) : Object(_sc_obj, "object") {}
86
87Object::Object(sc_core::sc_object *_sc_obj, const char *obj_name) :
88 _sc_obj(_sc_obj), _basename(obj_name ? obj_name : ""), parent(nullptr)
89{
90 if (_basename == "")
91 _basename = "object";
92
93 Module *p = currentModule();
94 if (!p)
95 p = callbackModule();
96
97 Module *n = newModule();
98 if (n) {
99 // We are a module in the process of being constructed.

--- 200 unchanged lines hidden ---