Ipelib
|
Repository of strings. More...
#include <ipeattributes.h>
Repository of strings.
Ipe documents can use symbolic attributes, such as 'normal', 'fat', or 'thin' for line thickness, or 'red', 'navy', 'turquoise' for color, as well as absolute attributes such as "[3 1] 0" for a dash pattern. To avoid storing these common strings hundreds of times, Repository keeps a repository of strings. Inside an Object, strings are replaced by indices into the repository.
The Repository is a singleton object. It is created the first time it is used. You obtain access to the repository using get().
Repository * Repository::get | ( | ) | [static] |
Get pointer to singleton Repository.
void Repository::cleanup | ( | ) | [static] |
Destroy repository object.
String Repository::toString | ( | int | index | ) | const |
Return string with given index.
int Repository::toIndex | ( | String | str | ) |
Return index of given string.
The string is added to the repository if it doesn't exist yet.