Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FrameWorld
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FrameIT
FrameWorld
Commits
6dae533d
Commit
6dae533d
authored
11 months ago
by
Paul-Walcher
Browse files
Options
Downloads
Patches
Plain Diff
create_fact.txt deleted
parent
735a4348
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
DOC/create_fact.txt
+0
-69
0 additions, 69 deletions
DOC/create_fact.txt
with
0 additions
and
69 deletions
DOC/create_fact.txt
deleted
100644 → 0
+
0
−
69
View file @
735a4348
in gadget: use Factadder
factadder adds the fact to the server, use standard method AddFactIfNotFound
fact: fact to add
samestep: if the fact belongs conceptually to the previously added one
Fact.cs: Caches all facts
see TestFact as an example
parseFact interprets new MMT fact.
--------------------------------------
In Assets\InteractionEngine\FactHandling\Facts create your own fact
First, add your scroll you Implemented into Assets\Scripts\MMTServer\CommunicationProtocal\MMTConstants.cs
Follow the definitions of previous srolls/functions.
Then, in Assets\InteractionEngine\FactHandling\Facts.ParsingDictionary.Dictionary add an entry with your
MMTConstant as key and the parseFact Method of the Fact class you're going to implement.
Then in Assets\InteractionEngine\FactHandling\Facts.ParsingDictionary add a line to the lines
that look like [JsonSubtypes,.KnownSubType(typeof(YOUR_FACTCLASS), nameof(YOUR_FACTCLASS))]
Your fact should include:
1.) A constructor that calls base(). Constructor can have SomDoc, which is the MMT URI as OMS.
2.) define: A method parseFact(List<Fact>, MMTFact fact).
Then, in this method, you will try to add your fact to the ParsingDictionary in Assets\InteractionEngine\FactHandling\Facts,
then add it to the first argument (the list).
3.) define: public override bool HasDependentFact => [true/false]
4.) define: GetDeendentFactIds(), which gives back a string array of the dependent Ids of your facts.
5.) define: GetHashCode()
6.) define: EquivalentWrapped(YOUR_FACTCLASS, YOUR_FACTCLASS), which is a Method that
returns true if the two facts are (approximately) equal
7.) define: _ReInitializeMe(Dictionary<string, string> old_to_new), that gets called when the Fact
gets reinstantiated
8.) define: MakeMMTDecalaration(), which gives back a new MMTFact
9.) define: Defines(), which gives back a SOMDoc(MMTObject) of your class
----------------------------------------------------------
1.) In Assets\InteractionEngine\FactHandling\Facts create your own fact. ()
2.)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment