Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F2636355
Unit.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
Unit.cpp
View Options
/***************************************************************************//**
*
* \file core/Unit.cpp
*
* \author David Juhasz (david.juhasz@tuwien.ac.at)
*
* \date 2017
*
* \brief Implementation for rosa/core/Unit.h.
*
******************************************************************************/
#include
"rosa/core/Unit.h"
#include
"rosa/core/System.hpp"
#include
"rosa/support/debug.hpp"
#include
"rosa/support/log.h"
namespace
rosa
{
Unit
::
Unit
(
const
AtomValue
Kind
,
const
id_t
Id
,
const
std
::
string
&
Name
,
System
&
S
)
noexcept
:
Kind
(
Kind
),
Id
(
Id
),
Name
(
Name
),
S
(
S
),
FullName
(
Name
+
"@"
+
S
.
name
())
{
ASSERT
(
!
Name
.
empty
());
LOG_TRACE
(
"Constructing Unit ("
+
FullName
+
" of kind '"
+
to_string
(
Kind
)
+
"')"
);
}
Unit
::~
Unit
(
void
)
{
LOG_TRACE
(
"Destroying Unit ("
+
FullName
+
")"
);
}
/// The default implementation of `rosa::Unit::dump` emits `Name` of `this`
/// object.
std
::
string
Unit
::
dump
(
void
)
const
noexcept
{
LOG_TRACE
(
"Dumping Unit ("
+
FullName
+
")"
);
return
"[Unit] "
+
FullName
;
}
System
&
Unit
::
system
(
void
)
const
noexcept
{
return
S
;
}
std
::
ostream
&
operator
<<
(
std
::
ostream
&
OS
,
const
Unit
&
U
)
{
OS
<<
U
.
dump
();
return
OS
;
}
}
// End namespace rosa
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Mar 22, 10:56 PM (1 d, 9 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
302947
Default Alt Text
Unit.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment