Go to the documentation of this file.
47 findObjectIn(
Objects &objects,
const std::string &
name)
50 for (it = objects.begin(); it != objects.end(); it++)
51 if (!strcmp((*it)->name(),
name.c_str()))
60 objects->emplace(objects->end(),
object);
64 popObject(
Objects *objects,
const std::string &
name)
67 assert(it != objects->end());
68 std::swap(objects->back(), *it);
75 for (
auto obj: *objects)
76 if (!strcmp(obj->basename(),
name.c_str()))
78 for (
auto event: *events)
79 if (!strcmp(
event->basename(),
name.c_str()))
89 _sc_obj(_sc_obj), _basename(obj_name ? obj_name :
""), parent(nullptr)
113 std::string path =
"";
115 path = std::string(sc_p->
basename()) + std::string(
".") + path;
120 std::string message = path + original_name +
121 ". Latter declaration will be renamed to " +
129 Object(_sc_obj, arg._basename.c_str())
143 child->_gem5_object->parent =
nullptr;
160 return _name.c_str();
178 out <<
"name = " <<
name() <<
"\n";
257 assert(it !=
events.end());
258 std::swap(*it,
events.back());
265 std::string seed =
base;
278 std::string seed =
base;
299 return it ==
allObjects.end() ? nullptr : *it;
305 std::stack<sc_core::sc_object *> objParentStack;
312 if (!objParentStack.empty())
313 return objParentStack.top();
sc_core::sc_object * pickParentObj()
static Object * getFromScObject(sc_core::sc_object *sc_obj)
void print(std::ostream &=std::cout) const
sc_core::sc_attr_base * get_attribute(const std::string &)
Object(sc_core::sc_object *_sc_obj)
const std::vector< sc_core::sc_object * > & getTopLevelScObjects()
sc_gem5::Object * _gem5_object
static Event * getFromScEvent(sc_core::sc_event *e)
Events::iterator EventsIt
const char * basename() const
std::string pickUniqueName(::sc_core::sc_object *parent, std::string base)
const std::vector< sc_core::sc_object * > & get_child_objects() const
sc_core::sc_attr_cltn & attr_cltn()
EventsIt addChildEvent(sc_core::sc_event *e)
sc_core::sc_attr_base * remove_attribute(const std::string &)
sc_simcontext * sc_get_curr_simcontext()
const char * name() const
sc_core::sc_object * _sc_obj
sc_core::sc_attr_cltn cltn
const char * sc_gen_unique_name(const char *seed)
sc_core::sc_simcontext * simcontext() const
sc_attr_base * remove(const std::string &name)
const std::string & name()
int num_attributes() const
const char SC_ID_INSTANCE_EXISTS_[]
void dump(std::ostream &=std::cout) const
void delChildEvent(sc_core::sc_event *e)
sc_core::sc_object * parent
void pushParentObj(sc_core::sc_object *obj)
sc_core::sc_object * findObject(const char *name, const Objects &objects)
#define SC_REPORT_WARNING(msg_type, msg)
std::string pickUniqueName(std::string name)
const std::vector< sc_core::sc_event * > & get_child_events() const
Objects::iterator ObjectsIt
std::vector< sc_core::sc_object * > Objects
void remove_all_attributes()
virtual const char * kind() const
Object & operator=(const Object &)
bool add_attribute(sc_core::sc_attr_base &)
bool push_back(sc_attr_base *)
sc_core::sc_object * get_parent_object() const
sc_object * get_parent_object() const
const char * basename() const
Generated on Wed Sep 30 2020 14:02:14 for gem5 by doxygen 1.8.17