PipelineTemplate::PostProcLoader::PostProcLoader()
{
- get_postprocessor_registry().add_all(*this);
+ get_postprocessor_registry().invoke_all(*this);
}
#include <string>
#include <vector>
-#include <msp/datafile/loadabletyperegistry.h>
+#include <msp/core/typeregistry.h>
#include <msp/datafile/objectloader.h>
#include "blend.h"
#include "postprocessor.h"
template<typename T>
struct AddPostProc
{
- static void add(PostProcLoader &ldr, const std::string &kw) { ldr.add(kw, &PostProcLoader::postprocessor<T>); }
+ void operator()(const std::string &kw, PostProcLoader &ldr) const { ldr.add(kw, &PostProcLoader::postprocessor<T>); }
};
protected:
typedef std::vector<PostProcessor> PostProcessorArray;
private:
- typedef DataFile::LoadableTypeRegistry<PostProcLoader, PostProcLoader::AddPostProc> PostProcessorRegistry;
+ typedef TypeRegistry<PostProcLoader::AddPostProc, PostProcLoader &> PostProcessorRegistry;
Resources *resources;
bool hdr;
void Material::GenericLoader::init_actions()
{
- get_material_registry().add_all(*this);
+ get_material_registry().invoke_all(*this);
}
} // namespace GL
#ifndef MSP_GL_MATERIAL_H_
#define MSP_GL_MATERIAL_H_
+#include <msp/core/typeregistry.h>
#include <msp/datafile/collection.h>
-#include <msp/datafile/loadabletyperegistry.h>
#include <msp/datafile/objectloader.h>
#include "color.h"
#include "programdata.h"
template<typename T>
struct AddType
{
- static void add(GenericLoader &ldr, const std::string &kw) { ldr.add(kw, &GenericLoader::typed_material<T>); }
+ void operator()(const std::string &kw, GenericLoader &ldr) const { ldr.add(kw, &GenericLoader::typed_material<T>); }
};
DataFile::Collection *coll;
};
private:
- typedef DataFile::LoadableTypeRegistry<GenericLoader, GenericLoader::AddType> MaterialRegistry;
+ typedef TypeRegistry<GenericLoader::AddType, GenericLoader &> MaterialRegistry;
protected:
const Sampler *sampler;