OpenASIP 2.2
Loading...
Searching...
No Matches
MoveGuard.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 MoveGuard.cc
26 *
27 * Implementation of MoveGuard class.
28 *
29 * @author Ari Metsähalme 2005 (ari.metsahalme-no.spam-tut.fi)
30 * @note rating: red
31 */
32
33#include "MoveGuard.hh"
34#include "Guard.hh"
35
36using namespace TTAMachine;
37
38namespace TTAProgram {
39
40/////////////////////////////////////////////////////////////////////////////
41// MoveGuard
42/////////////////////////////////////////////////////////////////////////////
43
44/**
45 * Constructor.
46
47 * @param guard The guard.
48 */
50 guard_(&guard) {
51}
52
53/**
54 * Destructor.
55 */
58
59/**
60 * Tells whether this guard is a constant true or false value.
61 *
62 * @return false always.
63 */
64bool
66 return false;
67}
68
69/**
70 * Tells whether the guard is inverted or not.
71 *
72 * @return True if the Boolean value computed out of the contents of
73 * the source register is inverted.
74 */
75bool
77 return guard_->isInverted();
78}
79
80/**
81 * Returns the guard object.
82 *
83 * @return The guard object.
84 */
85const Guard&
87 return *guard_;
88}
89
90/**
91 * Makes a copy of the move guard.
92 *
93 * @return A copy of the move guard.
94 */
97 return new MoveGuard(*guard_);
98}
99
100}
virtual bool isInverted() const
const TTAMachine::Guard * guard_
The guard object.
Definition MoveGuard.hh:65
MoveGuard(const TTAMachine::Guard &guard)
Definition MoveGuard.cc:49
bool isInverted() const
Definition MoveGuard.cc:76
MoveGuard * copy() const
Definition MoveGuard.cc:96
bool isUnconditional() const
Definition MoveGuard.cc:65
const TTAMachine::Guard & guard() const
Definition MoveGuard.cc:86