Closed martinandrovich closed 4 years ago
I propose that each type is fully implemented in its own, single .h
file, something like:
#pragma once
// delcarations
class mytype_t
{
public:
std::atomic<int> a;
std::atomic<float> b;
private:
void hello();
};
// definitions
inline void
mytype_t::hello()
{
return;
}
Also create a constants.h
for, well, constants in the core::
namespace.
Maybe have a separate directory such as
modules/types/
for all custom types, such thatstruct lidar_t
is defined inmodules/types/lidar.h
. A common include file could be used to include all common types, i.e.#include "module/types/common.h
, instead of including all header files manually.EDIT: Started work; populating the
/modules/types/
directory. The file/modules/types/common.h
will include all custom types +using
defines. Furthermore, amodules/constants.h
file will be added.All classes/structs must also be made thread-safe, in accordance with #3.
constants.h
common.h
pose.h
(pos_t
,orient_t
,pose_t
,vel_t
)lidar.h
(lidar_t
)camera.h
(camera_t
)