[code] Added default Fibonacci script.

Change-Id: I2766fa542ee64722018486a874e9855a5976a788
This commit is contained in:
Léa Saviot
2017-10-25 16:13:09 +02:00
committed by Romain Goyet
parent 35520fb3d4
commit 745eddfa05
8 changed files with 128 additions and 100 deletions

View File

@@ -0,0 +1,20 @@
#ifndef CODE_SCRIPT_TEMPLATE_H
#define CODE_SCRIPT_TEMPLATE_H
namespace Code {
class ScriptTemplate {
public:
constexpr ScriptTemplate(const char * name, const char * content) : m_name(name), m_content(content) {}
static const ScriptTemplate * Empty();
static const ScriptTemplate * Factorial();
static const ScriptTemplate * Fibonacci();
static const ScriptTemplate * Mandelbrot();
const char * name() const { return m_name; }
const char * content() const { return m_content; }
private:
const char * m_name;
const char * m_content;
};}
#endif