Data Model #1
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The main object in the data model is the ‘state’ object, which keeps track of all the relevant state of the Vi editor at a given moment. This includes:
In particular there needs to be a method to check if two state objects are equivalent, with emphasis on doing this as quickly as possible (since while exploring the state tree we will need to check if we have repeated an already explored state, so that we can discard the search path).
Of course, the state object needs initialization and destructor functions, but maybe the object should be represented by just a struct, as opposed to a pointer to a struct, to make it possible to conduct operations on an array of states without the need to jump around in memory too much.
For now, little emphasis will be made to mutating state. Perhaps some mutations will be needed for testing purposes but these should be kept to a minimum. Other issues will be made to ask for state mutation.
Ideally the size of the state object would be a multiple of 64 bytes or vice versa.