Skip to content
Snippets Groups Projects
Commit ffa650af authored by Rainer Kartmann's avatar Rainer Kartmann
Browse files

Add MemoryID_operators.h

parent fa6c9a31
No related branches found
No related tags found
No related merge requests found
#include "MemoryID_operators.h"
#include "MemoryID.h"
std::ostream& armarx::armem::operator<<(std::ostream& os, const std::vector<MemoryID>& rhs)
{
os << "std::vector<MemoryID> with " << rhs.size() << " entries:";
for (size_t i = 0; i < rhs.size(); ++i)
{
os << "\n\t[" << i << "] " << rhs[i];
}
return os;
}
bool armarx::armem::compareTimestamp(const MemoryID& lhs, const MemoryID& rhs)
{
return lhs.timestamp < rhs.timestamp;
}
bool armarx::armem::compareTimestampDecreasing(const MemoryID& lhs, const MemoryID& rhs)
{
return lhs.timestamp > rhs.timestamp;
}
#pragma once
// #include "MemoryID.h"
#include <vector>
#include <ostream>
namespace armarx::armem
{
class MemoryID;
std::ostream& operator<<(std::ostream& os, const std::vector<MemoryID>& rhs);
/// lhs.timestamp < rhs.timstamp
bool compareTimestamp(const MemoryID& lhs, const MemoryID& rhs);
/// lhs.timestamp > rhs.timstamp
bool compareTimestampDecreasing(const MemoryID& lhs, const MemoryID& rhs);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment