namespace mola::mm_cli

Overview

namespace mm_cli {

// global functions

void loadPlugins(const std::string& plugins);
mp2p_icp::metric_map_t loadMap(const std::string& input, const std::string& plugins, const std::string& tag);

template <typename MapT>
size_t forEachMapLayerOfType(
    mp2p_icp::metric_map_t& mm,
    const std::string& layerName,
    const std::string& typeName,
    const std::function<void(const std::string&, const typename MapT::Ptr&, mrpt::maps::CMetricMap::Ptr&)>& fn
    );

} // namespace mm_cli

Global Functions

void loadPlugins(const std::string& plugins)

Loads one or more comma-separated *.so plugin modules (no-op if empty).

mp2p_icp::metric_map_t loadMap(const std::string& input, const std::string& plugins, const std::string& tag)

Loads plugins (if any) and reads a .mm metric map from disk. tag is a short tool name used to prefix log lines.

template <typename MapT>
size_t forEachMapLayerOfType(
    mp2p_icp::metric_map_t& mm,
    const std::string& layerName,
    const std::string& typeName,
    const std::function<void(const std::string&, const typename MapT::Ptr&, mrpt::maps::CMetricMap::Ptr&)>& fn
    )

Invokes fn(layerName, typedLayer, layerSlot) for every layer of mm whose runtime type is MapT. layerSlot is a mutable reference to the layer pointer in mm.layers, so callers can replace the layer in place if needed.

If layerName is non-empty, only that layer is processed and it is an error (throws) if it exists but is not a MapT. If layerName is empty, non-matching layers are silently skipped. typeName is used only for error messages (e.g. “mola::IncrementalPointCloud”).

Returns the number of layers processed.