COPASI API  4.16.103
Expression2PresentationMML.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /fs/turing/cvs/copasi_dev/cvs_admin/addHeader,v $
3 // $Revision: 1.10 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2008/04/11 15:21:36 $
7 // End CVS Header
8 
9 // Copyright (C) 2011 - 2010 by Pedro Mendes, Virginia Tech Intellectual
10 // Properties, Inc., University of Heidelberg, and The University
11 // of Manchester.
12 // All rights reserved.
13 
14 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
15 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
16 // and The University of Manchester.
17 // All rights reserved.
18 
19 // Copyright (C) 2008 - 2009 by Sven Sahle and University of Heidelberg
20 // All rights reserved.
21 
22 #ifndef EXPRESSION2PRESENTATIONMML_H
23 #define EXPRESSION2PRESENTATIONMML_H
24 
25 #include <iostream>
26 class ASTNode;
27 class Model;
28 class Reaction;
29 
31 {
32 public:
33  Expression2PresentationMML(const ASTNode* rootnode);
34 
36 
37  void setModel(const Model* m) {mpModel = m;};
38 
39  /**
40  * set the reaction to be used as the environment for finding local parameters
41  */
42  void setReaction(const Reaction* m) {mpReaction = m;};
43 
44  /**
45  * If this is set to true (the default) the actual name/id of a reaction is added
46  * to the name of local parameter. This may lead to rather long expressions.
47  * In cases where the reaction is identifiable by other means it should be set to false
48  * for more compact expression display.
49  */
51 
52  void writeMathML(std::ostream & out) const;
53 
54 protected:
55  void writeMathML(std::ostream & out, const ASTNode* node, size_t l) const;
56  virtual void writeMathMLFunction(std::ostream & out, const ASTNode* node, size_t l) const;
57  virtual void writeMathMLName(std::ostream & out, const ASTNode* node, size_t l) const;
58  virtual void writeMathMLNumber(std::ostream & out, const ASTNode* node, size_t l) const;
59 
60  const ASTNode* mRootNode;
61  const Model* mpModel;
62  const Reaction* mpReaction;
63 
65 };
66 
67 #endif // EXPRESSION2PRESENTATIONMML_H
virtual void writeMathMLNumber(std::ostream &out, const ASTNode *node, size_t l) const
void writeMathML(std::ostream &out) const
void setReaction(const Reaction *m)
virtual void writeMathMLFunction(std::ostream &out, const ASTNode *node, size_t l) const
Expression2PresentationMML(const ASTNode *rootnode)
virtual void writeMathMLName(std::ostream &out, const ASTNode *node, size_t l) const