FrameIT
SolutionRecorder Class Reference

Solution of a Stage More...

Inheritance diagram for SolutionRecorder:
FactRecorder IJSONsavable< SolutionRecorder > IJSONsavable< FactRecorder >

Classes

class  SubSolution
 Sits at the heart, but represents only a part of the whole Solution. More...
 

Public Member Functions

 SolutionRecorder ()
 
 SolutionRecorder (bool invoke=false)
 
- Public Member Functions inherited from FactRecorder
 FactRecorder ()
 Only used by JsonConverter to initiate empty instance. More...
 
void Dispose ()
 
 FactRecorder (bool invoke=false)
 Standard Constructor for empty, ready to use FactRecorder More...
 
bool TryGetFact (string URI, out Fact found)
 Exposes Dictionary<TKey, TValue>.TryGetValue(TKey, out TValue) of MyFactSpace More...
 
meta GetFactMeta (string id)
 Exposes contens of MetaInf

See also
ContainsKey(string)
More...
 
stepnote GetWorkflow (int index)
 Exposes contens of Workflow More...
 
bool ContainsKey (string id)
 wrappes MyFactSpace.ContainsKey(id ) More...
 
bool ContainsLabel (string label)
 Looks up if there is a label Fact.GetLabel in MyFactSpace.Values More...
 
string Add (Fact value, out bool exists, bool samestep, Gadget gadget, string scroll_label, bool isImmutable=false, bool force=false)
 Call this to Add a Fact to this instance. More...
 
bool Remove (Fact value, bool samestep, Gadget gadget, bool deleteSolutionFact=false)
 Call this to Remove a Fact from this instance. If other Facts depend on value Remove(/, true)will be called recursively/ cascadingly. More...
 
bool Remove (string key, bool samestep, Gadget gadget, bool deleteImmutables=false)
 
bool safe_dependencies (string key, out List< string > dependencies)
 searches recursively for Facts where Fact.getDependentFactIds includes key / found dependencies More...
 
void undo ()
 Undoes an entire step or last softreset . No Fact will be actually added, removed or deleted; only its visablity and meta.active changes.

See also
marker, worksteps, backlog
More...
 
void redo ()
 Redoes an entire step . No Fact will be actually added, removed or deleted; only its visablity and meta.active changes.

See also
marker, worksteps, backlog
More...
 
void Clear ()
 Resets to "factory conditions". Neither deletes Facts nor invokes CommunicationEvents.RemoveFactEvent More...
 
void hardreset (bool invoke_event=true)
 Resets to "factory conditions". deletes Facts and invokes CommunicationEvents.RemoveFactEvent iff invoke_event && invoke. More...
 
void softreset ()
 Undoes all worksteps (since marker) and sets soft_resetted to true. More...
 
void fastforward ()
 Redoes all worksteps (from marker onwards) and sets soft_resetted to false. More...
 
void Draw (bool draw_all=false)
 Call this after assigning a stored instance in an empty world, that was not drawn. Redoes/ draws everything from marker = 0 to draw_all ? worksteps : backlog More...
 
void Undraw (bool force_invoke=false)
 Undraws everything by invoking CommunicationEvents.RemoveFactEvent, that is meta.active, but does not change that satus. More...
 
bool DynamiclySolved (SolutionRecorder MinimalSolution, out List< List< string > > MissingElements, out List< List< string > > Solutions)
 Used to check wether this satisfies the constrains of an Solution. Only meta.active are accounted for. More...
 
IEnumerable< GadgetGetUsedGadgets ()
 
int GetNumberOfGadgets ()
 
IEnumerable< string > GetUsedScrolls ()
 
int GetNumberOfScrolls ()
 
int GetNumberOfFacts ()
 
- Public Member Functions inherited from IJSONsavable< FactRecorder >
virtual List< Directories > _IJGetHierarchie (List< Directories > hierarchie_base)
 
virtual bool _IJGetRawObject (out T payload, string path)
 
virtual T _IJPreProcess (T payload)
 
virtual T _IJPostProcess (T payload)
 
