SatDump 2.0.0-alpha-76a915210
Loading...
Searching...
No Matches
product.h File Reference

Core Product implementation. More...

#include "nlohmann/json.hpp"

Go to the source code of this file.

Classes

class  satdump::products::Product
 Core SatDump product class. More...
struct  satdump::products::RegisteredProduct
 Struct holding functions related to products. More...
struct  satdump::products::RegisterProductsEvent
 Event to subscribe to in plugins to insert new product loaders. More...

Macros

#define PRODUCT_LOADER_FUN(TYPE)

Functions

std::shared_ptr< Productsatdump::products::loadProduct (std::string path)
 Load a product. This will detect the product type and load it appropriately using the registered loader if found. If not, it will return it as the base Product class.
void satdump::products::registerProducts ()
 Function to register product loaders. MUST be called before calling any other product function!

Detailed Description

Core Product implementation.

Macro Definition Documentation

◆ PRODUCT_LOADER_FUN

#define PRODUCT_LOADER_FUN ( TYPE)
Value:
[](std::string file) -> std::shared_ptr<Product> \
{ \
std::shared_ptr<TYPE> product = std::make_shared<TYPE>(); \
product->load(file); \
return product; \
}

Function Documentation

◆ loadProduct()

std::shared_ptr< Product > satdump::products::loadProduct ( std::string path)

Load a product. This will detect the product type and load it appropriately using the registered loader if found. If not, it will return it as the base Product class.

Parameters
filecbor file to load

◆ registerProducts()

void satdump::products::registerProducts ( )

Function to register product loaders. MUST be called before calling any other product function!

Parameters