[apps/code] VarBox from console

This commit is contained in:
Léa Saviot
2020-04-29 16:41:13 +02:00
committed by Émilie Feral
parent c81420c4b2
commit 9e973adbab
4 changed files with 65 additions and 29 deletions

View File

@@ -9,12 +9,9 @@ namespace Code {
* Script: | AutoImportationStatus | Content |*/
class Script : public Ion::Storage::Record {
private:
// Default script names are chosen between script1 and script99
static constexpr int k_maxNumberOfDefaultScriptNames = 99;
static constexpr int k_defaultScriptNameNumberMaxSize = 2; // Numbers from 1 to 99 have 2 digits max
public:
static constexpr size_t k_importationStatusSize = 1;
static constexpr size_t k_autoimportationStatusSize = 1;
static constexpr size_t k_currentImportationStatusSize = 1;
static constexpr int k_defaultScriptNameMaxSize = 6 + k_defaultScriptNameNumberMaxSize + 1;
/* 6 = strlen("script")
* k_defaultScriptNameNumberMaxSize = maxLength of integers between 1 and 99
@@ -27,6 +24,13 @@ public:
bool importationStatus() const;
void toggleImportationStatus();
const char * scriptContent() const;
bool contentFetchedFromConsole() const;
void setContentFetchedFromConsole(bool fetch) const;
private:
// Default script names are chosen between script1 and script99
static constexpr int k_maxNumberOfDefaultScriptNames = 99;
static constexpr int k_defaultScriptNameNumberMaxSize = 2; // Numbers from 1 to 99 have 2 digits max
};
}