Skip to content

sam::ResearcherBuilder

Module: Abstract Factory Builders

More...

#include <Researcher.h>

Public Functions

Name
ResearcherBuilder() =default
ResearcherBuilder(std::string name)
ResearcherBuilder & fromConfigFile(json & config)
Building the Researcher using the JSON configuration file.
ResearcherBuilder & createResearchStrategy(json & ds)
CREATING A NEW OBJECT ///.
Researcher build()

Detailed Description

class sam::ResearcherBuilder;

Note: At this moment, ResearcherBuilder is a very limited and can only initialize the Researcher from a config file.

ResearcherBuilder class for Researcher. This takes care of everything and return a fully initialized Researcher after calling .[build()](/doxygen/Classes/classsam_1_1_researcher_builder/#function-build) method.

Public Functions Documentation

function ResearcherBuilder

ResearcherBuilder() =default

function ResearcherBuilder

inline explicit ResearcherBuilder(
    std::string name
)

function fromConfigFile

inline ResearcherBuilder & fromConfigFile(
    json & config
)

Building the Researcher using the JSON configuration file.

Parameters:

  • config A JSON object

Return: Return an instance of itself

This builds a researcher entirely based on the given config file. This is not the best implementation yet but I think it's more readable and reasonable for some use-cases.

function createResearchStrategy

inline ResearcherBuilder & createResearchStrategy(
    json & ds
)

CREATING A NEW OBJECT ///.

Create a new ResearchStrategy for the researcher based on the given configuration.

function build

inline Researcher build()

Return: A new Researcher

Note: Be aware that this needs to be called after you set all aspects of the Researcher

Build and return a new Researcher.


Updated on 29 June 2021 at 16:13:48 CEST


Last update: 2021-09-18