COPASI API  4.40.278
CDataValue Class Reference

#include <CDataValue.h>

Public Types

enum  Type {
  DOUBLE = 0 , INT , UINT , BOOL ,
  STRING , DATA , DATA_VALUES , DATA_VECTOR ,
  VOID_POINTER , INVALID , __SIZE
}
 

Public Member Functions

 CDataValue (const bool &value)
 
 CDataValue (const C_FLOAT64 &value)
 
 CDataValue (const C_INT32 &value)
 
 CDataValue (const CData &value)
 
 CDataValue (const CDataValue &src)
 
 CDataValue (const char *value)
 
 CDataValue (const std::string &value)
 
 CDataValue (const std::vector< CData > &value)
 
 CDataValue (const std::vector< CDataValue > &value)
 
 CDataValue (const Type &type=INVALID)
 
 CDataValue (const unsigned C_INT32 &value)
 
 CDataValue (const void *pVoidPointer)
 
const TypegetType () const
 
bool operator!= (const CDataValue &rhs) const
 
CDataValueoperator= (const bool &value)
 
CDataValueoperator= (const C_FLOAT64 &value)
 
CDataValueoperator= (const C_INT32 &value)
 
CDataValueoperator= (const CData &value)
 
CDataValueoperator= (const CDataValue &rhs)
 
CDataValueoperator= (const std::string &value)
 
CDataValueoperator= (const std::vector< CData > &value)
 
CDataValueoperator= (const std::vector< CDataValue > &value)
 
CDataValueoperator= (const unsigned C_INT32 &value)
 
CDataValueoperator= (const void *pVoidPointer)
 
bool operator== (const CDataValue &rhs) const
 
const void * raw () const
 
const bool & toBool () const
 
const CDatatoData () const
 
const std::vector< CDataValue > & toDataValues () const
 
const std::vector< CData > & toDataVector () const
 
const C_FLOAT64toDouble () const
 
const C_INT32toInt () const
 
size_t toSizeT () const
 
const std::string & toString () const
 
const unsigned C_INT32toUint () const
 
const void * toVoidPointer () const
 
 ~CDataValue ()
 

Static Public Attributes

static const CEnumAnnotation< std::string, TypeTypeName
 

Private Member Functions

void allocateData (const Type &type)
 
void assignData (const bool &value)
 
void assignData (const C_FLOAT64 &value)
 
void assignData (const C_INT32 &value)
 
void assignData (const CData &value)
 
void assignData (const CDataValue &rhs)
 
void assignData (const std::string &value)
 
void assignData (const std::vector< CData > &value)
 
void assignData (const std::vector< CDataValue > &value)
 
void assignData (const unsigned C_INT32 &value)
 
void assignData (const void *pVoidPointer)
 
void deleteData ()
 

Private Attributes

void * mpData
 
Type mType
 

Friends

std::ostream & operator<< (std::ostream &os, const CDataValue &o)
 
std::istream & operator>> (std::istream &is, CDataValue &i)
 

Member Enumeration Documentation

◆ Type

Enumerator
DOUBLE 
INT 
UINT 
BOOL 
STRING 
DATA 
DATA_VALUES 
DATA_VECTOR 
VOID_POINTER 
INVALID 
__SIZE 

Constructor & Destructor Documentation

◆ CDataValue() [1/12]

CDataValue::CDataValue ( const Type type = INVALID)

References allocateData().

◆ CDataValue() [2/12]

CDataValue::CDataValue ( const CDataValue src)

References assignData(), and mType.

◆ CDataValue() [3/12]

CDataValue::CDataValue ( const C_FLOAT64 value)

References assignData().

◆ CDataValue() [4/12]

CDataValue::CDataValue ( const C_INT32 value)

References assignData().

◆ CDataValue() [5/12]

CDataValue::CDataValue ( const unsigned C_INT32 value)

References assignData().

◆ CDataValue() [6/12]

CDataValue::CDataValue ( const bool &  value)

References assignData().

◆ CDataValue() [7/12]

CDataValue::CDataValue ( const std::string &  value)

References assignData().

◆ CDataValue() [8/12]

CDataValue::CDataValue ( const char *  value)

References assignData().

◆ CDataValue() [9/12]

CDataValue::CDataValue ( const CData value)

References assignData().

◆ CDataValue() [10/12]

CDataValue::CDataValue ( const std::vector< CDataValue > &  value)

References assignData().

◆ CDataValue() [11/12]

CDataValue::CDataValue ( const std::vector< CData > &  value)

References assignData().

◆ CDataValue() [12/12]

CDataValue::CDataValue ( const void *  pVoidPointer)

References assignData().

◆ ~CDataValue()

CDataValue::~CDataValue ( )

References deleteData().

Member Function Documentation

◆ allocateData()

void CDataValue::allocateData ( const Type type)
private

◆ assignData() [1/10]

void CDataValue::assignData ( const bool &  value)
private

References allocateData(), BOOL, and mpData.

◆ assignData() [2/10]

void CDataValue::assignData ( const C_FLOAT64 value)
private

References allocateData(), C_FLOAT64, DOUBLE, and mpData.

◆ assignData() [3/10]

void CDataValue::assignData ( const C_INT32 value)
private

References allocateData(), C_INT32, INT, and mpData.

◆ assignData() [4/10]

void CDataValue::assignData ( const CData value)
private

References allocateData(), DATA, and mpData.

◆ assignData() [5/10]

void CDataValue::assignData ( const CDataValue rhs)
private

◆ assignData() [6/10]

void CDataValue::assignData ( const std::string &  value)
private

References allocateData(), mpData, and STRING.

◆ assignData() [7/10]

void CDataValue::assignData ( const std::vector< CData > &  value)
private

References allocateData(), DATA_VECTOR, and mpData.

◆ assignData() [8/10]

void CDataValue::assignData ( const std::vector< CDataValue > &  value)
private

References allocateData(), DATA_VALUES, and mpData.

◆ assignData() [9/10]

void CDataValue::assignData ( const unsigned C_INT32 value)
private

References allocateData(), C_INT32, mpData, and UINT.

◆ assignData() [10/10]

void CDataValue::assignData ( const void *  pVoidPointer)
private

References allocateData(), mpData, and VOID_POINTER.

◆ deleteData()

void CDataValue::deleteData ( )
private

◆ getType()

const CDataValue::Type & CDataValue::getType ( ) const

◆ operator!=()

◆ operator=() [1/10]

CDataValue & CDataValue::operator= ( const bool &  value)

References assignData().

◆ operator=() [2/10]

CDataValue & CDataValue::operator= ( const C_FLOAT64 value)

References assignData().

◆ operator=() [3/10]

CDataValue & CDataValue::operator= ( const C_INT32 value)

References assignData().

◆ operator=() [4/10]

CDataValue & CDataValue::operator= ( const CData value)

References assignData().

◆ operator=() [5/10]

CDataValue & CDataValue::operator= ( const CDataValue rhs)

References assignData().

◆ operator=() [6/10]

CDataValue & CDataValue::operator= ( const std::string &  value)

References assignData().

◆ operator=() [7/10]

CDataValue & CDataValue::operator= ( const std::vector< CData > &  value)

References assignData().

◆ operator=() [8/10]

CDataValue & CDataValue::operator= ( const std::vector< CDataValue > &  value)

References assignData().

◆ operator=() [9/10]

CDataValue & CDataValue::operator= ( const unsigned C_INT32 value)

References assignData().

◆ operator=() [10/10]

CDataValue & CDataValue::operator= ( const void *  pVoidPointer)

References assignData().

◆ operator==()

◆ raw()

const void * CDataValue::raw ( ) const

◆ toBool()

◆ toData()

◆ toDataValues()

const std::vector< CDataValue > & CDataValue::toDataValues ( ) const

◆ toDataVector()

◆ toDouble()

◆ toInt()

const C_INT32 & CDataValue::toInt ( ) const

References C_INT32, INT, mpData, and mType.

Referenced by operator!=(), and operator==().

◆ toSizeT()

◆ toString()

const std::string & CDataValue::toString ( ) const

References mpData, mType, and STRING.

Referenced by CFunctionParameter::applyData(), CBiologicalDescription::applyData(), CCreator::applyData(), CMIRIAMInfo::applyData(), CModification::applyData(), CReference::applyData(), CAnnotation::applyData(), CCompartment::applyData(), CEventAssignment::applyData(), CEvent::applyData(), CModel::applyData(), CModelParameter::applyData(), CModelValue::applyData(), CReaction::applyData(), CReportDefinition::applyData(), CCopasiTask::applyData(), CUnitDefinition::applyData(), CDataObject::applyData(), CModelEntity::applyData(), CCopasiParameter::applyData(), CUndoData::change(), CCopasiTask::createUndoData(), CCommonName::fromData(), CDataModel::fromData(), CArrayElementReference::fromData(), CDataContainer::fromData(), CDataObject::fromData(), CEvaluationTree::fromData(), CFunctionParameter::fromData(), CLayout::fromData(), CLMetabGlyph::fromData(), CLCompartmentGlyph::fromData(), CLTextGlyph::fromData(), CLGradientBase::fromData(), CLGraphicalObject::fromData(), CLReferenceGlyph::fromData(), CLMetabReferenceGlyph::fromData(), CLGeneralGlyph::fromData(), CLReactionGlyph::fromData(), CCreator::fromData(), CModification::fromData(), CReference::fromData(), CChemEqElement::fromData(), CCompartment::fromData(), CEventAssignment::fromData(), CEvent::fromData(), CMetab::fromData(), CMetabOld::fromData(), CModel::fromData(), CModelParameter::fromData(), CModelParameterSet::fromData(), CModelValue::fromData(), CMoiety::fromData(), CReaction::fromData(), CFittingPoint::fromData(), CPlotItem::fromData(), CPlotSpecification::fromData(), CReportDefinition::fromData(), CCopasiParameter::fromData(), CCopasiTask::fromData(), CSlider::fromData(), CUnitDefinition::fromData(), CUndoData::getObject(), CUndoData::getObjectDisplayName(), CUndoData::getObjectType(), CUndoData::getParent(), CDataVector< CType >::insert(), CModelParameterSet::insert(), operator!=(), CUndoData::operator<(), and operator==().

◆ toUint()

◆ toVoidPointer()

const void * CDataValue::toVoidPointer ( ) const

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const CDataValue o 
)
friend

◆ operator>>

std::istream& operator>> ( std::istream &  is,
CDataValue i 
)
friend

Member Data Documentation

◆ mpData

◆ mType

◆ TypeName

const CEnumAnnotation< std::string, CDataValue::Type > CDataValue::TypeName
static

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