2013-10-16 18:13:31 +02:00
|
|
|
// stl includes
|
|
|
|
#include <cctype>
|
|
|
|
#include <algorithm>
|
2013-08-25 18:20:19 +02:00
|
|
|
|
|
|
|
// Bootsequence includes
|
|
|
|
#include <bootsequence/BootSequenceFactory.h>
|
|
|
|
|
|
|
|
// Local Bootsequence includes
|
2013-12-01 16:35:45 +01:00
|
|
|
#include "EffectBootSequence.h"
|
2013-08-25 18:20:19 +02:00
|
|
|
|
|
|
|
BootSequence * BootSequenceFactory::createBootSequence(Hyperion * hyperion, const Json::Value & jsonConfig)
|
|
|
|
{
|
2013-12-01 16:35:45 +01:00
|
|
|
const std::string script = jsonConfig["script"].asString();
|
|
|
|
const Json::Value args = jsonConfig.get("args", Json::Value(Json::objectValue));
|
|
|
|
const unsigned duration = jsonConfig["duration_ms"].asUInt();
|
|
|
|
return new EffectBootSequence(hyperion, script, args, duration);
|
2013-08-25 18:20:19 +02:00
|
|
|
}
|