COPASI API  4.16.103
CArrayElementReference.h
Go to the documentation of this file.
1 // Begin CVS Header
2 // $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/report/CArrayElementReference.h,v $
3 // $Revision: 1.5 $
4 // $Name: $
5 // $Author: shoops $
6 // $Date: 2009/01/07 19:04:15 $
7 // End CVS Header
8 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
9 // Properties, Inc., EML Research, gGmbH, University of Heidelberg,
10 // and The University of Manchester.
11 // All rights reserved.
12 
13 #ifndef COPASI_CArrayElementReference
14 #define COPASI_CArrayElementReference
15 
16 #include "CCopasiArray.h"
17 #include "CCopasiObject.h"
18 
19 #include "CCopasiObjectName.h"
20 
21 /**
22  * Class CArrayElementReference
23  *
24  * This class is used to make an element of an array accessible as
25  * a CCopasiObject. Usually an object from this class will be a child
26  * of a CArrayAnnotation and will reference a single element of the
27  * array that the CArrayAnnotation points to.
28  */
30  {
31 
32  private:
33  //CCopasiAbstractArray::data_type * mpReference;
34 
35  /**
36  * this contains the index in string format, e.g. "[2][7]"
37  */
39 
40  private:
41  /**
42  * make the default constructor unaccessible
43  */
45 
46  /**
47  * make the copy constructor unaccessible
48  */
50 
51  /**
52  * this method does nothing at the moment!
53  */
55 
56  public:
57  /**
58  * create an element reference with a given index. The index
59  * is passed as a string, e.g. "[3][2]"
60  * The object name will be the index string, the type is "ElementReference"
61  * pParent may not be NULL.
62  */
63  CArrayElementReference(const std::string & index,
64  const CCopasiContainer * pParent);
65 
67 
68  /**
69  * returns a pointer to the numerical values of the array element
70  * this will be a *C_FLOAT64 for this class.
71  */
72  virtual void * getValuePointer() const;
73 
74  virtual const CCopasiObject * getValueObject() const {return this;}
75 
76  /**
77  *
78  */
79  virtual void print(std::ostream * ostream) const;
80 
81  /**
82  * generate a display name.
83  */
84  virtual std::string getObjectDisplayName(bool regular = true, bool richtext = false) const;
85 
86  /**
87  *
88  */
89  virtual CCopasiObjectName getCN() const;
90  };
91 
92 #endif
virtual void print(std::ostream *ostream) const
virtual CCopasiObjectName getCN() const
void updateMethod(const CCopasiAbstractArray::data_type &value)
virtual void * getValuePointer() const
virtual const CCopasiObject * getValueObject() const
virtual std::string getObjectDisplayName(bool regular=true, bool richtext=false) const