mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] The console marks imported script for the var box
After lauching the console, if we fetch a script we mark it as fetched. When the variable box displays variables from imported scripts, it scans all the variables from the scripts marked as fetched.
This commit is contained in:
@@ -9,9 +9,14 @@ namespace Code {
|
||||
* Script: | AutoImportationStatus | Content |*/
|
||||
|
||||
class Script : public Ion::Storage::Record {
|
||||
public:
|
||||
static constexpr size_t k_autoimportationStatusSize = 1;
|
||||
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
|
||||
|
||||
static constexpr size_t k_autoImportationStatusSize = 1; //TODO LEA use only 1 byte for both status flags
|
||||
static constexpr size_t k_currentImportationStatusSize = 1;
|
||||
public:
|
||||
static constexpr int k_defaultScriptNameMaxSize = 6 + k_defaultScriptNameNumberMaxSize + 1;
|
||||
/* 6 = strlen("script")
|
||||
* k_defaultScriptNameNumberMaxSize = maxLength of integers between 1 and 99
|
||||
@@ -19,18 +24,14 @@ public:
|
||||
|
||||
static bool DefaultName(char buffer[], size_t bufferSize);
|
||||
static bool nameCompliant(const char * name);
|
||||
static constexpr size_t InformationSize() { return k_autoImportationStatusSize + k_currentImportationStatusSize; }
|
||||
|
||||
Script(Ion::Storage::Record r = Ion::Storage::Record()) : Record(r) {}
|
||||
bool importationStatus() const;
|
||||
void toggleImportationStatus();
|
||||
bool autoImportationStatus() const;
|
||||
void toggleAutoimportationStatus();
|
||||
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
|
||||
|
||||
void setContentFetchedFromConsole(bool fetch);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user