SystemC Library API Reference Manual
Reference documentation for the Simics SystemC Library.
 
Loading...
Searching...
No Matches
proxy_attribute_setter.h
Go to the documentation of this file.
1/*
2 © 2014 Intel Corporation
3
4 This software and the related documents are Intel copyrighted materials, and
5 your use of them is governed by the express license under which they were
6 provided to you ("License"). Unless the License provides otherwise, you may
7 not use, modify, copy, publish, distribute, disclose or transmit this software
8 or the related documents without Intel's prior written permission.
9
10 This software and the related documents are provided as is, with no express or
11 implied warranties, other than those that are expressly stated in the License.
12*/
13
14#ifndef SIMICS_SYSTEMC_AWARENESS_PROXY_ATTRIBUTE_SETTER_H
15#define SIMICS_SYSTEMC_AWARENESS_PROXY_ATTRIBUTE_SETTER_H
16
19
20#include <systemc>
21#include <list>
22#include <map>
23#include <vector>
24
25namespace simics {
26namespace systemc {
27namespace awareness {
28
30 public:
32 std::map<sc_core::sc_object *, ProxyInterface *> *links,
33 Attributes *attributes)
34 : links_(links), attributes_(attributes) {
35 }
36 void applyOn(sc_core::sc_object *obj) override {
37 Proxy *proxy = dynamic_cast<Proxy *>((*links_)[obj]);
38 if (proxy == NULL)
39 return;
40
41 proxy->set_attributes(attributes_);
42 }
43 void done() override {
44 }
45
46 private:
47 std::map<sc_core::sc_object *, ProxyInterface *> *links_;
48 Attributes *attributes_;
49};
50
51} // namespace awareness
52} // namespace systemc
53} // namespace simics
54
55#endif
Definition: traverser_interface.h:24
Definition: attributes.h:26
Definition: proxy_attribute_setter.h:29
ProxyAttributeSetter(std::map< sc_core::sc_object *, ProxyInterface * > *links, Attributes *attributes)
Definition: proxy_attribute_setter.h:31
void applyOn(sc_core::sc_object *obj) override
Definition: proxy_attribute_setter.h:36
void done() override
Definition: proxy_attribute_setter.h:43
Definition: proxy.h:39
virtual void set_attributes(Attributes *attributes)
Definition: adapter.h:79