Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F10548370
System.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Size
1 KB
Referenced Files
None
Subscribers
None
System.cpp
View Options
/*******************************************************************************
*
* File: System.cpp
*
* Contents: Implementation of System base-class.
*
* Copyright 2017
*
* Author: David Juhasz (david.juhasz@tuwien.ac.at)
*
******************************************************************************/
#include
"rosa/core/System.hpp"
#include
"SystemImpl.hpp"
#include
"rosa/core/Unit.h"
namespace
rosa
{
std
::
unique_ptr
<
System
>
System
::
createSystem
(
const
std
::
string
&
Name
)
noexcept
{
return
std
::
unique_ptr
<
System
>
(
new
SystemImpl
(
Name
));
}
System
::
System
(
const
std
::
string
&
Name
)
noexcept
:
Name
(
Name
),
CountUnits
(
0
),
SystemCleaned
(
false
)
{
LOG_TRACE
(
"Creating System ("
+
Name
+
")"
);
}
System
::~
System
(
void
)
{
LOG_TRACE
(
"Destroying System ("
+
Name
+
")"
);
if
(
!
SystemCleaned
)
{
ROSA_CRITICAL
(
"Trying to destroy a uncleaned System ("
+
Name
+
")"
);
}
}
void
System
::
markCleaned
(
void
)
noexcept
{
if
(
SystemCleaned
)
{
ROSA_CRITICAL
(
"System ("
+
Name
+
") has been already mark cleaned"
);
}
else
if
(
!
empty
())
{
ROSA_CRITICAL
(
"Trying to mark a non-empty System ("
+
Name
+
")"
);
}
else
{
SystemCleaned
=
true
;
LOG_TRACE
(
"System ("
+
Name
+
") is marked clean"
);
}
}
size_t
System
::
numberOfConstructedUnits
(
void
)
const
noexcept
{
return
CountUnits
;
}
}
// End namespace rosa
File Metadata
Details
Attached
Mime Type
text/x-c++
Expires
Sat, May 30, 11:50 PM (23 h, 15 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
328640
Default Alt Text
System.cpp (1 KB)
Attached To
Mode
R20 SoC_Rosa_repo
Attached
Detach File
Event Timeline
Log In to Comment