atom::memory - Atom - In-memory storage backend
Welcome to the Atom project, written by Andreas Kupries.
For availability please read Atom - How To Get The Sources.
This package provides an in-memory storage for string interning.
This constructor command creates a new instance obj of the class and returns the fully qualified name of that instance.
This constructor command creates a new instance of the class and returns the fully qualified name of that instance.
As a derived class of atom instances of this class provide the following methods:
This method adds the specified string to the instance, and returns its unique numeric identifier as the result of the method.
Multiple calls of this method for the same string all return the same identifier.
This method maps the specified numeric id back to its string, and returns that string as the result of the method.
An error is thrown if the id is not known to the instance.
This method returns a list of all strings which have been interned into the instance.
This method tests if the specified string has been interned into the instance and returns a boolean flag as the result of the method. The result is true if the string is known, and false otherwise.
This method tests if the specified numeric id is known to the instance and returns a boolean flag as the result of the method. The result is true if the id is known, and false otherwise.
This method returns the number of interned strings known to the instance.
This method adds the specified string to the instance and forces an association with the specified numeric id. The result of the method is the empty string.
An error will be thrown however if the id is already used for a different string.
This method drops all string/id mappings from the instance. After this method has run the instance is empty. The result of this method is the empty string.
This method serializes the content of the instance, i.e. the string-to-id map and returns it as the result of the method.
The result is a Tcl dictionary with the strings as keys and the associated identifiers as the values.
This method takes a serialization as generated by method serialize and adds it to the instance. It uses the method map for this, to preserve the exact string/id mapping found in the input. On the flip-side this means that existing mappings may interfere and cause an error to be thrown.
If the previous content is not relevant, use method load instead. If the exact mapping is not relevant, use method merge instead.
The result of the method is the empty string.
This method takes a serialization as generated by method serialize and uses it to replace previous content of the instance.
The result of the method is the empty string.
This method takes a serialization as generated by method serialize and adds the strings it contains to the instance. The ids found in the serialization are ignored and do not transfer.
The result of the method is the empty string.
Both the package(s) and this documentation will undoubtedly contain bugs and other problems. Please report such at Atom Tickets.
Please also report any ideas you may have for enhancements of either package(s) and/or documentation.
Copyright © 2013-2016 Andreas Kupries
Copyright © 2013-2016 Documentation, Andreas Kupries