Ipelib

- Main Page
- Modules
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# ipe::Repository Class Reference
Ipe Attributes

Repository of strings. More...

`#include <ipeattributes.h>`

List of all members.

## Public Member Functions

- String toString (int index) const
- int toIndex (String str)

## Static Public Member Functions

- static Repository * get ()
- static void cleanup ()

## Detailed Description

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().

## Member Function Documentation

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.

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

- ipeattributes.h
- ipeattributes.cpp