Source code for openalea.oalab.model.textual

# -*- python -*-
#
#       OpenAlea.OALab: Multi-Paradigm GUI
#
#       Copyright 2014 INRIA - CIRAD - INRA
#
#       File author(s): Julien Coste <julien.coste@inria.fr>
#
#       File contributor(s):
#
#       Distributed under the Cecill-C License.
#       See accompanying file LICENSE.txt or copy at
#           http://www.cecill.info/licences/Licence_CeCILL-C_V1-en.html
#
#       OpenAlea WebSite : http://openalea.gforge.inria.fr
#
###############################################################################
from openalea.core.data import Data


[docs]class TextualModel(Data): default_name = "Textual" default_file_name = "" pattern = "" extension = "" icon = "" mimetype = ""
[docs] def repr_code(self): """ :return: a string representation of model to save it on disk """ return self._initial_code
[docs] def run(self, *args, **kwargs): """ execute entire model """ return None
[docs] def init(self, *args, **kwargs): """ go back to initial step """ return None
[docs] def step(self, i=None, *args, **kwargs): """ execute only one step of the model """ return None
[docs] def stop(self, *args, **kwargs): """ stop execution """ return None
[docs] def animate(self, *args, **kwargs): """ run model step by step """ return None
[docs] def set_code(self, code): self._initial_code = code