osci-render/Source/parser/FileParser.h

40 wiersze
982 B
C
Czysty Zwykły widok Historia

#pragma once
#include "FrameSource.h"
#include "../shape/Shape.h"
#include "../obj/WorldObject.h"
#include "../obj/Camera.h"
#include "../svg/SvgParser.h"
2023-02-05 20:36:51 +00:00
#include "../txt/TextParser.h"
#include "../lua/LuaParser.h"
2023-08-27 18:33:42 +00:00
class FileParser {
public:
FileParser();
2023-08-27 18:33:42 +00:00
void parse(juce::String extension, std::unique_ptr<juce::InputStream>, juce::Font);
std::vector<std::unique_ptr<Shape>> nextFrame();
Vector2 nextSample();
bool isSample();
bool isActive();
void disable();
void enable();
2023-07-04 13:58:36 +00:00
std::shared_ptr<WorldObject> getObject();
std::shared_ptr<Camera> getCamera();
std::shared_ptr<SvgParser> getSvg();
std::shared_ptr<TextParser> getText();
std::shared_ptr<LuaParser> getLua();
private:
bool active = true;
bool sampleSource = false;
juce::SpinLock lock;
2023-02-05 19:36:50 +00:00
std::shared_ptr<WorldObject> object;
std::shared_ptr<Camera> camera;
std::shared_ptr<SvgParser> svg;
2023-02-05 20:36:51 +00:00
std::shared_ptr<TextParser> text;
std::shared_ptr<LuaParser> lua;
};