COPASI API  4.16.103
Public Member Functions | Private Attributes | Friends | List of all members
CDataEntity Class Reference

#include <CDataEntity.h>

Collaboration diagram for CDataEntity:
Collaboration graph
[legend]

Public Member Functions

 CDataEntity ()
 
 CDataEntity (C_FLOAT64 t)
 
 CDataEntity (const CDataEntity &src)
 
size_t getNumberOfElements ()
 
C_FLOAT64 getOrigValueForSpecies (std::string nodeKey)
 
C_FLOAT64 getTime ()
 
C_FLOAT64 getValueForSpecies (std::string nodeKey)
 
void putOrigValueForSpecies (std::string nodeKey, C_FLOAT64 value)
 
void putValueForSpecies (std::string nodeKey, C_FLOAT64 value)
 

Private Attributes

std::map< std::string, C_FLOAT64mOrigValueMap
 
std::map< std::string, C_FLOAT64mSpeciesValueMap
 
C_FLOAT64 mTime
 

Friends

std::ostream & operator<< (std::ostream &os, const CDataEntity &gn)
 

Detailed Description

Definition at line 31 of file CDataEntity.h.

Constructor & Destructor Documentation

CDataEntity::CDataEntity ( )

Definition at line 27 of file CDataEntity.cpp.

References mTime.

28 {
29  mTime = 0.0;
30 }
C_FLOAT64 mTime
Definition: CDataEntity.h:34
CDataEntity::CDataEntity ( C_FLOAT64  t)

Definition at line 32 of file CDataEntity.cpp.

References mTime.

33 {
34  mTime = t;
35 }
C_FLOAT64 mTime
Definition: CDataEntity.h:34
CDataEntity::CDataEntity ( const CDataEntity src)

Definition at line 37 of file CDataEntity.cpp.

37  :
38  mTime(src.mTime),
41 {}
std::map< std::string, C_FLOAT64 > mOrigValueMap
Definition: CDataEntity.h:36
std::map< std::string, C_FLOAT64 > mSpeciesValueMap
Definition: CDataEntity.h:35
C_FLOAT64 mTime
Definition: CDataEntity.h:34

Member Function Documentation

size_t CDataEntity::getNumberOfElements ( )
inline

Definition at line 48 of file CDataEntity.h.

References mSpeciesValueMap.

Referenced by CQLayoutMainWindow::insertValueTable().

48 {return mSpeciesValueMap.size();}
std::map< std::string, C_FLOAT64 > mSpeciesValueMap
Definition: CDataEntity.h:35
C_FLOAT64 CDataEntity::getOrigValueForSpecies ( std::string  nodeKey)

Definition at line 70 of file CDataEntity.cpp.

References max, and mOrigValueMap.

Referenced by CQLayoutMainWindow::insertValueTable(), CQGLNetworkPainter::rescaleDataSets(), CQGLNetworkPainter::rescaleDataSetsWithNewMinMax(), CQGLNetworkPainter::rescaleNode(), CQGLNetworkPainter::showStep(), and CQLayoutMainWindow::updateValueTable().

71 {
72  std::map<std::string, C_FLOAT64>::iterator it;
73  it = mOrigValueMap.find(nodeKey);
74 
75  if (it != mOrigValueMap.end())
76  return (*it).second;
77  else
79 }
std::map< std::string, C_FLOAT64 > mOrigValueMap
Definition: CDataEntity.h:36
#define max(a, b)
Definition: f2c.h:176
C_FLOAT64 CDataEntity::getTime ( )
inline

Definition at line 49 of file CDataEntity.h.

References mTime.

49 {return mTime;}
C_FLOAT64 mTime
Definition: CDataEntity.h:34
C_FLOAT64 CDataEntity::getValueForSpecies ( std::string  nodeKey)

Definition at line 58 of file CDataEntity.cpp.

References max, and mSpeciesValueMap.

Referenced by CQGLNetworkPainter::rescaleDataSets(), CQGLNetworkPainter::rescaleDataSetsWithNewMinMax(), and CQGLNetworkPainter::rescaleNode().

59 {
60  std::map<std::string, C_FLOAT64>::iterator it;
61 
62  it = mSpeciesValueMap.find(nodeKey);
63 
64  if (it != mSpeciesValueMap.end())
65  return (*it).second;
66  else
68 }
std::map< std::string, C_FLOAT64 > mSpeciesValueMap
Definition: CDataEntity.h:35
#define max(a, b)
Definition: f2c.h:176
void CDataEntity::putOrigValueForSpecies ( std::string  nodeKey,
C_FLOAT64  value 
)

Definition at line 50 of file CDataEntity.cpp.

References mOrigValueMap.

Referenced by CQGLNetworkPainter::createDataSets().

51 {
52  mOrigValueMap.erase(nodeKey); // delete old value
53  mOrigValueMap.insert(std::pair<std::string, C_FLOAT64>
54  (nodeKey, value));
55 }
std::map< std::string, C_FLOAT64 > mOrigValueMap
Definition: CDataEntity.h:36
void CDataEntity::putValueForSpecies ( std::string  nodeKey,
C_FLOAT64  value 
)

Definition at line 43 of file CDataEntity.cpp.

References mSpeciesValueMap.

Referenced by CQGLNetworkPainter::createDataSets(), CQGLNetworkPainter::rescaleDataSets(), CQGLNetworkPainter::rescaleDataSetsWithNewMinMax(), CQGLNetworkPainter::rescaleNode(), CQGLNetworkPainter::setConstantNodeSize(), and CQGLNetworkPainter::setConstantNodeSizeForAllSteps().

44 {
45  mSpeciesValueMap.erase(nodeKey); // delete old value
46  mSpeciesValueMap.insert(std::pair<std::string, C_FLOAT64>
47  (nodeKey, value));
48 }
std::map< std::string, C_FLOAT64 > mSpeciesValueMap
Definition: CDataEntity.h:35

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const CDataEntity gn 
)
friend

Definition at line 81 of file CDataEntity.cpp.

82 {
83  os << "time: " << de.mTime << " size: " << std::endl;
84  std::map<std::string, C_FLOAT64>::const_iterator it1;
85  std::map<std::string, C_FLOAT64>::const_iterator it2;
86 
87  for (it1 = de.mSpeciesValueMap.begin() ; it1 != de.mSpeciesValueMap.end() ; it1++)
88  {
89  it2 = de.mOrigValueMap.find((*it1).first);
90 
91  if (it2 != de.mOrigValueMap.end())
92  os << (*it1).first << " : " << (*it1).second << " orig: " << (*it2).second << std::endl;
93  else
94  os << (*it1).first << " : " << (*it1).second << " orig: not found" << std::endl;
95  }
96 
97  //for (int i=0;i<gn.mConnectedCurveIndices.size();i++)
98  // os << gn.mConnectedCurveIndices[i] << std::endl;;
99 
100  return os;
101 }

Member Data Documentation

std::map<std::string, C_FLOAT64> CDataEntity::mOrigValueMap
private

Definition at line 36 of file CDataEntity.h.

Referenced by getOrigValueForSpecies(), operator<<(), and putOrigValueForSpecies().

std::map<std::string, C_FLOAT64> CDataEntity::mSpeciesValueMap
private
C_FLOAT64 CDataEntity::mTime
private

Definition at line 34 of file CDataEntity.h.

Referenced by CDataEntity(), getTime(), and operator<<().


The documentation for this class was generated from the following files: