Class Loader

Derived Types

class Loader

Abstract class for loading data from a source.

This class defines two virtual methods for loading and returning control messages, as well as a protected method for accessing the configuration information. It can be extended to implement specific loading logic for different types of data sources.

Subclassed by morpheus::FileDataLoader, morpheus::GRPCDataLoader, morpheus::LambdaLoader, morpheus::PayloadDataLoader, morpheus::RESTDataLoader

Public Functions

~Loader() = default

Destructor for the Loader class.

Loader() = default

Default constructor for the Loader class.

Loader(nlohmann::json config)

Constructor for the Loader class.

Parameters

config – A json object containing configuration information for the loader.

virtual std::shared_ptr<MessageMeta> payload(std::shared_ptr<ControlMessage> message)

Virtual method for extracting message payload from a control message.

Parameters

message – A shared pointer to the control message containing the payload.

Returns

A shared pointer to the message payload as a MessageMeta object.

virtual std::shared_ptr<ControlMessage> load(std::shared_ptr<ControlMessage> message, nlohmann::json task)

Virtual method for loading a control message.

Parameters
  • message – A shared pointer to the control message to be loaded.

  • task – A json object describing the loading task.

Returns

A shared pointer to the loaded control message.

Protected Functions

nlohmann::json config() const

Protected method for accessing the loader’s configuration information.

Returns

A json object containing configuration information for the loader.

© Copyright 2023, NVIDIA. Last updated on Apr 11, 2023.