Atoms Crowd  7.0.0
SkeletonExporterFactory.h
1 #pragma once
2 // ===========================================================================
3 // Copyright (c) 2015 Toolchefs Ltd. All rights reserved.
4 //
5 // Use of this software is subject to the terms of the Toolchefs license
6 // agreement provided at the time of installation or download, or which
7 // otherwise accompanies this software in either electronic or hard copy form.
8 // ===========================================================================
9 
10 #include <AtomsCore/Globals.h>
11 #include <Atoms/Exporters/BaseSkeletonExporter.h>
12 #include <map>
13 #include <vector>
14 
15 namespace Atoms
16 {
18 
20  class ATOMS_EXPORT SkeletonExporterFactory
21  {
22  public:
23 
24  typedef AtomsPtr<BaseSkeletonExporter>(*creatorFn)();
25 
28 
30 
34  AtomsPtr<BaseSkeletonExporter> createSkeletonExporter(const std::string& typeName);
35 
37 
41  void registerSkeletonExporter(const std::string& name, creatorFn funct);
42 
44 
47  void deregisterSkeletonExporter(const std::string& name);
48 
50 
53  std::vector<std::string> getRegisteredSkeletonExporters();
54 
56 
60  bool isRegistered(const std::string& name);
61 
62  private:
63 
66 
69 
72 
75 
76  typedef std::map<std::string, creatorFn> FactoryMap;
77 
79 
82  FactoryMap m_factoryMap;
83  };
84 }
AnimExporter factory.
Definition: SkeletonExporterFactory.h:21
std::vector< std::string > getRegisteredSkeletonExporters()
Gets all registered skeleton Exporter.
static SkeletonExporterFactory & instance()
Singleton access.
void registerSkeletonExporter(const std::string &name, creatorFn funct)
Registers a new skeleton Exporter type in the factory.
AtomsPtr< BaseSkeletonExporter > createSkeletonExporter(const std::string &typeName)
Creates an skeleton Exporter.
void deregisterSkeletonExporter(const std::string &name)
De-register a skeleton Exporter type from the factory.
bool isRegistered(const std::string &name)
Checks if a skeleton Exporter type with the given name is registered.
Atoms namespace.
Definition: Agent.h:29