OpenASIP
2.0
src
base
tpef
UDataSection.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 UDataSection.cc
26
*
27
* Non-inline definitions of UDataSection class.
28
*
29
* @author Mikael Lepistö 2003 (tmlepist-no.spam-cs.tut.fi)
30
* @note reviewed 22 October 2003 by ml, jn, ao, tr
31
*
32
* @note rating: yellow
33
*/
34
35
#include "
UDataSection.hh
"
36
37
namespace
TPEF
{
38
39
UDataSection
UDataSection::proto_
(
true
);
40
41
/**
42
* Constructor.
43
*
44
* @param init True if instance should register itself to base class.
45
*/
46
UDataSection::UDataSection
(
bool
init) :
RawSection
() {
47
48
if
(init) {
49
Section::registerSection
(
this
);
50
}
51
52
unsetFlagVLen
();
53
setFlagNoBits
();
54
setStartingAddress
(0);
55
}
56
57
/**
58
* Destructor.
59
*/
60
UDataSection::~UDataSection
() {
61
}
62
63
/**
64
* Returns section's type.
65
*
66
* @return Type of section.
67
*/
68
Section::SectionType
69
UDataSection::type
()
const
{
70
return
ST_UDATA
;
71
}
72
73
/**
74
* Creates an instance of section.
75
*
76
* @return Newly created section.
77
*/
78
Section
*
79
UDataSection::clone
()
const
{
80
return
new
UDataSection
(
false
);
81
}
82
83
/**
84
* Returns byte from section.
85
*
86
* In this case section contains only zeros.
87
*
88
* @param chunk The chunk in which offset byte is wanted.
89
* @return Byte from the offset of the chunk.
90
*/
91
Byte
92
UDataSection::byte
(
const
Chunk
*
/*chunk*/
)
const
{
93
return
0x00;
94
}
95
96
}
TPEF::Section::unsetFlagVLen
void unsetFlagVLen()
TPEF::Section::setFlagNoBits
void setFlagNoBits()
Byte
unsigned char Byte
Definition:
BaseType.hh:116
TPEF::Section
Definition:
Section.hh:64
TPEF::UDataSection::clone
virtual Section * clone() const
Definition:
UDataSection.cc:79
TPEF::UDataSection::byte
virtual Byte byte(const Chunk *chunk) const
Definition:
UDataSection.cc:92
TPEF::Section::setStartingAddress
void setStartingAddress(AddressImage address)
TPEF::Section::ST_UDATA
@ ST_UDATA
Uninitialized data section.
Definition:
Section.hh:81
TPEF::Section::registerSection
static void registerSection(const Section *section)
Definition:
Section.cc:114
UDataSection.hh
TPEF::RawSection
Definition:
Section.hh:196
TPEF::Section::SectionType
SectionType
Definition:
Section.hh:69
TPEF::UDataSection::type
virtual SectionType type() const
Definition:
UDataSection.cc:69
TPEF::UDataSection::UDataSection
UDataSection(bool init)
Definition:
UDataSection.cc:46
TPEF::UDataSection::proto_
static UDataSection proto_
Protorype instance of section.
Definition:
UDataSection.hh:61
TPEF::UDataSection::~UDataSection
virtual ~UDataSection()
Definition:
UDataSection.cc:60
TPEF::Chunk
Definition:
Chunk.hh:45
TPEF
Definition:
Assembler.hh:43
Generated by
1.8.17