class ProtoOpsManager

Overview

Singleton class which loads Protobuf conversion libraries. More…

#include <proto_ops_manager.h>

class ProtoOpsManager: public PluginManager {
public:
    // construction

    ProtoOpsManager(const ProtoOpsManager&);
    ProtoOpsManager(ProtoOpsManager&&);

    // methods

    ProtoOpsManager& operator = (const ProtoOpsManager&);
    ProtoOpsManager& operator = (ProtoOpsManager&&);
    std::unique_ptr<protobuf_ops::NRPProtobufOpsIface> loadProtobufPlugin(const std::string& pluginLibFile);
    static ProtoOpsManager& getInstance();
    static void resetInstance();
};

Inherited Members

public:
    // methods

    bool loadPlugin(const std::string& pluginLibFile);
    void addPluginPath(const std::string& pluginPath);

Detailed Documentation

Singleton class which loads Protobuf conversion libraries.

Also in charge of unloading then when the object is destructed

Methods

std::unique_ptr<protobuf_ops::NRPProtobufOpsIface> loadProtobufPlugin(const std::string& pluginLibFile)

Load a Protobuf conversion plugin from a given library.

Parameters:

pluginLibFile

Plugin library file (.so)

Returns:

Returns ptr to loaded protobuf_ops::NRPProtobufOpsIface if found, nullptr otherwise

static ProtoOpsManager& getInstance()

Get singleton instance of ProtoOpsManager.

static void resetInstance()

Reset singleton instance.