|
OpenMS
2.5.0
|
Go to the documentation of this file.
60 template <
typename FactoryProduct>
68 typedef FactoryProduct * (*FunctionType)();
69 typedef std::map<String, FunctionType>
Map;
98 FactoryProduct::registerChildren();
119 static std::mutex factory_create_mutex;
120 std::lock_guard<std::mutex> lock(factory_create_mutex);
125 return (*(it->second))();
129 throw Exception::InvalidValue(__FILE__, __LINE__, OPENMS_PRETTY_FUNCTION,
"This FactoryProduct is not registered!", name.c_str());
157 std::vector<String> list;
160 list.push_back(it->first);
171 template <
typename FactoryProduct>
Base class for TOPP applications.
Definition: TOPPBase.h:144
friend class singletonsNeedNoFriends
Definition: Factory.h:64
static FactoryProduct * create(const String &name)
return FactoryProduct according to unique identifier name
Definition: Factory.h:112
static void registerProduct(const String &name, const FunctionType creator)
register new concrete FactoryProduct
Definition: Factory.h:139
static bool isRegistered(const String &name)
Returns if a factory product is registered.
Definition: Factory.h:145
Returns FactoryProduct* based on the name of the desired concrete FactoryProduct.
Definition: Factory.h:61
~Factory() override
Destructor.
Definition: Factory.h:74
Invalid value exception.
Definition: Exception.h:335
void store(const String &filename, const PeakMap &map) const
Stores a map in an MzML file.
void setCoefficients(const MZTrafoModel &rhs)
Copy model coefficients from another model.
Map::const_iterator MapIterator
Definition: Factory.h:70
File adapter for MzML files.
Definition: MzMLFile.h:55
A more convenient string class.
Definition: String.h:58
In-Memory representation of a mass spectrometry experiment.
Definition: MSExperiment.h:77
static void registerFactory(const String &name, FactoryBase *instance)
register new concrete Factory
Definition: SingletonRegistry.h:101
std::vector< Int > IntList
Vector of signed integers.
Definition: ListUtils.h:55
A mass recalibration method using linear/quadratic interpolation (robust/weighted) of given reference...
Definition: InternalCalibration.h:61
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:46
static Factory * instance_()
singleton access to Factory
Definition: Factory.h:82
FactoryProduct *(* FunctionType)()
Function signature of creator function.
Definition: Factory.h:68
void load(const String &filename, PeakMap &map)
Loads a map from a MzML file. Spectra and chromatograms are sorted by default (this can be disabled u...
static std::vector< String > registeredProducts()
Returns a list of registered products.
Definition: Factory.h:155
static void applyTransformation(std::vector< Precursor > &pcs, const MZTrafoModel &trafo)
static Factory * instance_ptr_
Definition: Factory.h:168
Calibration of m/z positions.
Definition: DataProcessing.h:69
Factory()
Constructor.
Definition: Factory.h:77
int main(int argc, const char **argv)
Definition: INIFileEditor.cpp:73
Map inventory_
Definition: Factory.h:167
Create and apply models of a mass recalibration function.
Definition: MZTrafoModel.h:66
static bool isRegistered(String name)
Returns if a factory is registered.
Definition: SingletonRegistry.h:107
std::map< String, FunctionType > Map
Definition: Factory.h:69
static FactoryBase * getFactory(const String &name)
return DefaultParamHandler according to unique identifier name
Definition: SingletonRegistry.h:82
Factory< FactoryProduct > FactoryType
Definition: Factory.h:71
Base class for Factory<T>
Definition: FactoryBase.h:48
void setLogType(LogType type) const
Sets the progress log that should be used. The default type is NONE!