Atoms Crowd  7.0.0
AnimationClipOperators.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 <Atoms/Globals.h>
11 #include <AtomsCore/Globals.h>
12 #include <Atoms/ClipOperators/AnimationClipOperator.h>
13 #include <map>
14 
15 
16 namespace Atoms
17 {
19 
21  class ATOMS_EXPORT AnimationClipOperators
22  {
23  public:
24 
25  typedef AnimationClipOperator* (*creatorFn)(const std::string& parameter);
26 
29 
31 
35  AtomsPtr<AnimationClipOperator> createAnimationClipOperator(const std::string& name);
36 
38 
43 
45 
51  bool registerAnimationClipOperator(const std::string& moduleName, creatorFn func, bool replace = false);
52 
54 
58  bool deregisterAnimationClipOperator(const std::string& name);
59 
61 
64  std::vector<std::string> getRegisteredAnimationClipOperators();
65 
67 
71  bool isRegistered(const std::string& name);
72 
74 
80  bool processClip(Atoms::AnimationClip &clip, const std::string &opName, const AtomsCore::MapMetadata &metadata);
81 
83  void clear();
84 
85  private:
86 
89 
92 
95 
98 
99  private:
100 
102 
105  std::map<std::string, creatorFn> m_factoryMap;
106  };
107 }
Animation clip.
Definition: AnimationClip.h:221
Animation Clip Operator.
Definition: AnimationClipOperator.h:24
Animation Clip Operator factory.
Definition: AnimationClipOperators.h:22
AnimationClipOperator * createAnimationClipOperatorRawPtr(const std::string &name)
Creates a animation clip operator.
void clear()
Clear factory.
bool deregisterAnimationClipOperator(const std::string &name)
Deregisters a animation clip operator type from the factory.
bool registerAnimationClipOperator(const std::string &moduleName, creatorFn func, bool replace=false)
Registers a animation clip operator in the factory.
bool processClip(Atoms::AnimationClip &clip, const std::string &opName, const AtomsCore::MapMetadata &metadata)
Process a clip with the given operator.
AtomsPtr< AnimationClipOperator > createAnimationClipOperator(const std::string &name)
Creates a animation clip operator.
bool isRegistered(const std::string &name)
Check if a animation clip operator is registered.
static AnimationClipOperators & instance()
Singleton access.
std::vector< std::string > getRegisteredAnimationClipOperators()
Gets all registered animation clip operators.
MapMetadata class.
Definition: MapMetadata.h:24
Atoms namespace.
Definition: Agent.h:29