#include <sequenceservice.h>
Protected Member Functions | |
| void | registerObjectCreators (rtti::Factory &factory) override |
| bool | init (nap::utility::ErrorState &errorState) override |
| void | update (double deltaTime) override |
Protected Member Functions inherited from Service | |
| virtual void | getDependentServices (std::vector< rtti::TypeInfo > &dependencies) |
| virtual void | created () |
| virtual void | preUpdate (double deltaTime) |
| virtual void | postUpdate (double deltaTime) |
| virtual void | preShutdown () |
| virtual void | shutdown () |
| virtual void | preResourcesLoaded () |
| virtual void | postResourcesLoaded () |
| template<typename SERVICE_CONFIG > | |
| SERVICE_CONFIG * | getConfiguration () |
| template<typename SERVICE_CONFIG > | |
| const SERVICE_CONFIG * | getConfiguration () const |
| std::string | getIniFilePath () const |
| std::string | getIniFilePath (const std::string &appendix) const |
SequenceService is responsible for updating outputs and contains information about which controller, adapter is used for editing registered track types. When adding a new track type, make sure to register the new controller and adapter factory methods by calling the appropriate register functions on the SequenceService. A good place to do this from is from your own (app) Module Service that will always initialize itself before any SequenceEditor resource
| SequenceService | ( | ServiceConfiguration * | configuration | ) |
Constructor
|
override |
Deconstructor
| Sequence* createDefaultSequence | ( | std::vector< std::unique_ptr< rtti::Object >> & | createdObjects, |
| std::unordered_set< std::string > & | objectIDs, | ||
| const std::vector< ResourcePtr< SequencePlayerOutput >> & | outputs | ||
| ) |
creates a default sequence based on given outputs
| createdObjects | a reference to a vector that will be filled with unique pointers of created objects |
| objectIDs | a list of unique ids, used to created unique ids for each object in this sequence |
| outputs | a list of player outputs |
| std::string generateUniqueID | ( | std::unordered_set< std::string > & | objectIDs, |
| const std::string & | baseID = "Generated" |
||
| ) |
generate a unique id
| objectIDs | reference to collections of id's |
| baseID | base id |
| rtti::TypeInfo getControllerTypeForTrackType | ( | rtti::TypeInfo | trackType | ) |
returns controller type info for give track type
| trackType | the track type |
| std::vector<rtti::TypeInfo> getRegisteredControllerTypes | ( | ) | const |
returns all registered controller types that have registered factory functions
|
overrideprotectedvirtual |
initializes service
| errorState | contains any errors |
Reimplemented from Service.
| std::unique_ptr<SequencePlayerAdapter> invokeAdapterFactory | ( | rtti::TypeInfo | type, |
| const SequenceTrack & | track, | ||
| SequencePlayerOutput & | output, | ||
| const SequencePlayer & | player | ||
| ) |
Invokes adapter factory method and returns unique ptr to created adapter, assert when track type not found
| type | track type |
| track | reference to track |
| output | reference to input |
| player | sequence player creating adapter |
| std::unique_ptr<SequenceController> invokeControllerFactory | ( | rtti::TypeInfo | controllerType, |
| SequencePlayer & | player, | ||
| SequenceEditor & | editor | ||
| ) |
Invokes controller factory method and returns unique_ptr to controller, asserts when controller type is not found
| controllerType | the type of controller to create |
| player | reference to player |
| editor | reference to editor |
| bool registerAdapterFactoryFunc | ( | rtti::TypeInfo | typeInfo, |
| SequencePlayerAdapterFactoryFunc | factory | ||
| ) |
registers adapter factory method for specific track type
| typeInfo | the type of track that is associated with the factory method |
| factory | the factory method |
| bool registerControllerFactoryFunc | ( | rtti::TypeInfo | controllerType, |
| SequenceControllerFactoryFunc | factory | ||
| ) |
registers a new controller factory function for controller type
| controllerType | the type of controller for which to register a new factory function |
| factory | factory method of controller type |
| bool registerControllerTypeForTrackType | ( | rtti::TypeInfo | trackType, |
| rtti::TypeInfo | controllerType | ||
| ) |
Method that registers a certain controller type for a certain view type, this can be used by views to map controller types to view types
| trackType | the trackType |
| controllerType | the controller type |
| bool registerDefaultTrackCreatorForOutput | ( | rtti::TypeInfo | outputType, |
| std::function< std::unique_ptr< SequenceTrack >(const SequencePlayerOutput *)> | func | ||
| ) |
can be used to register a default creation method to the factory. When createDefaultSequence is called, it will iterate trough the given outputs and create a SequenceTrack that fits the output. Whenever we create a new type of output, we should also add a way to create a default track
| outputType | the type information of the sequence output |
| func | the factory method |
|
overrideprotectedvirtual |
registers all objects that need a specific way of construction
| factory | the factory to register the object creators with |
Reimplemented from Service.
| void registerStandardClock | ( | SequencePlayerStandardClock * | standardClock | ) |
registers a standard clock for updating
| standardClock | pointer to standard clock |
| void unregisterStandardClock | ( | SequencePlayerStandardClock * | standardClock | ) |
unregisters a standard clock
| standardClock | pointer to standard clock |
|
overrideprotectedvirtual |