Atoms Crowd  7.0.0
Atoms::AnimationClipOperators Class Reference

Animation Clip Operator factory. More...

#include <AnimationClipOperators.h>

Public Types

typedef AnimationClipOperator *(* creatorFn) (const std::string &parameter)
 

Public Member Functions

AtomsPtr< AnimationClipOperatorcreateAnimationClipOperator (const std::string &name)
 Creates a animation clip operator. More...
 
AnimationClipOperatorcreateAnimationClipOperatorRawPtr (const std::string &name)
 Creates a animation clip operator. More...
 
bool registerAnimationClipOperator (const std::string &moduleName, creatorFn func, bool replace=false)
 Registers a animation clip operator in the factory. More...
 
bool deregisterAnimationClipOperator (const std::string &name)
 Deregisters a animation clip operator type from the factory. More...
 
std::vector< std::string > getRegisteredAnimationClipOperators ()
 Gets all registered animation clip operators. More...
 
bool isRegistered (const std::string &name)
 Check if a animation clip operator is registered. More...
 
bool processClip (Atoms::AnimationClip &clip, const std::string &opName, const AtomsCore::MapMetadata &metadata)
 Process a clip with the given operator. More...
 
void clear ()
 Clear factory.
 

Static Public Member Functions

static AnimationClipOperatorsinstance ()
 Singleton access.
 

Detailed Description

Animation Clip Operator factory.

Factory used to create Animation Clip Operators.

Member Function Documentation

◆ createAnimationClipOperator()

AtomsPtr<AnimationClipOperator> Atoms::AnimationClipOperators::createAnimationClipOperator ( const std::string &  name)

Creates a animation clip operator.

Parameters
nameanimation clip operator type name
Returns
Smart pointer to the animation clip operator created

◆ createAnimationClipOperatorRawPtr()

AnimationClipOperator* Atoms::AnimationClipOperators::createAnimationClipOperatorRawPtr ( const std::string &  name)

Creates a animation clip operator.

Parameters
nameanimation clip operator type name
Returns
Raw pointer to the animation clip operator created

◆ deregisterAnimationClipOperator()

bool Atoms::AnimationClipOperators::deregisterAnimationClipOperator ( const std::string &  name)

Deregisters a animation clip operator type from the factory.

Parameters
nameanimation clip operator name
Returns
True if the module is removed from the map

◆ getRegisteredAnimationClipOperators()

std::vector<std::string> Atoms::AnimationClipOperators::getRegisteredAnimationClipOperators ( )

Gets all registered animation clip operators.

Returns
List of all animation clip operator registered

◆ isRegistered()

bool Atoms::AnimationClipOperators::isRegistered ( const std::string &  name)

Check if a animation clip operator is registered.

Parameters
nameanimation clip operator name
Returns
Return true if the animation clip operator is already registered

◆ processClip()

bool Atoms::AnimationClipOperators::processClip ( Atoms::AnimationClip clip,
const std::string &  opName,
const AtomsCore::MapMetadata metadata 
)

Process a clip with the given operator.

Parameters
clipAnimation Clip
opNameThe operator name
metadataThe operator parameters
Returns
Return false if the operator with the given name was not found or if any of the parameters are invalid

◆ registerAnimationClipOperator()

bool Atoms::AnimationClipOperators::registerAnimationClipOperator ( const std::string &  moduleName,
creatorFn  func,
bool  replace = false 
)

Registers a animation clip operator in the factory.

Parameters
nameBehavioir module name
funccreator function
replaceReplace module if it already exists
Returns
True if the module is added to the map

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