design parser class

This commit is contained in:
Shuo Feng 2024-02-13 21:40:56 -05:00
parent 4912d6c1d3
commit 48f00d194f
Signed by: sfeng
GPG key ID: 1E83AE6CD1C037B1

View file

@ -1,6 +1,23 @@
#ifndef PARSER_H_
#define PARSER_H_
class Parser {};
#include "../external/json.hpp"
#include "Geometry.h"
#include "Light.h"
#include "Scene.h"
class Parser {
public:
static Geometry *parseGeometry(const nlohmann::json &);
static Light *parseLight(const nlohmann::json &);
static Scene *parseScene(const nlohmann::json &);
private:
static PointLight *parsePointLight(const nlohmann::json &);
static AreaLight *parseAreaLight(const nlohmann::json &);
static Rectangle *parseRectangle(const nlohmann::json &);
static Sphere *parseSphere(const nlohmann::json &);
};
#endif // !PARSER_H_