Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F386239
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: Unit.cpp
*
* Contents: Implementation of Unit base-class.
*
* Copyright 2017
*
* Author: David Juhasz (david.juhasz@tuwien.ac.at)
*
******************************************************************************/
#include
"rosa/core/Unit.h"
#include
"rosa/core/System.h"
#include
"rosa/support/debug.hpp"
#include
"rosa/support/log.h"
namespace
rosa
{
// Ctor. Initializing member fields.
Unit
::
Unit
(
const
size_t
Id
,
const
std
::
string
&
Name
,
System
&
S
)
noexcept
:
Id
(
Id
),
Name
(
Name
),
S
(
S
),
FullName
(
Name
+
"@"
+
S
.
Name
)
{
LOG_TRACE
(
"Constructing Unit ("
+
FullName
+
")"
);
}
// Dtor.
Unit
::~
Unit
(
void
)
noexcept
{
LOG_TRACE
(
"Destroying Unit ("
+
FullName
+
")"
);
}
System
&
Unit
::
system
(
void
)
const
noexcept
{
return
S
;
}
// Default dump function, emitting the Name of the Unit.
std
::
string
Unit
::
dump
(
void
)
const
noexcept
{
LOG_TRACE
(
"Dumping Unit ("
+
FullName
+
")"
);
return
"[Unit] "
+
FullName
;
}
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
Wed, Jul 2, 12:29 AM (5 h, 48 s)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
157099
Default Alt Text
Unit.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment