initial commit
This commit is contained in:
39
src/utils/workers/result.hpp
Normal file
39
src/utils/workers/result.hpp
Normal file
@@ -0,0 +1,39 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
#include "utils/real_time/real_time.hpp"
|
||||
#include "utils/fvec/fvec.hpp"
|
||||
#include <hack/logger/logger.hpp>
|
||||
|
||||
namespace hr
|
||||
{
|
||||
struct result
|
||||
{
|
||||
struct bit
|
||||
{
|
||||
real_time m_duration;
|
||||
fvec_t m_value;
|
||||
};
|
||||
|
||||
void set_bit(bit& b)
|
||||
{
|
||||
m_data.push_back(b);
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
{
|
||||
bool res = true;
|
||||
try
|
||||
{
|
||||
if (!m_data.empty()) res = m_data.at(0).m_value.empty();
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
hack::error()(e.what());
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
std::vector<bit> m_data;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user