OpenASIP 2.2
Loading...
Searching...
No Matches
NullMachine.cc
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2009 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24/**
25 * @file NullMachine.hh
26 *
27 * Implementation of NullMachine class.
28 *
29 * @author Lasse Laasonen 2005 (lasse.laasonen-no.spam-tut.fi)
30 * @note rating: yellow
31 */
32
33#include "NullMachine.hh"
34
35namespace TTAMachine {
36
37NullMachine NullMachine::machine_;
38
39
40/**
41 * The constructor.
42 */
45
46
47/**
48 * The destructor.
49 */
52
53
54/**
55 * Returns the only instance of NullMachine class.
56 *
57 * @return The only instance of NullMachine class.
58 */
63
64
65/**
66 * Aborts the program with an error message.
67 *
68 * @exception ComponentAlreadyExists Never thrown.
69 */
70void
72 abortWithError("NullMachine::addBus");
73}
74
75/**
76 * Aborts the program with an error message.
77 *
78 * @exception ComponentAlreadyExists Never thrown.
79 */
80void
82 abortWithError("NullMachine::addSocket");
83}
84
85/**
86 * Aborts the program with an error message.
87 *
88 * @exception ComponentAlreadyExists Never thrown.
89 * @exception IllegalParameters Never thrown.
90 */
91void
93 abortWithError("NullMachine::addUnit");
94}
95
96/**
97 * Aborts the program with an error message.
98 *
99 * @exception ComponentAlreadyExists Never thrown.
100 * @exception IllegalParameters Never thrown.
101 */
102void
104 abortWithError("NullMachine::addFunctionUnit");
105}
106
107/**
108 * Aborts the program with an error message.
109 *
110 * @exception ComponentAlreadyExists Never thrown.
111 */
112void
114 abortWithError("NullMachine::addImmediateUnit");
115}
116
117/**
118 * Aborts the program with an error message.
119 *
120 * @exception ComponentAlreadyExists Never thrown.
121 */
122void
124 abortWithError("NullMachine::addRegisterFile");
125}
126
127/**
128 * Aborts the program with an error message.
129 *
130 * @exception ComponentAlreadyExists Never thrown.
131 */
132void
134 abortWithError("NullMachine::addAddressSpace");
135}
136
137/**
138 * Aborts the program with an error message.
139 *
140 * @exception ComponentAlreadyExists Never thrown.
141 */
142void
144 abortWithError("NullMachine::addBridge");
145}
146
147/**
148 * Aborts the program with an error message.
149 *
150 * @exception ComponentAlreadyExists Never thrown.
151 */
152void
154 abortWithError("NullMachine::addInstructionTemplate");
155}
156
157/**
158 * Aborts the program with an error message.
159 *
160 * @exception ComponentAlreadyExists Never thrown.
161 */
162void
164 abortWithError("NullMachine::setGlobalControl");
165}
166
167/**
168 * Aborts the program with an error message.
169 */
170void
172 abortWithError("NullMachine::unsetGlobalControl");
173}
174
175
176/**
177 * Aborts the program with an error message.
178 *
179 * @return Never returns.
180 */
183 abortWithError("NullMachine::controlUnit");
184 return NULL;
185}
186
187
188/**
189 * Aborts the program with an error message.
190 *
191 * @exception InstanceNotFound Never thrown.
192 */
193void
195 abortWithError("NullMachine::removeBus");
196}
197
198/**
199 * Aborts the program with an error message.
200 *
201 * @exception InstanceNotFound Never thrown.
202 */
203void
205 abortWithError("NullMachine::removeSocket");
206}
207
208/**
209 * Aborts the program with an error message.
210 *
211 * @exception InstanceNotFound Never thrown.
212 * @exception IllegalParameters Never thrown.
213 */
214void
216 abortWithError("NullMachine::removeUnit");
217}
218
219/**
220 * Aborts the program with an error message.
221 *
222 * @exception InstanceNotFound Never thrown.
223 */
224void
226 abortWithError("NullMachine::removeFunctionUnit");
227}
228
229/**
230 * Aborts the program with an error message.
231 *
232 * @exception InstanceNotFound Never thrown.
233 */
234void
236 abortWithError("NullMachine::removeImmediateUnit");
237}
238
239/**
240 * Aborts the program with an error message.
241 *
242 * @exception InstanceNotFound Never thrown.
243 */
244void
246 abortWithError("NullMachine::removeRegisterFile");
247}
248
249/**
250 * Aborts the program with an error message.
251 *
252 * @exception InstanceNotFound Never thrown.
253 */
254void
256 abortWithError("NullMachine::deleteBridge");
257}
258
259/**
260 * Aborts the program with an error message.
261 *
262 * @exception InstanceNotFound Never thrown.
263 */
264void
266 abortWithError("NullMachine::deleteInstructionTemplate");
267}
268
269/**
270 * Aborts the program with an error message.
271 *
272 * @exception InstanceNotFound Never thrown.
273 */
274void
276 abortWithError("NullMachine::deleteAddressSpace");
277}
278
279/**
280 * Aborts the program with an error message.
281 *
282 * @return Never returns.
283 */
286 abortWithError("NullMachine::busNavigator");
287 return Machine::busNavigator();
288}
289
290
291/**
292 * Aborts the program with an error message.
293 *
294 * @return Never returns.
295 */
298 abortWithError("NullMachine::socketNavigator");
300}
301
302
303/**
304 * Aborts the program with an error message.
305 *
306 * @return Never returns.
307 */
310 abortWithError("NullMachine::functionUnitNavigator");
312}
313
314
315/**
316 * Aborts the program with an error message.
317 *
318 * @return Never returns.
319 */
322 abortWithError("NullMachine::addressSpaceNavigator");
324}
325
326
327/**
328 * Aborts the program with an error message.
329 *
330 * @return Never returns.
331 */
334 abortWithError("NullMachine::bridgeNavigator");
336}
337
338
339/**
340 * Aborts the program with an error message.
341 *
342 * @return Never returns.
343 */
346 abortWithError("NullMachine::immediateUnitNavigator");
348}
349
350
351/**
352 * Aborts the program with an error message.
353 *
354 * @return Never returns.
355 */
358 abortWithError("NullMachine::instructionTemplateNavigator");
360}
361
362
363/**
364 * Aborts the program with an error message.
365 *
366 * @return Never returns.
367 */
370 abortWithError("NullMachine::registerFileNavigator");
372}
373
374
375/**
376 * Aborts the program with an error message.
377 *
378 * @exception ObjectStateLoadingException Never thrown.
379 */
380void
382 abortWithError("NullMachine::loadState");
383}
384
385/**
386 * Aborts the program with an error message.
387 *
388 * @return Never returns.
389 */
392 abortWithError("NullMachine::saveState");
393 return NULL;
394}
395
396}
#define abortWithError(message)
virtual RegisterFileNavigator registerFileNavigator() const
Definition Machine.cc:450
virtual FunctionUnitNavigator functionUnitNavigator() const
Definition Machine.cc:380
virtual BridgeNavigator bridgeNavigator() const
Definition Machine.cc:404
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
Definition Machine.cc:428
virtual SocketNavigator socketNavigator() const
Definition Machine.cc:368
virtual ImmediateUnitNavigator immediateUnitNavigator() const
Definition Machine.cc:416
virtual BusNavigator busNavigator() const
Definition Machine.cc:356
virtual AddressSpaceNavigator addressSpaceNavigator() const
Definition Machine.cc:392
virtual BridgeNavigator bridgeNavigator() const
virtual void removeBus(Bus &bus)
virtual ControlUnit * controlUnit() const
virtual BusNavigator busNavigator() const
virtual void deleteInstructionTemplate(InstructionTemplate &instrTempl)
virtual void removeFunctionUnit(FunctionUnit &unit)
virtual InstructionTemplateNavigator instructionTemplateNavigator() const
virtual void addRegisterFile(RegisterFile &unit)
virtual ObjectState * saveState() const
static NullMachine machine_
The only instance of NullMachine.
virtual void addBus(Bus &bus)
virtual void addImmediateUnit(ImmediateUnit &unit)
static NullMachine & instance()
virtual void removeRegisterFile(RegisterFile &unit)
virtual AddressSpaceNavigator addressSpaceNavigator() const
virtual void unsetGlobalControl()
virtual void deleteAddressSpace(AddressSpace &as)
virtual void setGlobalControl(ControlUnit &unit)
virtual SocketNavigator socketNavigator() const
virtual void addFunctionUnit(FunctionUnit &unit)
virtual void removeSocket(Socket &socket)
virtual void addBridge(Bridge &bridge)
virtual void removeImmediateUnit(ImmediateUnit &unit)
virtual FunctionUnitNavigator functionUnitNavigator() const
virtual RegisterFileNavigator registerFileNavigator() const
virtual void addInstructionTemplate(InstructionTemplate &instrTempl)
virtual void loadState(const ObjectState *state)
virtual void addAddressSpace(AddressSpace &as)
virtual void addSocket(Socket &socket)
virtual void removeUnit(Unit &unit)
void addUnit(Unit &unit)
virtual ImmediateUnitNavigator immediateUnitNavigator() const
virtual void deleteBridge(Bridge &bridge)