Cytosim PI Cytoskeleton Simulator

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

List of all members | Public Member Functions | Protected Attributes
Interface Class Referenceabstract
Inheritance diagram for Interface:

## Public Member Functions
| Interface (Simul &s)
| associates with given Simul
virtual | ~Interface ()
| destructor
virtual void | hold ()
| this is called between commands during the execution process More...
virtual void | parse (std::istream &, std::string const &msg)=0
| Parse a text containing cytosim commands. More...
Property * | execute_set (std::string const &k, std::string const &n, Glossary &)
| create a new Property of kind k from options set in Glossary More...
void | execute_change (Property *, Glossary &)
| change values in Property according to Glossary
Property * | execute_change (std::string const &k, std::string const &n, Glossary &)
| change values in Property of kind k following options set in Glossary
void | change_display (std::string const &k, std::string const &n, Glossary &)
| change 'display' (and only this) in corresponding Property More...
ObjectList | execute_new (std::string const &k, std::string const &n, Glossary &)
| create 1 Object of kind k with name n, following options in Glossary More...
int | execute_new (std::string const &k, std::string const &n, unsigned cnt)
| create 'cnt' objects of kind k with name n, randomly placed in space (no option)
void | execute_delete (std::string const &k, std::string const &n, Glossary &, int cnt)
| delete `cnt` objects of kind k with name n, following options in Glossary More...
void | execute_mark (std::string const &k, std::string const &n, Glossary &, int cnt)
| mark `cnt` objects of kind k with name n, following options in Glossary More...
void | execute_cut (std::string const &k, std::string const &n, Glossary &)
| cut fibers, following different options in Glossary
void | execute_read (std::string const &file, unsigned index)
| import objects from another file More...
void | execute_write (std::string &file, std::string const &what, Glossary &)
| write output file with object coordinates or information on objects More...
void | execute_run (Glossary &opt, unsigned cnt, bool do_write)
| perform simulation steps

## Protected Attributes
Simul & | simul
| associated Simul

## Member Function Documentation

void change_display | ( | std::string const & | kind,
|  | std::string const & | name,
|  | Glossary & | def
| ) |  |

This may change the 'display' field in the Properties corresponding to `kind` and `name`. The `display` value should be specified in `def`.

void execute_delete | ( | std::string const & | kind,
|  | std::string const & | name,
|  | Glossary & | opt,
|  | int | cnt
| ) |  |

If cnt is specified, this will delete at most 'cnt' objects, chosen randomly

void execute_mark | ( | std::string const & | kind,
|  | std::string const & | name,
|  | Glossary & | opt,
|  | int | cnt
| ) |  |

If cnt is specified, this will mark at most 'cnt' objects, chosen randomly

ObjectList execute_new | ( | std::string const & | kind,
|  | std::string const & | name,
|  | Glossary & | opt
| ) |  |

Creates one object of class 'kind' and type 'name'.

void execute_read | ( | std::string const & | file,
|  | unsigned | frame
| ) |  |

Imports a simulation snapshot from a trajectory file

By default, the first frame in the file is read, but an argument 'frame=INTEGER' can be given in 'opt'.

Property * execute_set | ( | std::string const & | kind,
|  | std::string const & | name,
|  | Glossary & | def
| ) |  |

Property::complete() is called after a property is set. This ensures that inconsistencies are detected as early as possible.

The drawback is that we cannot support cross-dependencies (A needs B and vice-versa). If that is necessary, we could:

- call complete() for all Properties, after the parsing process is complete.
- remove any check for the existence of invoked properties, in which case error would be detected only when objects are created later.

void execute_write | ( | std::string & | file,
|  | std::string const & | what,
|  | Glossary & | opt
| ) |  |

see Parser::parse_write

virtual void hold | ( |  | ) |
| inline virtual

The overwritten version should call simul.relax() to make sure that the simulation data structures are coherent. It can perform additional things, for example display the simulation world

virtual void parse | ( | std::istream & | ,
|  | std::string const & | msg
| ) |  |
| pure virtual

This is necessary for the 'event code' in parse_run(), The function must be defined in the derived class Parser

Implemented in Parser.