bool store (List< Directories > hierarchie, string name, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 
bool store_children (List< Directories > hierarchie, string name, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 
- Public Member Functions inherited from IJSONsavable< SolutionRecorder >
virtual List< Directories > _IJGetHierarchie (List< Directories > hierarchie_base)
 
virtual bool _IJGetRawObject (out T payload, string path)
 
virtual T _IJPreProcess (T payload)
 
virtual T _IJPostProcess (T payload)
 
bool store (List< Directories > hierarchie, string name, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 
bool store_children (List< Directories > hierarchie, string name, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 

Public Attributes

List< SubSolutionValidationSet = new()
 A collection of constrains of which all have to be true

See also
SubSolution, FactRecorder.DynamiclySolved(SolutionRecorder, out List<List<string>>, out List<List<string>>)
More...
 
List< string > ExposedSolutionFacts = new()
 Contains Fact.Ids which are being exposed to the Player More...
 
Dictionary< string,(string Id, int index, bool show)[]> ScrollOverwrites = new()
 Maps REST_JSON_API.Scroll.ScrollReferences to settings to apply to itself. More...
 
- Public Attributes inherited from FactRecorder
bool invoke
 If set to true, Remove(string, bool) and Add(Fact, out bool, bool) will invoke CommunicationEvents.RemoveFactEvent and CommunicationEvents.AddFactEvent respectively. More...
 

Private Member Functions

string IJSONsavable< SolutionRecorder >. _IJGetName (string name)
 
SolutionRecorder IJSONsavable< SolutionRecorder >. _IJPostProcess (SolutionRecorder raw_payload)
 
SolutionRecorder IJSONsavable< SolutionRecorder >. _IJPreProcess (SolutionRecorder payload)
 

Static Private Member Functions

static SolutionRecorder ()
 

Static Private Attributes

const string endingVal = "_val"
 adds to the end of the file name of a More...
 

Additional Inherited Members

- Static Public Member Functions inherited from FactRecorder
static T ReInitializeFactOrganizer< T > (T source, bool invoke, out Dictionary< string, string > old_to_new)
 Used to parse read-in FactRecorder by JsonReader and make Fact.Id conform. Also poppulates OldToNewURI More...
 
static bool FindEquivalent (IReadOnlyDictionary< string, Fact > FactSpace, Fact search, out string found_key, out Fact found_value, out bool exact, bool allow_exact=true)
 
- Static Public Member Functions inherited from IJSONsavable< FactRecorder >
static bool store (List< Directories > hierarchie, string name, T payload, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 
static bool store_children (List< Directories > hierarchie, string name, T payload, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 
static bool load_children (List< Directories > hierarchie, string name, ref T raw_payload, bool use_install_folder=false, bool deep_load=true, bool post_process=true)
 
static bool load (List< Directories > hierarchie, string name, out T payload, bool use_install_folder=false, bool deep_load=true, bool post_process=true)
 
static T postprocess (T payload)
 
static T preprocess (T payload)
 
static void delete_children (List< Directories > hierarchie, string name, bool use_install_folder=false, int skip_last_children=0)
 
static bool delete (List< Directories > hierarchie, string name, bool use_install_folder=false)
 
- Static Public Member Functions inherited from IJSONsavable< SolutionRecorder >
static bool store (List< Directories > hierarchie, string name, T payload, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 
static bool store_children (List< Directories > hierarchie, string name, T payload, bool use_install_folder=false, bool overwrite=true, bool deep_store=true)
 
static bool load_children (List< Directories > hierarchie, string name, ref T raw_payload, bool use_install_folder=false, bool deep_load=true, bool post_process=true)
 
static bool load (List< Directories > hierarchie, string name, out T payload, bool use_install_folder=false, bool deep_load=true, bool post_process=true)
 
static T postprocess (T payload)
 
static T preprocess (T payload)
 
static void delete_children (List< Directories > hierarchie, string name, bool use_install_folder=false, int skip_last_children=0)
 
static bool delete (List< Directories > hierarchie, string name, bool use_install_folder=false)
 
- Static Public Attributes inherited from IJSONsavable< FactRecorder >
static readonly IJSONsavable< T > Instance
 
static readonly FieldInfo[] JsonSaveableFields
 
static readonly FieldInfo[] JsonAutoPreProcessFields
 
static readonly FieldInfo[] JsonAutoPostProcessFields
 
static readonly FieldInfo[] JsonSeperateFields
 
- Static Public Attributes inherited from IJSONsavable< SolutionRecorder >
static readonly IJSONsavable< T > Instance
 
static readonly FieldInfo[] JsonSaveableFields
 
static readonly FieldInfo[] JsonAutoPreProcessFields
 
static readonly FieldInfo[] JsonAutoPostProcessFields
 
static readonly FieldInfo[] JsonSeperateFields
 
- Protected Attributes inherited from FactRecorder
List< string > ImmutableFacts = new()
 Contains Immutable Fact.Ids; e.g: From a SolutionRecorder which are being exposed to the Player. More...
 
Dictionary< Gadget,(int first_occurrence, int last_occurrence)> GadgetWorkflowDict = new()
 
Dictionary< int, GadgetWorkflowGadgetDict = new() { { -1, null } }
 
Dictionary< string, metaMetaInf = new()
 
List< stepnoteWorkflow = new()
 Keeps track of insertion/ deletion/ etc. operations for undo and redo More...
 
int marker = 0
 Notes position in Workflow for undo and redo; the pointed to element is non-acitve More...
 
int worksteps = 0
 Backlock logic redundant - for convinience. Keeps track of number of steps in Workflow. One step can consist of multiple operations.

See also
stepnote
More...
 
int backlog = 0
 Backlock logic redundant - for convinience. Keeps track of number of steps in Workflow, which are not set active. One step can consist of multiple operations.

See also
stepnote
More...
 
bool soft_resetted = false
 Set to true if recently been resetted. More...
 
- Static Protected Attributes inherited from IJSONsavable< FactRecorder >
static List< Directories > hierarchie
 
- Static Protected Attributes inherited from IJSONsavable< SolutionRecorder >
static List< Directories > hierarchie
 
- Package Attributes inherited from FactRecorder
int MaxLabelId = 0
 Keeps track of maximum Fact.LabelId for Fact.generateLabel. More...
 
SortedSet< int > UnusedLabelIds = new()
 Stores unused Fact.LabelId for Fact.generateLabel, wich were freed in Fact.freeAutoLabel for later reuse to keep naming space compact. More...
 
- Properties inherited from FactRecorder
IReadOnlyDictionary< string, FactMyFactSpace [get]
 
static IReadOnlyDictionary< string, FactAllFacts [get]
 
Fact this[string id] [get]
 wrappes MyFactSpace[id ]

See also
ContainsKey(string)
More...
 
string name = null [getset]
 For store(string, List<Directories>, bool, bool) and load(ref FactRecorder, bool, string, List<Directories>, bool, out Dictionary<string, string>) More...
 
string path = null [getset]
 For store(string, List<Directories>, bool, bool) and load(ref FactRecorder, bool, string, List<Directories>, bool, out Dictionary<string, string>) More...
 
- Properties inherited from IJSONsavable< FactRecorder >
string name [getset]
 
string path [getset]
 
- Properties inherited from IJSONsavable< SolutionRecorder >
string name [getset]
 
string path [getset]
 

Detailed Description

Solution of a Stage

Constructor & Destructor Documentation

◆ SolutionRecorder() [1/3]

static SolutionRecorder.SolutionRecorder ( )
staticprivate

◆ SolutionRecorder() [2/3]

SolutionRecorder.SolutionRecorder ( )

◆ SolutionRecorder() [3/3]

SolutionRecorder.SolutionRecorder ( bool  invoke = false)

Member Function Documentation

◆ _IJGetName()

string IJSONsavable< SolutionRecorder >. SolutionRecorder._IJGetName ( string  name)
privatevirtual

Reimplemented from IJSONsavable< SolutionRecorder >.

◆ _IJPostProcess()

SolutionRecorder IJSONsavable< SolutionRecorder >. SolutionRecorder._IJPostProcess ( SolutionRecorder  raw_payload)
private

◆ _IJPreProcess()

SolutionRecorder IJSONsavable< SolutionRecorder >. SolutionRecorder._IJPreProcess ( SolutionRecorder  payload)
private

Member Data Documentation

◆ endingVal

const string SolutionRecorder.endingVal = "_val"
staticprivate

adds to the end of the file name of a

SolutionFile (stores this)

◆ ExposedSolutionFacts

List<string> SolutionRecorder.ExposedSolutionFacts = new()

Contains Fact.Ids which are being exposed to the Player

◆ ScrollOverwrites

Dictionary<string, (string Id, int index, bool show)[]> SolutionRecorder.ScrollOverwrites = new()

Maps REST_JSON_API.Scroll.ScrollReferences to settings to apply to itself.

◆ ValidationSet

List<SubSolution> SolutionRecorder.ValidationSet = new()

The documentation for this class was generated from the following file: