Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F5277047
SystemBase.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
SystemBase.cpp
View Options
/***************************************************************************//**
*
* \file core/SystemBase.cpp
*
* \author David Juhasz (david.juhasz@tuwien.ac.at)
*
* \date 2017
*
* \brief Implementation for rosa/core/SystemBase.hpp.
*
******************************************************************************/
#include
"rosa/core/SystemBase.hpp"
namespace
rosa
{
SystemBase
::
SystemBase
(
const
std
::
string
&
Name
)
noexcept
:
Name
(
Name
),
UnitCount
(
0
),
SystemIsCleaned
(
false
)
{
LOG_TRACE
(
"Creating System ("
+
Name
+
")"
);
}
SystemBase
::~
SystemBase
(
void
)
{
if
(
!
SystemIsCleaned
)
{
ROSA_CRITICAL
(
"Trying to destroy an uncleaned System ("
+
Name
+
")"
);
}
LOG_TRACE
(
"Destroying System ("
+
Name
+
")"
);
}
const
std
::
string
&
SystemBase
::
name
()
const
noexcept
{
return
Name
;
}
id_t
SystemBase
::
nextId
(
void
)
noexcept
{
return
++
UnitCount
;
}
bool
SystemBase
::
isSystemCleaned
(
void
)
const
noexcept
{
return
SystemIsCleaned
;
}
void
SystemBase
::
markCleaned
(
void
)
noexcept
{
if
(
SystemIsCleaned
)
{
ROSA_CRITICAL
(
"System ("
+
Name
+
") has been already mark cleaned"
);
}
else
if
(
!
empty
())
{
ROSA_CRITICAL
(
"Trying to mark a non-empty System ("
+
Name
+
")"
);
}
else
{
SystemIsCleaned
=
true
;
LOG_TRACE
(
"System ("
+
Name
+
") is marked cleaned"
);
}
}
size_t
SystemBase
::
numberOfConstructedUnits
(
void
)
const
noexcept
{
return
UnitCount
;
}
}
// End namespace rosa
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sun, Apr 12, 4:34 AM (14 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
302937
Default Alt Text
SystemBase.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment