COPASI API  4.16.103
Macros | Functions
CExperiment.cpp File Reference
#include <fstream>
#include <limits>
#include <cmath>
#include "copasi.h"
#include "CExperiment.h"
#include "CExperimentObjectMap.h"
#include "CFitTask.h"
#include "CopasiDataModel/CCopasiDataModel.h"
#include "report/CCopasiRootContainer.h"
#include "model/CModel.h"
#include "report/CCopasiObjectReference.h"
#include "report/CKeyFactory.h"
#include "utilities/CTableCell.h"
#include "utilities/CSort.h"
#include "utilities/CDirEntry.h"
#include "utilities/utility.h"
#include "commandline/CLocaleString.h"
Include dependency graph for CExperiment.cpp:

Go to the source code of this file.

Macros

#define InvalidIndex   std::numeric_limits< unsigned C_INT32 >::max()
 

Functions

bool operator== (const CExperiment &lhs, const CExperiment &rhs)
 
std::istream & skipLine (std::istream &in)
 

Macro Definition Documentation

#define InvalidIndex   std::numeric_limits< unsigned C_INT32 >::max()

Function Documentation

bool operator== ( const CExperiment lhs,
const CExperiment rhs 
)

Comparison operator

Parameters
constCExperiment & lhs
constCExperiment & rhs
Returns
bool equal

Definition at line 1394 of file CExperiment.cpp.

References CCopasiParameterGroup::getValue(), and CCopasiParameter::Value::pKEY.

1396 {
1397  std::string Key = *lhs.getValue("Key").pKEY;
1398  const_cast<CExperiment *>(&lhs)->setValue("Key", *rhs.getValue("Key").pKEY);
1399 
1400  bool Result =
1401  (*static_cast<const CCopasiParameterGroup *>(&lhs) ==
1402  *static_cast<const CCopasiParameterGroup *>(&rhs));
1403 
1404  const_cast<CExperiment *>(&lhs)->setValue("Key", Key);
1405 
1406  return Result;
1407 }
const CCopasiParameter::Value & getValue(const std::string &name) const
std::istream & skipLine ( std::istream &  in)

Definition at line 1784 of file CExperiment.cpp.

Referenced by CExperiment::guessColumnNumber(), CExperiment::read(), and CExperiment::readColumnNames().

1785 {
1786  char c;
1787 
1788  for (in.get(c); c != 0x0a && c != 0x0d; in.get(c))
1789  {
1790  if (in.fail() || in.eof()) break;
1791  }
1792 
1793  // Eat additional line break characters appearing on DOS and Mac text format;
1794  if ((c == 0x0d && in.peek() == 0x0a) || // DOS
1795  (c == 0x0a && in.peek() == 0x0d)) // Mac
1796  in.ignore(1);
1797 
1798  return in;
1799 }