OpenASIP
2.0
src
base
tpef
ReferenceKey.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 ReferenceKey.cc
26
*
27
* Definitions of different key types used in reference managing.
28
*
29
* @author Pekka Jääskeläinen 2003 (pjaaskel-no.spam-cs.tut.fi)
30
* @note reviewed 17 Oct 2003 by am, rm, kl
31
*
32
* @note rating: yellow
33
*/
34
35
#include "
ReferenceKey.hh
"
36
37
namespace
TPEF
{
38
39
namespace
ReferenceManager {
40
41
//////////////////////////////////////////////////////////////////////////////
42
// ReferenceKey
43
//////////////////////////////////////////////////////////////////////////////
44
45
/**
46
* The constructor.
47
*/
48
ReferenceKey::ReferenceKey
() {
49
}
50
51
/**
52
* The destructor.
53
*/
54
ReferenceKey::~ReferenceKey
() {
55
}
56
57
//////////////////////////////////////////////////////////////////////////////
58
// SectionIndexKey
59
//////////////////////////////////////////////////////////////////////////////
60
61
/**
62
* The constructor.
63
*
64
* @param sectionId Identification code of the section.
65
* @param index Index of the element in section.
66
*/
67
SectionIndexKey::SectionIndexKey
(
SectionId
sectionId,
SectionIndex
index) :
68
ReferenceKey
(), sectionId_(sectionId), index_(index) {
69
}
70
71
/**
72
* The destructor.
73
*/
74
SectionIndexKey::~SectionIndexKey
() {
75
}
76
77
//////////////////////////////////////////////////////////////////////////////
78
// SectionOffsetKey
79
//////////////////////////////////////////////////////////////////////////////
80
81
/**
82
* The constructor.
83
*
84
* @param sectionId Identification code of the section.
85
* @param offset Offset of the element in section.
86
*/
87
SectionOffsetKey::SectionOffsetKey
(
SectionId
sectionId,
SectionOffset
offset) :
88
ReferenceKey
(), sectionId_(sectionId), offset_(offset) {
89
}
90
91
/**
92
* The destructor.
93
*/
94
SectionOffsetKey::~SectionOffsetKey
() {
95
}
96
97
//////////////////////////////////////////////////////////////////////////////
98
// FileOffsetKey
99
//////////////////////////////////////////////////////////////////////////////
100
101
/**
102
* The constructor.
103
*
104
* @param fileOffset File offset.
105
*/
106
FileOffsetKey::FileOffsetKey
(
FileOffset
fileOffset) :
107
ReferenceKey
(), fileOffset_(fileOffset) {
108
}
109
110
/**
111
* The destructor.
112
*/
113
FileOffsetKey::~FileOffsetKey
() {
114
}
115
116
//////////////////////////////////////////////////////////////////////////////
117
// SectionKey
118
//////////////////////////////////////////////////////////////////////////////
119
120
/**
121
* The constructor.
122
*
123
* @param sectionId Identification code of the section.
124
*/
125
SectionKey::SectionKey
(
SectionId
sectionId) :
126
sectionId_(sectionId) {
127
}
128
129
/**
130
* The destructor.
131
*/
132
SectionKey::~SectionKey
() {
133
}
134
135
}
136
137
}
TPEF::SectionId
HalfWord SectionId
Type for storing binary file section ids.
Definition:
TPEFBaseType.hh:43
TPEF::ReferenceManager::SectionIndexKey::SectionIndexKey
SectionIndexKey(SectionId sectionId, SectionIndex index)
Definition:
ReferenceKey.cc:67
TPEF::ReferenceManager::SectionOffsetKey::SectionOffsetKey
SectionOffsetKey(SectionId sectionId, SectionOffset offset)
Definition:
ReferenceKey.cc:87
TPEF::ReferenceManager::FileOffsetKey::FileOffsetKey
FileOffsetKey(FileOffset fileOffset)
Definition:
ReferenceKey.cc:106
TPEF::ReferenceManager::ReferenceKey::~ReferenceKey
virtual ~ReferenceKey()
Definition:
ReferenceKey.cc:54
TPEF::ReferenceManager::SectionIndexKey::~SectionIndexKey
virtual ~SectionIndexKey()
Definition:
ReferenceKey.cc:74
TPEF::ReferenceManager::FileOffsetKey::~FileOffsetKey
virtual ~FileOffsetKey()
Definition:
ReferenceKey.cc:113
TPEF::FileOffset
Word FileOffset
Type for storing absolute file offsets.
Definition:
TPEFBaseType.hh:52
TPEF::ReferenceManager::ReferenceKey::ReferenceKey
ReferenceKey()
Definition:
ReferenceKey.cc:48
TPEF::SectionOffset
Word SectionOffset
Type for storing offsets relative to a given base offset value.
Definition:
TPEFBaseType.hh:49
TPEF::ReferenceManager::ReferenceKey
Definition:
ReferenceKey.hh:50
TPEF::ReferenceManager::SectionKey::~SectionKey
virtual ~SectionKey()
Definition:
ReferenceKey.cc:132
TPEF::ReferenceManager::SectionOffsetKey::~SectionOffsetKey
virtual ~SectionOffsetKey()
Definition:
ReferenceKey.cc:94
TPEF::ReferenceManager::SectionKey::SectionKey
SectionKey(SectionId sectionId)
Definition:
ReferenceKey.cc:125
TPEF::SectionIndex
Word SectionIndex
Type for storing section indexes.
Definition:
TPEFBaseType.hh:46
ReferenceKey.hh
TPEF
Definition:
Assembler.hh:43
Generated by
1.8.17