sc_object.cc revision 12837:413a7b490b1b
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
9 * notice, this list of conditions and the following disclaimer in the
10 * documentation and/or other materials provided with the distribution;
11 * neither the name of the copyright holders nor the names of its
12 * contributors may be used to endorse or promote products derived from
13 * this software without specific prior written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 *
27 * Authors: Gabe Black
28 */
29
30#include "base/logging.hh"
31#include "systemc/ext/core/sc_object.hh"
32
33namespace sc_core
34{
35
36const char *
37sc_object::name() const
38{
39    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
40    return "sc_object";
41}
42
43const char *
44sc_object::basename() const
45{
46    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
47    return "sc_object";
48}
49
50const char *
51sc_object::kind() const
52{
53    return "sc_object";
54}
55
56void
57sc_object::print(std::ostream &out) const
58{
59    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
60}
61
62void
63sc_object::dump(std::ostream &out) const
64{
65    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
66}
67
68const std::vector<sc_object *> &
69sc_object::get_child_objects() const
70{
71    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
72    return *(const std::vector<sc_object *> *)nullptr;
73}
74
75const std::vector<sc_event *> &
76sc_object::get_child_events() const
77{
78    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
79    return *(const std::vector<sc_event *> *)nullptr;
80}
81
82sc_object *
83sc_object::get_parent_object() const
84{
85    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
86    return NULL;
87}
88
89bool
90sc_object::add_attribute(sc_attr_base &)
91{
92    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
93    return false;
94}
95
96sc_attr_base *
97sc_object::get_attribute(const std::string &)
98{
99    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
100    return NULL;
101}
102
103sc_attr_base *
104sc_object::remove_attribute(const std::string &)
105{
106    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
107    return NULL;
108}
109
110void
111sc_object::remove_all_attributes()
112{
113    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
114}
115
116int
117sc_object::num_attributes() const
118{
119    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
120    return 0;
121}
122
123sc_attr_cltn &
124sc_object::attr_cltn()
125{
126    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
127    return *(sc_attr_cltn *)NULL;
128}
129
130const sc_attr_cltn &
131sc_object::attr_cltn() const
132{
133    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
134    return *(sc_attr_cltn *)NULL;
135}
136
137sc_object::sc_object()
138{
139    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
140}
141
142sc_object::sc_object(const char *name)
143{
144    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
145}
146
147sc_object::sc_object(const sc_object &arg)
148{
149    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
150}
151
152sc_object &
153sc_object::operator = (const sc_object &)
154{
155    return *this;
156}
157
158sc_object::~sc_object()
159{
160    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
161}
162
163const std::vector<sc_object *> &
164sc_get_top_level_objects()
165{
166    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
167    return *(const std::vector<sc_object *> *)nullptr;
168}
169
170sc_object *
171sc_find_object(const char *)
172{
173    warn("%s not implemented.\n", __PRETTY_FUNCTION__);
174    return NULL;
175}
176
177} // namespace sc_core
178