COPASI API
4.40.278
|
#include <CExpressionGenerator.h>
Classes | |
struct | sOperation |
Public Types | |
enum class | Operation { Sum , SumOfSquares , SumOfAbsolutes , Product , __SIZE } |
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 CDataObject * | getDataObject () const override |
virtual const std::string & | getKey () const |
virtual const CObjectInterface * | getObject (const CCommonName &cn) const override |
CDataContainer * | getObjectAncestor (const std::string &type) const |
CDataModel * | getObjectDataModel () const |
virtual std::string | getObjectDisplayName () const override |
const CObjectInterface * | getObjectFromCN (const CCommonName &cn) const |
const std::string & | getObjectName () const |
CDataContainer * | getObjectParent () const |
const std::string & | getObjectType () const |
virtual const CObjectInterface::ObjectSet & | getPrerequisites () const override |
virtual const std::string | getUnits () const |
virtual const CValidity & | getValidity () const override |
virtual const CDataObject * | getValueObject () 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 CUndoObjectInterface * | insert (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 CDataObject * | fromData (const CData &data, CUndoObjectInterface *pParent) |
static void | sanitizeObjectName (std::string &name) |
Static Public Member Functions inherited from CObjectInterface | |
static const CDataObject * | DataObject (const CObjectInterface *pInterface) |
static CObjectInterface * | GetObjectFromCN (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, Operation > | OperationNames |
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, Operation > | OperationParts |
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 |
|
strong |
CExpressionGenerator::CExpressionGenerator | ( | const std::string & | type, |
const std::string & | selection, | ||
const std::string & | operation | ||
) |
|
staticprivate |
References CDataObject::getObjectDisplayName().
Referenced by generate().
|
static |
References CExpressionGenerator::sOperation::entryEnd, CExpressionGenerator::sOperation::entryStart, escapeDisplayName(), CDataObject::getCN(), CExpressionGenerator::sOperation::join, OperationParts, CExpressionGenerator::sOperation::surroundEnd, and CExpressionGenerator::sOperation::surroundStart.
Referenced by generateExpressionFor().
std::string CExpressionGenerator::generateExpressionFor | ( | const CModel * | pModel, |
bool | useCn = false |
||
) | const |
References generate(), getObjectsForSelection(), and mOperation.
std::vector< const CDataObject * > CExpressionGenerator::getObjectsForSelection | ( | const CModel * | pModel | ) | const |
References CModel::getCompartments(), CModel::getMetabolites(), CModel::getModelValues(), CModel::getReactions(), mSelection, and mType.
Referenced by generateExpressionFor().
|
static |
References CEnumAnnotation< Type, Enum >::annotations(), and OperationNames.
|
static |
References mSupportedTypes.
void CExpressionGenerator::setOperation | ( | const std::string & | operation | ) |
References mOperation, OperationNames, and CEnumAnnotation< Type, Enum >::toEnum().
void CExpressionGenerator::setSelection | ( | const std::string & | selection | ) |
References mSelection.
void CExpressionGenerator::setType | ( | const std::string & | type | ) |
References mType.
|
private |
Referenced by generateExpressionFor(), and setOperation().
|
private |
Referenced by getObjectsForSelection(), and setSelection().
|
staticprivate |
Referenced by isTypeSupported().
|
private |
Referenced by getObjectsForSelection(), and setType().
|
static |
Referenced by getSupportedOperations(), and setOperation().
|
staticprivate |
Referenced by generate().