OpenASIP 2.2
Loading...
Searching...
No Matches
LineNumSection.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 LineNumSection.cc
26 *
27 * Non-inline definitions of LineNumSection class.
28 *
29 * @author Mikael Lepistö 2003 (tmlepist-no.spam-cs.tut.fi)
30 *
31 * @note rating: yellow
32 */
33
34#include "LineNumSection.hh"
35
36namespace TPEF {
37
38using ReferenceManager::SafePointer;
39
40LineNumSection LineNumSection::proto_(true);
41
42/**
43 * Constructor.
44 *
45 * @param init True if instance should register itself to base class.
46 */
48 codeSection_(&SafePointer::null) {
49
50 if (init) {
52 }
53
57}
58
59/**
60 * Destructor.
61 */
64
65/**
66 * Returns section's type.
67 *
68 * @return Type of section.
69 */
72 return ST_LINENO;
73}
74
75/**
76 * Creates an instance of section.
77 *
78 * @return Newly created section.
79 */
82 return new LineNumSection(false);
83}
84
85/**
86 * Sets text section which instructions are referred in this section.
87 *
88 * @param Section to set.
89 */
90void
95
96/**
97 * Sets text section which instructions are referred in this section.
98 *
99 * @param Section to set.
100 */
101void
105
106/**
107 * Returns text section which lines are stored in this section.
108 *
109 * @return Text section which lines are stored in this section.
110 */
113 return dynamic_cast<CodeSection*>(codeSection_->pointer());
114}
115
116}
virtual Section * clone() const
void setCodeSection(const ReferenceManager::SafePointer *codeSect)
static LineNumSection proto_
Protorype instance of section.
virtual SectionType type() const
CodeSection * codeSection() const
const ReferenceManager::SafePointer * codeSection_
Stores text section which we refer with lines.
SafePointable * pointer() const
static const SafePointer * replaceReference(const SafePointer *old, SafePointable *obj)
static void registerSection(const Section *section)
Definition Section.cc:114
@ ST_LINENO
Line number section.
Definition Section.hh:75
void setStartingAddress(AddressImage address)
void unsetFlagNoBits()
void unsetFlagVLen()