OpenASIP
2.0
src
base
tpef
ResourceSection.hh
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 ResourceSection.hh
26
*
27
* Declaration of ResourceSection class.
28
*
29
* @author Mikael Lepistö 2004 (tmlepist-no.spam-cs.tut.fi)
30
*
31
* @note rating: yellow
32
*/
33
34
#ifndef TTA_RESOURCE_SECTION_HH
35
#define TTA_RESOURCE_SECTION_HH
36
37
#include "
Section.hh
"
38
#include "
TPEFBaseType.hh
"
39
#include "
Exception.hh
"
40
#include "
ResourceElement.hh
"
41
42
namespace
TPEF
{
43
44
/**
45
* Prosessor Resource Table section.
46
*/
47
class
ResourceSection
:
public
Section
{
48
public
:
49
virtual
~ResourceSection
();
50
51
virtual
SectionType
type
()
const
;
52
53
ResourceElement
&
findResource
(
54
ResourceElement::ResourceType
aType, HalfWord anId)
const
;
55
56
bool
hasResource
(
57
ResourceElement::ResourceType
aType, HalfWord anId)
const
;
58
59
protected
:
60
ResourceSection
(
bool
init);
61
virtual
Section
*
clone
()
const
;
62
63
private
:
64
/// Protorype instance of section.
65
static
ResourceSection
proto_
;
66
};
67
}
68
69
#endif
TPEF::ResourceSection::hasResource
bool hasResource(ResourceElement::ResourceType aType, HalfWord anId) const
Definition:
ResourceSection.cc:120
TPEF::ResourceSection
Definition:
ResourceSection.hh:47
Exception.hh
TPEF::ResourceElement
Definition:
ResourceElement.hh:47
TPEF::ResourceSection::findResource
ResourceElement & findResource(ResourceElement::ResourceType aType, HalfWord anId) const
Definition:
ResourceSection.cc:91
TPEF::Section
Definition:
Section.hh:64
TPEF::ResourceSection::proto_
static ResourceSection proto_
Protorype instance of section.
Definition:
ResourceSection.hh:65
TPEF::ResourceSection::ResourceSection
ResourceSection(bool init)
Definition:
ResourceSection.cc:45
TPEF::ResourceSection::type
virtual SectionType type() const
Definition:
ResourceSection.cc:67
ResourceElement.hh
TPEF::ResourceElement::ResourceType
ResourceType
Resource types.
Definition:
ResourceElement.hh:51
TPEF::ResourceSection::clone
virtual Section * clone() const
Definition:
ResourceSection.cc:77
Section.hh
TPEF::Section::SectionType
SectionType
Definition:
Section.hh:69
TPEFBaseType.hh
TPEF::ResourceSection::~ResourceSection
virtual ~ResourceSection()
Definition:
ResourceSection.cc:58
TPEF
Definition:
Assembler.hh:43
Generated by
1.8.17