COPASI API  4.40.278
CExpressionGenerator Class Reference

#include <CExpressionGenerator.h>

Inheritance diagram for CExpressionGenerator:


struct  sOperation

Public Types

enum class  Operation {
  Sum , SumOfSquares , SumOfAbsolutes , Product ,
- Public Types inherited from CDataObject
typedef std::set< const CDataObject * > DataObjectSet
enum  Flag {
  Container , Vector , Matrix , NameVector ,
  Reference , ValueBool , ValueInt , ValueInt64 ,
  ValueDbl , NonUniqueName , StaticString , ValueString ,
  Separator , DisplayName , ModelEntity , Array ,
  DataModel , Root , Gui , __SIZE
- Public Types inherited from CObjectInterface
typedef std::vector< const CDataContainer * > ContainerList
typedef std::set< const CObjectInterface * > ObjectSet

Public Member Functions

 CExpressionGenerator (const std::string &type, const std::string &selection, const std::string &operation)
std::string generateExpressionFor (const CModel *pModel, bool useCn=false) const
std::vector< const CDataObject * > getObjectsForSelection (const CModel *pModel) const
void setOperation (const std::string &operation)
void setSelection (const std::string &selection)
void setType (const std::string &type)
- Public Member Functions inherited from CDataObject
void addIssue (const CIssue &issue)
void addReference (const CDataContainer *pReference)
virtual bool applyData (const CData &data, CUndoData::CChangeSet &changes) override
virtual void calculateValue () override
 CDataObject (const CDataObject &src, const CDataContainer *pParent=NULL)
virtual void createUndoData (CUndoData &undoData, const CUndoData::Type &type, const CData &oldData=CData(), const CCore::Framework &framework=CCore::Framework::ParticleNumbers) const override
virtual void destruct () override
virtual CCommonName getCN () const override
virtual const CDataObjectgetDataObject () const override
virtual const std::string & getKey () const
virtual const CObjectInterfacegetObject (const CCommonName &cn) const override
CDataContainergetObjectAncestor (const std::string &type) const
CDataModelgetObjectDataModel () const
virtual std::string getObjectDisplayName () const override
const CObjectInterfacegetObjectFromCN (const CCommonName &cn) const
const std::string & getObjectName () const
CDataContainergetObjectParent () const
const std::string & getObjectType () const
virtual const CObjectInterface::ObjectSetgetPrerequisites () const override
virtual const std::string getUnits () const
virtual const CValiditygetValidity () const override
virtual const CDataObjectgetValueObject () const
virtual void * getValuePointer () const override
bool hasFlag (const Flag &flag) const
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CCore::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const override
bool prerequisitsContains (const DataObjectSet &objects) const
virtual void print (std::ostream *ostream) const override
void removeIssue (const CIssue &issue)
void removeReference (const CDataContainer *pReference)
bool setObjectName (const std::string &name)
virtual bool setObjectParent (const CDataContainer *pParent)
virtual CData toData () const override
void validityChanged (const CValidity &changedValidity) override
void validityRemoved (const CValidity &changedValidity)
virtual ~CDataObject ()
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 CObjectInterface (const CObjectInterface &src)
virtual ~CObjectInterface ()
- Public Member Functions inherited from CUndoObjectInterface
 CUndoObjectInterface ()
 CUndoObjectInterface (const CUndoObjectInterface &src)
bool generateUuid ()
const xg::Guid & getUuid () const
virtual CUndoObjectInterfaceinsert (const CData &data)
bool setUuid (const std::string &uuid)
bool setUuid (const xg::Guid &uuid)
virtual void updateIndex (const size_t &index, const CUndoObjectInterface *pUndoObject)
virtual ~CUndoObjectInterface ()

Static Public Member Functions

static std::string generate (Operation operation, const std::vector< const CDataObject * > &objects, bool useCn=false)
static std::vector< std::string > getSupportedOperations ()
static bool isTypeSupported (const std::string &type)
- Static Public Member Functions inherited from CDataObject
static CDataObjectfromData (const CData &data, CUndoObjectInterface *pParent)
static void sanitizeObjectName (std::string &name)
- Static Public Member Functions inherited from CObjectInterface
static const CDataObjectDataObject (const CObjectInterface *pInterface)
static CObjectInterfaceGetObjectFromCN (const ContainerList &listOfContainer, const CCommonName &objName)
- Static Public Member Functions inherited from CUndoObjectInterface
template<class CType >
static CType * fromData (const CData &, CUndoObjectInterface *)

Static Public Attributes

static const CEnumAnnotation< std::string, OperationOperationNames

Static Private Member Functions

static std::string escapeDisplayName (const CDataObject *pObject)

Private Attributes

Operation mOperation
std::string mSelection
std::string mType

Static Private Attributes

static std::vector< std::string > mSupportedTypes
static const CEnumAnnotation< sOperation, OperationOperationParts

Additional Inherited Members

- Protected Member Functions inherited from CDataObject
 CDataObject ()
 CDataObject (const std::string &name, const CDataContainer *pParent=static_cast< CDataContainer * >((void *) 0), const std::string &type="CN", const CFlags< Flag > &flag=CFlags< Flag >::None)
- Protected Attributes inherited from CDataObject
ObjectSet mPrerequisits
std::set< CDataContainer * > mReferences
- Protected Attributes inherited from CObjectInterface
CValidity mValidity

Member Enumeration Documentation

◆ Operation


Constructor & Destructor Documentation

◆ CExpressionGenerator()

CExpressionGenerator::CExpressionGenerator ( const std::string &  type,
const std::string &  selection,
const std::string &  operation 

Member Function Documentation

◆ escapeDisplayName()

std::string CExpressionGenerator::escapeDisplayName ( const CDataObject pObject)

References CDataObject::getObjectDisplayName().

Referenced by generate().

◆ generate()

◆ generateExpressionFor()

std::string CExpressionGenerator::generateExpressionFor ( const CModel pModel,
bool  useCn = false 
) const

◆ getObjectsForSelection()

std::vector< const CDataObject * > CExpressionGenerator::getObjectsForSelection ( const CModel pModel) const

◆ getSupportedOperations()

std::vector< std::string > CExpressionGenerator::getSupportedOperations ( )

◆ isTypeSupported()

bool CExpressionGenerator::isTypeSupported ( const std::string &  type)

References mSupportedTypes.

◆ setOperation()

void CExpressionGenerator::setOperation ( const std::string &  operation)

◆ setSelection()

void CExpressionGenerator::setSelection ( const std::string &  selection)

References mSelection.

◆ setType()

void CExpressionGenerator::setType ( const std::string &  type)

References mType.

Member Data Documentation

◆ mOperation

Operation CExpressionGenerator::mOperation

◆ mSelection

std::string CExpressionGenerator::mSelection

◆ mSupportedTypes

std::vector< std::string > CExpressionGenerator::mSupportedTypes
Initial value:
"Global Quantities",

Referenced by isTypeSupported().

◆ mType

std::string CExpressionGenerator::mType

Referenced by getObjectsForSelection(), and setType().

◆ OperationNames

const CEnumAnnotation< std::string, CExpressionGenerator::Operation > CExpressionGenerator::OperationNames

◆ OperationParts

const CEnumAnnotation< CExpressionGenerator::sOperation, CExpressionGenerator::Operation > CExpressionGenerator::OperationParts

Referenced by generate().

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