Public Member Functions | Private Types | Private Attributes | List of all members
PLMD::vesselbase::VesselRegister Class Reference

#include <VesselRegister.h>

Public Member Functions

 ~VesselRegister ()
 The destructor. More...
 
void add (std::string keyword, creator_pointer, keyword_pointer k, keyword_pointer ik)
 Add a new distribution function option to the register of distribution functions. More...
 
bool check (std::string keyname)
 Verify if a distribution keyword is present in the register. More...
 
std::unique_ptr< Vesselcreate (std::string keyword, const VesselOptions &da)
 Create a distribution function of the specified type. More...
 
Keywords getKeywords ()
 Return the keywords. More...
 
void remove (creator_pointer f)
 Remove a distribution function from the register of distribution functions. More...
 

Private Types

typedef std::unique_ptr< Vessel >(* creator_pointer) (const VesselOptions &)
 Pointer to a function which, given the keyword for a distribution function, creates it. More...
 
typedef void(* keyword_pointer) (Keywords &)
 Pointer to the function that reserves the keyword for the distribution. More...
 

Private Attributes

Keywords keywords
 A vector of function pointers - this is used to create the documentation. More...
 
std::map< std::string, creator_pointerm
 The set of possible distribution functions we can work with. More...
 
std::map< std::string, keyword_pointermk
 Map action to a function which documents the related object. More...
 

Member Typedef Documentation

◆ creator_pointer

typedef std::unique_ptr<Vessel>(* PLMD::vesselbase::VesselRegister::creator_pointer) (const VesselOptions &)
private

Pointer to a function which, given the keyword for a distribution function, creates it.

◆ keyword_pointer

typedef void(* PLMD::vesselbase::VesselRegister::keyword_pointer) (Keywords &)
private

Pointer to the function that reserves the keyword for the distribution.

Constructor & Destructor Documentation

◆ ~VesselRegister()

PLMD::vesselbase::VesselRegister::~VesselRegister ( )

The destructor.

Member Function Documentation

◆ add()

void PLMD::vesselbase::VesselRegister::add ( std::string  keyword,
creator_pointer  f,
keyword_pointer  k,
keyword_pointer  ik 
)

Add a new distribution function option to the register of distribution functions.

◆ check()

bool PLMD::vesselbase::VesselRegister::check ( std::string  keyname)

Verify if a distribution keyword is present in the register.

◆ create()

std::unique_ptr< Vessel > PLMD::vesselbase::VesselRegister::create ( std::string  keyword,
const VesselOptions da 
)

Create a distribution function of the specified type.

◆ getKeywords()

Keywords PLMD::vesselbase::VesselRegister::getKeywords ( )

Return the keywords.

◆ remove()

void PLMD::vesselbase::VesselRegister::remove ( creator_pointer  f)

Remove a distribution function from the register of distribution functions.

Member Data Documentation

◆ keywords

Keywords PLMD::vesselbase::VesselRegister::keywords
private

A vector of function pointers - this is used to create the documentation.

◆ m

std::map<std::string,creator_pointer> PLMD::vesselbase::VesselRegister::m
private

The set of possible distribution functions we can work with.

◆ mk

std::map<std::string,keyword_pointer> PLMD::vesselbase::VesselRegister::mk
private

Map action to a function which documents the related object.


The documentation for this class was generated from the following files: