Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F27036522
SystemBase.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
SystemBase.cpp
View Options
//===-- core/SystemBase.cpp -------------------------------------*- C++ -*-===//
//
// The RoSA Framework
//
//===----------------------------------------------------------------------===//
///
/// \file core/SystemBase.cpp
///
/// \author David Juhasz (david.juhasz@tuwien.ac.at)
///
/// \date 2017
///
/// \brief Implementation of 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
+
"'"
);
}
bool
SystemBase
::
operator
==
(
const
System
&
Other
)
const
noexcept
{
return
&
Name
==
&
Other
.
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
Tue, Oct 27, 8:01 PM (1 d, 19 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
407083
Default Alt Text
SystemBase.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline