diff --git a/sjplayer/src/sjplayer/Context.d b/sjplayer/src/sjplayer/Context.d index 36ef82b..4c03068 100644 --- a/sjplayer/src/sjplayer/Context.d +++ b/sjplayer/src/sjplayer/Context.d @@ -7,7 +7,7 @@ import std.algorithm, import sjscript; import sjplayer.ElementInterface, - sjplayer.ElementProgramSet, + sjplayer.ProgramSet, sjplayer.ScheduledControllerInterface, sjplayer.VarStoreInterface; @@ -18,7 +18,7 @@ struct Context { @disable this(this); /// - this(ParametersBlock[] params, ElementProgramSet programs) { + this(ParametersBlock[] params, ProgramSet programs) { auto varstore = new BlackHole!VarStoreInterface; import sjplayer.CircleElementScheduledController; diff --git a/sjplayer/src/sjplayer/ElementProgramSet.d b/sjplayer/src/sjplayer/ProgramSet.d similarity index 66% rename from sjplayer/src/sjplayer/ElementProgramSet.d rename to sjplayer/src/sjplayer/ProgramSet.d index fd18719..e9be3fa 100644 --- a/sjplayer/src/sjplayer/ElementProgramSet.d +++ b/sjplayer/src/sjplayer/ProgramSet.d @@ -1,5 +1,5 @@ /// License: MIT -module sjplayer.ElementProgramSet; +module sjplayer.ProgramSet; import std.meta, std.typecons; @@ -7,10 +7,10 @@ import std.meta, import sjplayer.CircleElement; /// -class ElementProgramSet { +class ProgramSet { public: /// - alias ElementPrograms = Tuple!(CircleElementProgram); + alias Programs = Tuple!(CircleElementProgram); /// this() { @@ -26,11 +26,11 @@ class ElementProgramSet { /// T Get(T)() out (r; r) { - enum index = staticIndexOf!(T, ElementPrograms.Types); + enum index = staticIndexOf!(T, Programs.Types); static assert(index >= 0); return programs_[index]; } private: - ElementPrograms programs_; + Programs programs_; } diff --git a/sjplayer/src/sjplayer/ScheduledControllerFactory.d b/sjplayer/src/sjplayer/ScheduledControllerFactory.d index 27dfafd..5b31cba 100644 --- a/sjplayer/src/sjplayer/ScheduledControllerFactory.d +++ b/sjplayer/src/sjplayer/ScheduledControllerFactory.d @@ -11,7 +11,7 @@ import std.algorithm, import sjscript; import sjplayer.ElementInterface, - sjplayer.ElementProgramSet, + sjplayer.ProgramSet, sjplayer.ScheduledControllerInterface, sjplayer.VarStoreInterface, sjplayer.util.Period; @@ -43,12 +43,12 @@ struct ElementScheduledControllerFactory(ScheduledController, ElementDrawer) Parameters!(__traits(getOverloads, ElementDrawer, "__ctor")[0])[0]; static assert(staticIndexOf!( - ElementProgram, ElementProgramSet.ElementPrograms.Types) >= 0); + ElementProgram, ProgramSet.Programs.Types) >= 0); static assert(is(Element[] : Parameters!(__traits(getOverloads, ElementDrawer, "__ctor")[0])[1])); /// - this(ElementProgramSet programs, VarStoreInterface varstore) { + this(ProgramSet programs, VarStoreInterface varstore) { program_ = programs.Get!ElementProgram; varstore_ = varstore; } diff --git a/sjplayer/src/sjplayer/package.d b/sjplayer/src/sjplayer/package.d index 285fc8e..de2b085 100644 --- a/sjplayer/src/sjplayer/package.d +++ b/sjplayer/src/sjplayer/package.d @@ -5,15 +5,15 @@ import sjscript; public { import sjplayer.Context, - sjplayer.ElementProgramSet; + sjplayer.ProgramSet; } /// -Context CreateContextFromText(string src, ElementProgramSet programs) { +Context CreateContextFromText(string src, ProgramSet programs) { return src.CreateScriptAst().CreateContextFromScriptAst(programs); } /// Context CreateContextFromScriptAst( - ParametersBlock[] params, ElementProgramSet programs) { + ParametersBlock[] params, ProgramSet programs) { return Context(params, programs); } diff --git a/sjplayer/standalone/main.d b/sjplayer/standalone/main.d index 407549c..1b10d14 100644 --- a/sjplayer/standalone/main.d +++ b/sjplayer/standalone/main.d @@ -22,7 +22,7 @@ int main(string[] args) { scope(exit) sfMusic_destroy(music); sfMusic_play(music); - auto programs = new ElementProgramSet; + auto programs = new ProgramSet; scope(exit) programs.destroy(); auto context = script_file.readText.CreateContextFromText(programs);