31.01.2014 Views

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

Version 5.0 The LEDA User Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

int<br />

GW.set limit(GeoEditScene ∗ es, int limit)<br />

sets the limit of edit scene es to limit and returns the<br />

previous value.<br />

<strong>The</strong> templated add user call operation uses member templates. If your compiler<br />

does not support member templates, you should use instead the templated function<br />

geowin add user call with GW as an additional first parameter.<br />

template <br />

void GW.add user call(string label, F f)<br />

adds a menu item label to the ”<strong>User</strong>” menu of GW .<br />

<strong>The</strong> user defined function void geo call(GeoWin&,<br />

F, string) is called whenever this menu button was<br />

pressed with parameters GW , f and label. This menu<br />

definition has to be finished before GW is opened.<br />

Import- and export objects can be used to import and export the contents of scenes in<br />

various formats.<br />

<strong>The</strong> classes geowin import and geowin export are used for implementing import- and export<br />

objects. <strong>The</strong> classes geowin import and geowin export have virtual ( ) - operators:<br />

virtual void operator( )(geo scene sc, string filename)<br />

This virtual operator can be overwritten in derived classes to provide import and export<br />

functionality for own formats. <strong>The</strong> first parameter is the scene sc that will be used as<br />

source for the output or target for the input. <strong>The</strong> second parameter filename is the name<br />

of the input (import objects) or output (export objects) file.<br />

void<br />

void<br />

GW.add import object(geo scene sc, geowin import& io, string name,<br />

string desc)<br />

Adds an import object io to scene sc. <strong>The</strong> import<br />

object gets the name name and the description desc.<br />

GW.add export object(geo scene sc, geowin export& eo, string name,<br />

string desc)<br />

Adds an export object eo to scene sc. <strong>The</strong> export<br />

object gets the name name and the description desc.<br />

4. Non-Member Functions<br />

GeoWin∗<br />

get geowin(geo scene sc)<br />

returns a pointer to the GeoWin of sc.<br />

template <br />

bool get objects(geo scene sc, CONTAINER& c)<br />

If the contents of scene sc matches type<br />

CONTAINER, then the contents of scene sc is<br />

copied to c.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!