Class ServiceFactory

Page Contents

Class Documentation

class ServiceFactory

Provides utility functions for managing the Service classes associated with a particular model schema object.


Jean-Philippe Steinmetz

Public Functions

ServiceFactory(std::shared_ptr<Configuration> config, std::shared_ptr<net::IApiClient> apiClient)

Initializes the factory with any defaults.

  • config – The global configuration object to initialize the factory with.

  • apiClient – The instance of ApiClient to use when creating Service instances.


Clears the factory state and frees up any memory resources used by the factory.

template<class T>
std::shared_ptr<T> GetService() const

Creates and/or returns the Service class instance for a specified type.


The service class associated with the specified type, otherwise nullptr.