4. Attributes
Prev | Chapter 3. Tulip Library | Next

## 4. Attributes

An attributes is a kind of property that can be associated to a graph. An attributes has a name (a string) and a value of any type. It can be, for example ,the name of a graph, or a date of creation of the graph.

Attributes can be added and accessed with those three following member functions :

- `const DataSet getAttributes()` : returns the attributes of a graph.

- `template<typename ATTRIBUTETYPE>bool getAttribute(const std::string &name, ATTRIBUTETYPE &value)` : get an attribute.

- `template<typename ATTRIBUTETYPE>void setAttribute (const std::string &name, const ATTRIBUTETYPE &value)` : set a new attribute value.

Prev | Up | Next
3. Hierarchy of graphs | Home | 5. Properties