09caf314f1
We decided to get rid of the C FFI for libs. It was becoming too intricate and complicated. It was becoming a technical burden and expanding into too much extra code. It's unfortunate, but we'll have to give up on getting out-of-tree hot-loadable libraries the easy way. It's possible to still do it with cross compilation or by keeping track of the libstdc++ version that the running harikoff binary was compiled against. Then we can ensure that our loadable lib code is linked against that same libstdc++ code and this should ensure ABI stability.
38 lines
922 B
C++
38 lines
922 B
C++
#include <iostream>
|
|
#include <fstream>
|
|
#include <stdexcept>
|
|
#include <string>
|
|
#include <vector>
|
|
#include <sstream>
|
|
#include <memory>
|
|
#include <opts.h>
|
|
#include <deviceManager/deviceManager.h>
|
|
|
|
namespace hk {
|
|
namespace device {
|
|
|
|
std::vector<std::shared_ptr<InteroceptorDeviceSpec>>
|
|
DeviceManager::interoceptorDeviceSpecs;
|
|
std::vector<std::shared_ptr<ExtrospectorDeviceSpec>>
|
|
DeviceManager::extrospectorDeviceSpecs;
|
|
std::vector<std::shared_ptr<SenseDeviceSpec>>
|
|
DeviceManager::senseDeviceSpecs;
|
|
|
|
const std::string DeviceManager::stringifyDeviceSpecs(void)
|
|
{
|
|
std::ostringstream oss;
|
|
|
|
for (const auto& spec : DeviceManager::interoceptorDeviceSpecs) {
|
|
oss << "Interoceptor " << spec->stringify();
|
|
}
|
|
|
|
for (const auto& spec : DeviceManager::extrospectorDeviceSpecs) {
|
|
oss << "Extrospector " << spec->stringify();
|
|
}
|
|
|
|
return oss.str();
|
|
}
|
|
|
|
} // namespace device
|
|
} // namespace hk
|