Simulation class. More...
#include <model.h>
Public Slots | |
void | registerFile (std::string filename) |
This function registers a file to the file alteration monitor. | |
void | setAnimationPeriod (int ms) |
Set the animation period, i.e. | |
void | setExitCode (int code) |
Set the exit code. | |
void | unregisterFile (std::string filename) |
This function unregisters a file from the file alteration monitor. | |
Snapshots methods | |
bool | loadSnapshot (const QString &filename) |
Load a snapshot. | |
bool | loadSnapshot () |
Load a snapshot specified by the user of the model. | |
bool | saveNextSnapshot () |
Save the current model as a snapshot on the current recording. | |
bool | saveSnapshot (const QString &filename) |
Save the current model as a snapshot. | |
Screenshot methods | |
void | screenshot (const QString &fileName, bool overwrite=false) |
Save a screenshot. | |
Signals | |
Signals for internal usage only | |
void | changedExitCode (int) |
Signal emitted when the user changes the exit code. | |
void | fileRegister (std::string) |
Signal emitted anytime the user is registering a file to the file checker. | |
void | fileUnregister (std::string) |
Signal emitted anytime the user is unregistering a file . | |
void | loadingSnapshot (const QString &filename, Model *) |
Signal emitted when the user wants to load a snapshot. | |
void | loadingSnapshot (bool auto_naming, Model *) |
Signal emitted when the user wants to load a snapshot. | |
void | menuActionInserted (QAction *before, QAction *act) |
Signal emitted when an action is inserted. | |
void | menuActionRemoved (QAction *act) |
Signal emitted when an action is removed. | |
void | restartModel () |
Signal emitted when the model request the end of computations. | |
void | runModel () |
Signal emitted when the model request the end of computations. | |
void | savingNextSnapshot (bool, Model *) |
Signal emitted when the user want to save the next snapshot. | |
void | savingScreenshot (const QString &filename, bool overwrite) |
Signal emitted when the user request the saving of a snapshot. | |
void | savingSnapshot (const QString &filename, Model *) |
Signal emitted when the user wants to save a snapshot. | |
void | stopModel () |
Signal emitted when the model request the end of computations. | |
Public Member Functions | |
const QStringList & | arguments () const |
Retrieve the arguments left for the model on the command line (i.e. | |
QString | errorString () const |
Drawing and GUI interaction methods | |
QList< QAction * > | actions () const |
Get the list of actions used to create the context menu on the viewer. | |
void | addAction (QAction *action) |
Add an action to the context menu. | |
void | addActions (QList< QAction * > actions) |
Add a list of actions to the context menu. | |
QAction * | addMenuItem (const QString &text) |
Add a menu item, without connecting any signal. | |
QAction * | addMenuItem (const QString &text, const char *slot) |
Add a menu item, the receiver being the model. | |
QAction * | addMenuItem (const QString &text, QObject *receiver, const char *slot) |
Add a menu item to attach to the given slot. | |
int | animationPeriod () |
Returns the current animation period. | |
virtual void | draw () |
Convenience function used if the viewer is not necessary. | |
virtual void | draw (Viewer *) |
This function should be redefined to draw the representation. | |
virtual void | drawWithNames () |
Convenience function used if the viewer is not necessary. | |
virtual void | drawWithNames (Viewer *) |
Draw with object naming. | |
virtual void | finalizeDraw () |
Convenience function used if the viewer is not necessary. | |
virtual void | finalizeDraw (Viewer *) |
This function is called if the OpenGL environment is destroyed or if the model is detroyed. | |
virtual void | initDraw () |
Convenience function used if the viewer is not necessary. | |
virtual void | initDraw (Viewer *) |
This function is called everytime a new OpenGL environment is created, before the first preDraw(Viewer*). | |
void | insertAction (QAction *before, QAction *action) |
Insert an action in the context menu. | |
void | insertActions (QAction *before, QList< QAction * > action) |
Insert a list of actions in the context menu. | |
QAction * | menuItem (const QString &text) const |
Returns the action representing the menu item text . | |
virtual void | postDraw () |
Convenience function used if the viewer is not necessary. | |
virtual void | postDraw (Viewer *) |
This function should be redefined to restore the original OpenGL context. | |
virtual void | postSelection (const QPoint &pos, Viewer *viewer) |
This function is used to resolve a selection event. | |
virtual void | preDraw () |
Convenience function used if the viewer is not necessary. | |
virtual void | preDraw (Viewer *) |
This function should be redefined to setup the OpenGL context. | |
void | removeAction (QAction *action) |
Remove an action from the context menu. | |
bool | removeMenuItem (const QString &text, const char *slot) |
Disconnect a menu item, the receiver is the current model. | |
bool | removeMenuItem (const QString &text, QObject *receiver, const char *slot) |
Remove the slot from a menu item, if there are more connection, the item is not deleted. | |
bool | removeMenuItem (const QString &text) |
Remove a menu item. | |
void | setStatusMessage (const QString &msg) |
Change the status message. | |
QString | statusMessage () const |
Get the current status message. | |
Textual output methods | |
virtual void | finalizePrint () |
This method is called once when the model is about to be destroyed in batch mode. | |
virtual void | initPrint () |
This method is called once before the model is ran in batch mode. | |
virtual void | print () |
This function is called after each step of a model launched in batch mode. | |
Methods to redefine to change the behavior of the model | |
virtual QString | helpString () const |
This function is used to setup the help in the help box. | |
virtual void | modifiedFiles () |
Convenience function to be used if the list of files is ignored. | |
virtual void | modifiedFiles (const std::set< std::string > &) |
This function is called anytime one or more registered files are modified. | |
virtual void | reread () |
Reimplement the reread method to allow using the model without a parameter file. | |
virtual void | step ()=0 |
A step correspond to all the computations between two drawings. | |
Constructor/destructor | |
Model (QObject *parent) | |
Constructor of the object. | |
virtual | ~Model () |
Virtual destructor ensure the destruction occurring is the one of the leaf class. | |
Model execution interaction | |
virtual void | restart () |
This function requests a restart of the simulation. | |
virtual void | run () |
This function requests the model to run. | |
virtual void | stop () |
This function requests the end of the simulation. | |
Snapshot methods | |
virtual bool | serialize (storage::VVEStorage &) |
Reimplement this method to load/save the current state of the model. | |
virtual QString | version () const |
virtual int | versionNumber (const QString &) |
Methods for internal usage only | |
void | setError (bool error, QString err=QString()) |
Simulation class.
This class has to be the base class of the main class of the project.
It handles all steps specific to the simulation and the drawing of the result. Initialization of the model should occur in the constructor of the class. And any resource deallocation should occur in the destructor. An object of this class will be created at the beginning of each simulation, and destroyed at the end.
The main Model object has to be registered using the DEFINE_MODEL(classname) macro command defined in <vvall.h>.
Definition at line 44 of file model.h.
Model::Model | ( | QObject * | parent | ) |
Constructor of the object.
parent | is the object handling the life of this object. It is required to handle file registration. |
Definition at line 20 of file model_.cpp.
References QObject::connect(), fileRegister(), fileUnregister(), QVariant::isValid(), loadingSnapshot(), loadSnapshot(), menuActionInserted(), menuActionRemoved(), QObject::property(), registerFile(), restartModel(), runModel(), saveSnapshot(), savingNextSnapshot(), savingScreenshot(), savingSnapshot(), screenshot(), stopModel(), QVariant::toStringList(), QVariant::type(), unregisterFile(), and graph::vertex_counter.
00021 : FileObject(parent) 00022 { 00023 #ifndef NO_NUMBER_VERTICES 00024 graph::vertex_counter = 0; 00025 #endif 00026 connect(this, SIGNAL(fileRegister(std::string)), parent, SLOT(registerFile(std::string))); 00027 connect(this, SIGNAL(fileUnregister(std::string)), parent, SLOT(unregisterFile(std::string))); 00028 connect(this, SIGNAL(stopModel()), parent, SLOT(stopModel())); 00029 connect(this, SIGNAL(runModel()), parent, SLOT(runModel())); 00030 connect(this, SIGNAL(restartModel()), parent, SLOT(rewind())); 00031 connect(this, SIGNAL(menuActionInserted(QAction*,QAction*)), parent, SLOT(insertMenuAction(QAction*,QAction*))); 00032 connect(this, SIGNAL(menuActionRemoved(QAction*)), parent, SLOT(removeMenuAction(QAction*))); 00033 connect(this, SIGNAL(savingSnapshot(const QString&, Model*)), parent, SLOT(saveSnapshot(const QString&, Model*))); 00034 connect(this, SIGNAL(savingNextSnapshot(bool, Model*)), parent, SLOT(saveSnapshot(bool, Model*))); 00035 connect(this, SIGNAL(loadingSnapshot(const QString&, Model*)), parent, SLOT(loadSnapshot(const QString&, Model*))); 00036 connect(this, SIGNAL(loadingSnapshot(bool, Model*)), parent, SLOT(loadSnapshot(bool, Model*))); 00037 connect(this, SIGNAL(savingScreenshot(const QString&, bool)), parent, SLOT(screenshot(const QString&, bool))); 00038 00039 QVariant args = parent->property("modelArguments"); 00040 if(args.isValid()) 00041 { 00042 if(args.type() == QVariant::StringList) 00043 { 00044 _arguments = args.toStringList(); 00045 } 00046 } 00047 }
virtual Model::~Model | ( | ) | [inline, virtual] |
Get the list of actions used to create the context menu on the viewer.
Definition at line 125 of file model_.cpp.
Referenced by menuItem().
void Model::addAction | ( | QAction * | action | ) |
Add an action to the context menu.
Definition at line 196 of file model_.cpp.
References insertAction().
Referenced by addMenuItem().
00197 { 00198 insertAction(0, action); 00199 }
Add a list of actions to the context menu.
Definition at line 201 of file model_.cpp.
References insertActions().
00202 { 00203 insertActions(0, actions); 00204 }
Add a menu item, without connecting any signal.
Definition at line 140 of file model_.cpp.
References addAction(), and menuItem().
Add a menu item, the receiver being the model.
Definition at line 167 of file model_.cpp.
References addMenuItem().
00168 { 00169 return addMenuItem(text, this, slot); 00170 }
Add a menu item to attach to the given slot.
Definition at line 151 of file model_.cpp.
References addAction(), QObject::connect(), and menuItem().
Referenced by addMenuItem().
00152 { 00153 QAction *act = menuItem(text); 00154 if(act) 00155 { 00156 connect(act, SIGNAL(triggered()), receiver, slot); 00157 } 00158 else 00159 { 00160 act = new QAction(text, this); 00161 connect(act, SIGNAL(triggered()), receiver, slot); 00162 addAction(act); 00163 } 00164 return act; 00165 }
int Model::animationPeriod | ( | ) |
Returns the current animation period.
Definition at line 116 of file model_.cpp.
References QObject::parent().
00117 { 00118 bool ok; 00119 int period = parent()->property("animationPeriod").toInt(&ok); 00120 if(!ok) 00121 return -1; 00122 return period; 00123 }
const QStringList& Model::arguments | ( | ) | const [inline] |
void Model::changedExitCode | ( | int | ) | [signal] |
Signal emitted when the user changes the exit code.
Referenced by setExitCode().
virtual void Model::draw | ( | ) | [inline, virtual] |
void Model::draw | ( | Viewer * | viewer | ) | [inline, virtual] |
This function should be redefined to draw the representation.
Reimplemented in bspline_tissue_model::TissueModel< RealModel, TissueClass >, and tissue_model::TissueModel< RealModel, TissueClass >.
Definition at line 167 of file model.h.
References draw().
Referenced by draw().
00167 { this->draw(); }
virtual void Model::drawWithNames | ( | ) | [inline, virtual] |
Convenience function used if the viewer is not necessary.
Reimplemented in bspline_tissue_model::TissueModel< RealModel, TissueClass >, and tissue_model::TissueModel< RealModel, TissueClass >.
void Model::drawWithNames | ( | Viewer * | viewer | ) | [inline, virtual] |
Draw with object naming.
Used for object selection. The name is to be setup using glPushName(int) / glPopName()
Definition at line 234 of file model.h.
References drawWithNames().
Referenced by drawWithNames().
00234 { this->drawWithNames(); }
void Model::fileRegister | ( | std::string | ) | [signal] |
Signal emitted anytime the user is registering a file to the file checker.
Referenced by Model(), and registerFile().
void Model::fileUnregister | ( | std::string | ) | [signal] |
Signal emitted anytime the user is unregistering a file .
..
Referenced by Model(), and unregisterFile().
virtual void Model::finalizeDraw | ( | ) | [inline, virtual] |
void Model::finalizeDraw | ( | Viewer * | viewer | ) | [inline, virtual] |
This function is called if the OpenGL environment is destroyed or if the model is detroyed.
Definition at line 219 of file model.h.
References finalizeDraw().
Referenced by finalizeDraw().
00219 { this->finalizeDraw(); }
virtual void Model::finalizePrint | ( | ) | [inline, virtual] |
QString Model::helpString | ( | ) | const [virtual] |
This function is used to setup the help in the help box.
It should typically return a description of the model. Default implementation will read the description.txt file if available.
Definition at line 59 of file model_.cpp.
References QString::append(), QFile::exists(), QFile::open(), and QString::prepend().
00060 { 00061 if(QFile::exists("description.html")) 00062 { 00063 QFile f("description.html"); 00064 if(f.open(QIODevice::ReadOnly | QIODevice::Text)) 00065 { 00066 QTextStream fss(&f); 00067 QString content = f.readAll(); 00068 return content; 00069 } 00070 } 00071 else if(QFile::exists("description.txt")) 00072 { 00073 QFile f("description.txt"); 00074 if(f.open(QIODevice::ReadOnly | QIODevice::Text)) 00075 { 00076 QTextStream fss(&f); 00077 QString content = f.readAll(); 00078 content.prepend("<pre>"); 00079 content.append("</pre>"); 00080 return content; 00081 } 00082 } 00083 return QString("Undocumented VV model"); 00084 }
virtual void Model::initDraw | ( | ) | [inline, virtual] |
Convenience function used if the viewer is not necessary.
Reimplemented in bspline_tissue_model::TissueModel< RealModel, TissueClass >, and tissue_model::TissueModel< RealModel, TissueClass >.
void Model::initDraw | ( | Viewer * | viewer | ) | [inline, virtual] |
This function is called everytime a new OpenGL environment is created, before the first preDraw(Viewer*).
Useful to initialize camera and lights or to gather data about the rendering capabilities. Also used for any initialization requiring a valid OpenGL context.
Definition at line 205 of file model.h.
References initDraw().
Referenced by initDraw().
00205 { this->initDraw(); }
virtual void Model::initPrint | ( | ) | [inline, virtual] |
Insert an action in the context menu.
Definition at line 206 of file model_.cpp.
References QList::indexOf(), QList::insert(), menuActionInserted(), and QList::size().
Referenced by addAction(), and insertActions().
00207 { 00208 int pos = _actions.indexOf(before); 00209 if(pos < 0) 00210 { 00211 pos = _actions.size(); 00212 } 00213 _actions.insert(pos, action); 00214 emit menuActionInserted(before, action); 00215 }
Insert a list of actions in the context menu.
Definition at line 217 of file model_.cpp.
References insertAction(), and QList::size().
Referenced by addActions().
00218 { 00219 for(int i = 0 ; i < actions.size() ; ++i) 00220 { 00221 insertAction(before, actions[i]); 00222 } 00223 }
Signal emitted when the user wants to load a snapshot.
filename | Name of the snapshot. The extension will be used to determine the format. |
void Model::loadingSnapshot | ( | bool | auto_naming, | |
Model * | ||||
) | [signal] |
Signal emitted when the user wants to load a snapshot.
Referenced by loadSnapshot(), and Model().
bool Model::loadSnapshot | ( | const QString & | filename | ) | [slot] |
Load a snapshot.
be careful with the state of the model after this call
Definition at line 252 of file model_.cpp.
References loadingSnapshot().
00253 { 00254 _error = false; 00255 emit loadingSnapshot(filename, this); 00256 return !_error; 00257 }
bool Model::loadSnapshot | ( | ) | [slot] |
Load a snapshot specified by the user of the model.
be careful with the state of the model after this call
Definition at line 245 of file model_.cpp.
References loadingSnapshot().
Referenced by Model().
00246 { 00247 _error = false; 00248 emit loadingSnapshot(false, this); 00249 return !_error; 00250 }
Signal emitted when an action is inserted.
Referenced by insertAction(), and Model().
void Model::menuActionRemoved | ( | QAction * | act | ) | [signal] |
Signal emitted when an action is removed.
Referenced by Model(), and removeAction().
Returns the action representing the menu item text
.
Definition at line 130 of file model_.cpp.
References actions().
Referenced by addMenuItem(), and removeMenuItem().
virtual void Model::modifiedFiles | ( | ) | [inline, virtual] |
void Model::modifiedFiles | ( | const std::set< std::string > & | files | ) | [inline, virtual] |
This function is called anytime one or more registered files are modified.
files | Registered files modified since last call to this function. |
Reimplemented in bspline_tissue_model::TissueModel< RealModel, TissueClass >, and tissue_model::TissueModel< RealModel, TissueClass >.
Definition at line 82 of file model.h.
References modifiedFiles().
Referenced by modifiedFiles().
00083 { this->modifiedFiles(); }
virtual void Model::postDraw | ( | ) | [inline, virtual] |
Convenience function used if the viewer is not necessary.
Reimplemented in bspline_tissue_model::TissueModel< RealModel, TissueClass >, and tissue_model::TissueModel< RealModel, TissueClass >.
void Model::postDraw | ( | Viewer * | viewer | ) | [inline, virtual] |
This function should be redefined to restore the original OpenGL context.
It is called right after the draw(Viewer*) method and should restore the OpenGL context to allow for correct drawing of the decorators (grid, axes, ...)
Definition at line 184 of file model.h.
References postDraw().
Referenced by postDraw().
00184 { this->postDraw(); }
This function is used to resolve a selection event.
pos | 2D position of the user click event | |
viewer | Viewer object on which the selection occured |
It should implement the action associated with a selection. The user can call viewer->selectedName()
to get the id of the selected item. The number returned depend on the number allocated within the drawWithNames() method.
Definition at line 101 of file model_.cpp.
virtual void Model::preDraw | ( | ) | [inline, virtual] |
Convenience function used if the viewer is not necessary.
Reimplemented in bspline_tissue_model::TissueModel< RealModel, TissueClass >, and tissue_model::TissueModel< RealModel, TissueClass >.
void Model::preDraw | ( | Viewer * | viewer | ) | [inline, virtual] |
virtual void Model::print | ( | ) | [inline, virtual] |
void Model::registerFile | ( | std::string | filename | ) | [slot] |
This function registers a file to the file alteration monitor.
Definition at line 49 of file model_.cpp.
References fileRegister().
Referenced by Model(), and bspline_tissue_model::TissueModel< RealModel, TissueClass >::registerFiles().
00050 { 00051 emit fileRegister(filename); 00052 }
void Model::removeAction | ( | QAction * | action | ) |
Remove an action from the context menu.
Definition at line 225 of file model_.cpp.
References menuActionRemoved(), and QList::removeAll().
Referenced by removeMenuItem().
00226 { 00227 if(_actions.removeAll(action)) 00228 emit menuActionRemoved(action); 00229 }
bool Model::removeMenuItem | ( | const QString & | text, | |
const char * | slot | |||
) |
Disconnect a menu item, the receiver is the current model.
Definition at line 183 of file model_.cpp.
References removeMenuItem().
00184 { 00185 return removeMenuItem(text, this, slot); 00186 }
Remove the slot from a menu item, if there are more connection, the item is not deleted.
Definition at line 188 of file model_.cpp.
References QObject::disconnect(), and menuItem().
00189 { 00190 QAction* toremove = menuItem(text); 00191 if(toremove and disconnect(toremove, SIGNAL(triggerred()), receiver, slot)) 00192 return true; 00193 return false; 00194 }
bool Model::removeMenuItem | ( | const QString & | text | ) |
Remove a menu item.
Definition at line 172 of file model_.cpp.
References menuItem(), and removeAction().
Referenced by removeMenuItem().
00173 { 00174 QAction* toremove = menuItem(text); 00175 if(toremove) 00176 { 00177 removeAction(toremove); 00178 return true; 00179 } 00180 return false; 00181 }
virtual void Model::reread | ( | ) | [inline, virtual] |
Reimplement the reread method to allow using the model without a parameter file.
Implements util::FileObject.
void Model::restart | ( | ) | [virtual] |
This function requests a restart of the simulation.
Definition at line 96 of file model_.cpp.
References restartModel().
00097 { 00098 emit restartModel(); 00099 }
void Model::restartModel | ( | ) | [signal] |
void Model::run | ( | ) | [virtual] |
This function requests the model to run.
Definition at line 86 of file model_.cpp.
References runModel().
00087 { 00088 emit runModel(); 00089 }
void Model::runModel | ( | ) | [signal] |
bool Model::saveNextSnapshot | ( | ) | [slot] |
Save the current model as a snapshot on the current recording.
If the model is not being recorded, this method has no effect
Definition at line 238 of file model_.cpp.
References savingNextSnapshot().
00239 { 00240 _error = false; 00241 emit savingNextSnapshot(true, this); 00242 return !_error; 00243 }
bool Model::saveSnapshot | ( | const QString & | filename | ) | [slot] |
Save the current model as a snapshot.
Definition at line 231 of file model_.cpp.
References savingSnapshot().
Referenced by Model().
00232 { 00233 _error = false; 00234 emit savingSnapshot(filename, this); 00235 return !_error; 00236 }
void Model::savingNextSnapshot | ( | bool | , | |
Model * | ||||
) | [signal] |
Signal emitted when the user want to save the next snapshot.
Useful to save intermediate state ...
Referenced by Model(), and saveNextSnapshot().
void Model::savingScreenshot | ( | const QString & | filename, | |
bool | overwrite | |||
) | [signal] |
Signal emitted when the user request the saving of a snapshot.
Referenced by Model(), and screenshot().
Signal emitted when the user wants to save a snapshot.
filename | Name of the snapshot. The extension will be used to determine the format. |
Referenced by Model(), and saveSnapshot().
void Model::screenshot | ( | const QString & | fileName, | |
bool | overwrite = false | |||
) | [slot] |
Save a screenshot.
Definition at line 259 of file model_.cpp.
References savingScreenshot().
Referenced by Model().
00260 { 00261 emit savingScreenshot(filename, overwrite); 00262 }
virtual bool Model::serialize | ( | storage::VVEStorage & | ) | [inline, virtual] |
Reimplement this method to load/save the current state of the model.
store | Object to store the state in the model in. |
Reimplemented in cell_system::CellSystem< Complex, MyModel >, and cell_system::CellSystem< TissueClass, RealModel >.
Definition at line 120 of file model.h.
Referenced by storage::VVEStorage::field(), storage::VVEStorage_XMLReader::serialize(), storage::VVEStorage_XMLWriter::serialize(), storage::VVEStorage_BINReader::serialize(), storage::old::VVEStorage_BINReader::serialize(), and storage::VVEStorage_BINWriter::serialize().
void Model::setAnimationPeriod | ( | int | ms | ) | [slot] |
Set the animation period, i.e.
the period in between two calls to the step() method, in ms.
Definition at line 110 of file model_.cpp.
References QObject::parent().
void Model::setExitCode | ( | int | code | ) | [slot] |
Set the exit code.
Useful for testing purposes.
Definition at line 105 of file model_.cpp.
References changedExitCode().
00106 { 00107 emit changedExitCode(code); 00108 }
void Model::setStatusMessage | ( | const QString & | msg | ) |
Change the status message.
On the gui, display the message on the status bar. On batch mode, prints the message to the console.
Definition at line 264 of file model_.cpp.
References QObject::parent().
00265 { 00266 bool success = parent()->setProperty("statusMessage", msg); 00267 assert(success); 00268 }
QString Model::statusMessage | ( | ) | const |
Get the current status message.
Definition at line 270 of file model_.cpp.
References QObject::parent().
virtual void Model::step | ( | ) | [pure virtual] |
A step correspond to all the computations between two drawings.
It is the only strictly required method.
Implemented in cell_system::CellSystem< Complex, MyModel >, bspline_tissue_model::TissueModel< RealModel, TissueClass >, tissue_model::TissueModel< RealModel, TissueClass >, and cell_system::CellSystem< TissueClass, RealModel >.
void Model::stop | ( | ) | [virtual] |
This function requests the end of the simulation.
Definition at line 91 of file model_.cpp.
References stopModel().
00092 { 00093 emit stopModel(); 00094 }
void Model::stopModel | ( | ) | [signal] |
void Model::unregisterFile | ( | std::string | filename | ) | [slot] |
This function unregisters a file from the file alteration monitor.
Definition at line 54 of file model_.cpp.
References fileUnregister().
Referenced by Model().
00055 { 00056 emit fileUnregister(filename); 00057 }
virtual QString Model::version | ( | ) | const [inline, virtual] |
The default implementation returns an empty string
Reimplemented in cell_system::CellSystem< Complex, MyModel >, and cell_system::CellSystem< TissueClass, RealModel >.
Definition at line 137 of file model.h.
Referenced by storage::VVEStorage_XMLWriter::serialize(), and storage::VVEStorage_BINWriter::serialize().
virtual int Model::versionNumber | ( | const QString & | ) | [inline, virtual] |
The default implementation always return 0.
The number has no meaning outside the model.
Reimplemented in cell_system::CellSystem< Complex, MyModel >, and cell_system::CellSystem< TissueClass, RealModel >.
Definition at line 130 of file model.h.
Referenced by storage::VVEStorage_XMLReader::serialize(), storage::VVEStorage_XMLWriter::serialize(), storage::VVEStorage_BINReader::serialize(), storage::old::VVEStorage_BINReader::serialize(), and storage::VVEStorage_BINWriter::serialize().