Page MenuHomePhorge

System.cpp
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

System.cpp

/*******************************************************************************
*
* 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

Mime Type
text/x-c++
Expires
Sat, May 30, 11:50 PM (23 h, 9 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
328640
Default Alt Text
System.cpp (1 KB)

Event Timeline