mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Add emitMessage, emitError, and emitWarning member functions to MemoryMananger
This commit is contained in:
parent
48a09d386e
commit
e2be23c269
@ -659,6 +659,10 @@ namespace Trick {
|
||||
int alloc_info_map_counter ; /**< ** counter to assign unique ids to allocations as they are added to map */
|
||||
int extern_alloc_info_map_counter ; /**< ** counter to assign unique ids to allocations as they are added to map */
|
||||
|
||||
void emitMessage( std::string s);
|
||||
void emitError( std::string s);
|
||||
void emitWarning( std::string s);
|
||||
|
||||
void write_checkpoint( std::ostream& out_s, std::vector<ALLOC_INFO*>& dependencies);
|
||||
|
||||
/**
|
||||
|
@ -94,3 +94,21 @@ Trick::MemoryManager::~MemoryManager() {
|
||||
}
|
||||
alloc_info_map.clear() ;
|
||||
}
|
||||
|
||||
#include <sstream>
|
||||
void Trick::MemoryManager::emitMessage( std::string s) {
|
||||
std::cout << s << std::endl;
|
||||
}
|
||||
|
||||
void Trick::MemoryManager::emitError( std::string s) {
|
||||
std::stringstream ss;
|
||||
ss << "Error: " << s << std::endl;
|
||||
emitMessage( ss.str() );
|
||||
}
|
||||
|
||||
void Trick::MemoryManager::emitWarning( std::string s) {
|
||||
std::stringstream ss;
|
||||
ss << "Warning: " << s << std::endl;
|
||||
emitMessage( ss.str() );
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user