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