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

#include <CGraphNode.h>

Inheritance diagram for CGraphNode:
Inheritance graph
[legend]
Collaboration diagram for CGraphNode:
Collaboration graph
[legend]

Public Member Functions

 CGraphNode (const std::string &name="GraphNode", const CCopasiContainer *pParent=NULL)
 
 CGraphNode (const CLMetabGlyph &src, const CCopasiContainer *pParent=NULL)
 
 CGraphNode (const CGraphNode &src, const CCopasiContainer *pParent=NULL)
 
std::string getLabelText ()
 
std::string getObjectKey ()
 
std::string getOrigNodeKey ()
 
C_FLOAT64 getSize ()
 
virtual void scale (const double &scaleFactor)
 
virtual void scale (const double &scaleFactor, bool changeSizeP)
 
void setLabelText (std::string name)
 
void setObjectKey (std::string key)
 
void setSize (C_FLOAT64 newSize)
 
- Public Member Functions inherited from CLMetabGlyph
 CLMetabGlyph (const std::string &name="MetabGlyph", const CCopasiContainer *pParent=NULL)
 
 CLMetabGlyph (const CLMetabGlyph &src, const CCopasiContainer *pParent=NULL)
 
 CLMetabGlyph (const SpeciesGlyph &sbml, const std::map< std::string, std::string > &modelmap, std::map< std::string, std::string > &layoutmap, const CCopasiContainer *pParent=NULL)
 
virtual CLGraphicalObjectclone () const
 
virtual void exportToSBML (SpeciesGlyph *g, const std::map< const CCopasiObject *, SBase * > &copasimodelmap, std::map< std::string, const SBase * > &sbmlIDs) const
 
CLMetabGlyphoperator= (const CLMetabGlyph &rhs)
 
void print (std::ostream *ostream) const
 
- Public Member Functions inherited from CLGraphicalObject
 CLGraphicalObject (const std::string &name="GraphicalObject", const CCopasiContainer *pParent=NULL)
 
 CLGraphicalObject (const CLGraphicalObject &src, const CCopasiContainer *pParent=NULL)
 
 CLGraphicalObject (const GraphicalObject &sbml, std::map< std::string, std::string > &layoutmap, const CCopasiContainer *pParent=NULL)
 
virtual void exportToSBML (GraphicalObject *sbmlobject, const std::map< const CCopasiObject *, SBase * > &copasimodelmap, std::map< std::string, const SBase * > &sbmlIDs) const
 
const CLBoundingBoxgetBoundingBox () const
 
CLBoundingBoxgetBoundingBox ()
 
const CLDimensionsgetDimensions () const
 
const C_FLOAT64getHeight () const
 
virtual const std::string & getKey () const
 
CCopasiObjectgetModelObject () const
 
std::string getModelObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getModelObjectKey () const
 
std::string getModelObjectName () const
 
const std::string & getObjectRole () const
 
const CLPointgetPosition () const
 
const C_FLOAT64getWidth () const
 
const C_FLOAT64getX () const
 
const C_FLOAT64getY () const
 
bool hasValidModelReference () const
 
virtual void moveBy (const CLPoint &p)
 
CLGraphicalObjectoperator= (const CLGraphicalObject &rhs)
 
void print (std::ostream *ostream) const
 
void setBoundingBox (const CLBoundingBox &bb)
 
void setDimensions (const CLDimensions &d)
 
void setHeight (const C_FLOAT64 &h)
 
void setModelObjectKey (const std::string &k)
 
void setObjectRole (const std::string &role)
 
void setPosition (const CLPoint &p)
 
void setWidth (const C_FLOAT64 &w)
 
void setX (const C_FLOAT64 &x)
 
void setY (const C_FLOAT64 &y)
 
 ~CLGraphicalObject ()
 
- Public Member Functions inherited from CLBase
 CLBase ()
 
 CLBase (const CLBase &b)
 
 CLBase (const SBase &)
 
const std::string & getTag () const
 
bool hasTag () const
 
void setTag (const std::string &tag)
 
virtual ~CLBase ()
 
- Public Member Functions inherited from CCopasiContainer
virtual bool add (CCopasiObject *pObject, const bool &adopt=true)
 
 CCopasiContainer (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=CCopasiObject::Container)
 
 CCopasiContainer (const CCopasiContainer &src, const CCopasiContainer *pParent=NULL)
 
virtual std::string getChildObjectUnits (const CCopasiObject *pObject) const
 
virtual const CObjectInterfacegetObject (const CCopasiObjectName &cn) const
 
virtual const objectMapgetObjects () const
 
virtual std::string getUnits () const
 
virtual const CCopasiObjectgetValueObject () const
 
virtual bool remove (CCopasiObject *pObject)
 
virtual ~CCopasiContainer ()
 
- Public Member Functions inherited from CCopasiObject
void addDirectDependency (const CCopasiObject *pObject)
 
 CCopasiObject (const CCopasiObject &src, const CCopasiContainer *pParent=NULL)
 
void clearDirectDependencies ()
 
void clearRefresh ()
 
bool dependsOn (DataObjectSet candidates, const DataObjectSet &context=DataObjectSet()) const
 
void getAllDependencies (DataObjectSet &dependencies, const DataObjectSet &context) const
 
virtual CCopasiObjectName getCN () const
 
virtual const DataObjectSetgetDirectDependencies (const DataObjectSet &context=DataObjectSet()) const
 
CCopasiContainergetObjectAncestor (const std::string &type) const
 
CCopasiDataModelgetObjectDataModel ()
 
const CCopasiDataModelgetObjectDataModel () const
 
virtual std::string getObjectDisplayName (bool regular=true, bool richtext=false) const
 
const std::string & getObjectName () const
 
CCopasiContainergetObjectParent () const
 
const std::string & getObjectType () const
 
virtual const
CObjectInterface::ObjectSet
getPrerequisites () const
 
virtual RefreshgetRefresh () const
 
UpdateMethodgetUpdateMethod () const
 
virtual voidgetValuePointer () const
 
bool hasCircularDependencies (DataObjectSet &candidates, DataObjectSet &verified, const DataObjectSet &context) const
 
bool hasUpdateMethod () const
 
bool isArray () const
 
bool isContainer () const
 
bool isDataModel () const
 
bool isMatrix () const
 
bool isNameVector () const
 
bool isNonUniqueName () const
 
virtual bool isPrerequisiteForContext (const CObjectInterface *pObject, const CMath::SimulationContextFlag &context, const CObjectInterface::ObjectSet &changedObjects) const
 
bool isReference () const
 
bool isRoot () const
 
bool isSeparator () const
 
bool isStaticString () const
 
bool isValueBool () const
 
bool isValueDbl () const
 
bool isValueInt () const
 
bool isValueInt64 () const
 
bool isValueString () const
 
bool isVector () const
 
virtual bool mustBeDeleted (const DataObjectSet &deletedObjects) const
 
void removeDirectDependency (const CCopasiObject *pObject)
 
void setDirectDependencies (const DataObjectSet &directDependencies)
 
bool setObjectName (const std::string &name)
 
virtual bool setObjectParent (const CCopasiContainer *pParent)
 
void setObjectValue (const C_FLOAT64 &value)
 
void setObjectValue (const C_INT32 &value)
 
void setObjectValue (const bool &value)
 
template<class CType >
void setRefresh (CType *pType, void(CType::*method)(void))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_FLOAT64 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const C_INT32 &))
 
template<class CType >
void setUpdateMethod (CType *pType, void(CType::*method)(const bool &))
 
virtual ~CCopasiObject ()
 
- Public Member Functions inherited from CObjectInterface
 CObjectInterface ()
 
virtual ~CObjectInterface ()
 

Private Member Functions

CLPoint getPointOnRectangle (CLBoundingBox r, CLPoint p)
 

Private Attributes

std::string mLabelText
 
std::string mObjectKey
 
std::string morigNodeKey
 
C_FLOAT64 msize
 

Friends

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

Additional Inherited Members

- Public Types inherited from CCopasiContainer
typedef std::multimap
< std::string, CCopasiObject * > 
objectMap
 
- Public Types inherited from CCopasiObject
typedef std::set< const
CCopasiObject * > 
DataObjectSet
 
typedef std::vector< Refresh * > DataUpdateSequence
 
- Public Types inherited from CObjectInterface
typedef std::set< const
CObjectInterface * > 
ObjectSet
 
typedef std::vector
< CObjectInterface * > 
UpdateSequence
 
- Static Public Member Functions inherited from CCopasiObject
static std::vector< Refresh * > buildUpdateSequence (const DataObjectSet &objects, const DataObjectSet &uptoDateObjects, const DataObjectSet &context=DataObjectSet())
 
static void setRenameHandler (CRenameHandler *rh)
 
- Static Public Attributes inherited from CCopasiContainer
static const std::vector
< CCopasiContainer * > 
EmptyList
 
- Protected Types inherited from CCopasiObject
enum  Flag {
  Container = 0x1, Vector = 0x2, Matrix = 0x4, NameVector = 0x8,
  Reference = 0x10, ValueBool = 0x20, ValueInt = 0x40, ValueInt64 = 0x80,
  ValueDbl = 0x100, NonUniqueName = 0x200, StaticString = 0x400, ValueString = 0x800,
  Separator = 0x1000, ModelEntity = 0x2000, Array = 0x4000, DataModel = 0x8000,
  Root = 0x10000, Gui = 0x20000
}
 
- Protected Member Functions inherited from CCopasiContainer
template<class CType >
CCopasiObjectaddMatrixReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddObjectReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
template<class CType >
CCopasiObjectaddVectorReference (const std::string &name, CType &reference, const unsigned C_INT32 &flag=0)
 
void initObjects ()
 
- Protected Member Functions inherited from CCopasiObject
 CCopasiObject ()
 
 CCopasiObject (const std::string &name, const CCopasiContainer *pParent=NULL, const std::string &type="CN", const unsigned C_INT32 &flag=0)
 
- Protected Attributes inherited from CLGraphicalObject
CLBoundingBox mBBox
 
std::string mKey
 
std::string mModelObjectKey
 
std::string mObjectRole
 
- Protected Attributes inherited from CLBase
std::string mTag
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 28 of file CGraphNode.h.

Constructor & Destructor Documentation

CGraphNode::CGraphNode ( const std::string &  name = "GraphNode",
const CCopasiContainer pParent = NULL 
)

Definition at line 31 of file CGraphNode.cpp.

33  : CLMetabGlyph(name, pParent)
35  , morigNodeKey("")
36  , mObjectKey("")
37  , mLabelText("")
38 {
39 }
std::string mLabelText
Definition: CGraphNode.h:35
static C_INT16 DEFAULT_NODE_SIZE
C_FLOAT64 msize
Definition: CGraphNode.h:31
std::string morigNodeKey
Definition: CGraphNode.h:32
std::string mObjectKey
Definition: CGraphNode.h:33
CLMetabGlyph(const std::string &name="MetabGlyph", const CCopasiContainer *pParent=NULL)
Definition: CLGlyphs.cpp:36
CGraphNode::CGraphNode ( const CLMetabGlyph src,
const CCopasiContainer pParent = NULL 
)

Definition at line 41 of file CGraphNode.cpp.

43  : CLMetabGlyph(src, pParent)
45  , morigNodeKey(src.getKey())
47  , mLabelText("")
48 {
49 }
std::string mLabelText
Definition: CGraphNode.h:35
static C_INT16 DEFAULT_NODE_SIZE
virtual const std::string & getKey() const
C_FLOAT64 msize
Definition: CGraphNode.h:31
std::string morigNodeKey
Definition: CGraphNode.h:32
const std::string & getModelObjectKey() const
std::string mObjectKey
Definition: CGraphNode.h:33
CLMetabGlyph(const std::string &name="MetabGlyph", const CCopasiContainer *pParent=NULL)
Definition: CLGlyphs.cpp:36
CGraphNode::CGraphNode ( const CGraphNode src,
const CCopasiContainer pParent = NULL 
)

Definition at line 51 of file CGraphNode.cpp.

53  : CLMetabGlyph(src, pParent)
54  , msize(src.msize)
56  , mObjectKey(src.mObjectKey)
57  , mLabelText(src.mLabelText)
58 {
59 }
std::string mLabelText
Definition: CGraphNode.h:35
C_FLOAT64 msize
Definition: CGraphNode.h:31
std::string morigNodeKey
Definition: CGraphNode.h:32
std::string mObjectKey
Definition: CGraphNode.h:33
CLMetabGlyph(const std::string &name="MetabGlyph", const CCopasiContainer *pParent=NULL)
Definition: CLGlyphs.cpp:36

Member Function Documentation

std::string CGraphNode::getLabelText ( )
inline

Definition at line 63 of file CGraphNode.h.

References mLabelText.

63 {return this->mLabelText;}
std::string mLabelText
Definition: CGraphNode.h:35
std::string CGraphNode::getObjectKey ( )
inline

Definition at line 56 of file CGraphNode.h.

References mObjectKey.

56 {return this->mObjectKey;}
std::string mObjectKey
Definition: CGraphNode.h:33
std::string CGraphNode::getOrigNodeKey ( )
inline

Definition at line 61 of file CGraphNode.h.

References morigNodeKey.

Referenced by CQGLNetworkPainter::drawNode().

61 {return this->morigNodeKey;}
std::string morigNodeKey
Definition: CGraphNode.h:32
CLPoint CGraphNode::getPointOnRectangle ( CLBoundingBox  r,
CLPoint  p 
)
private
C_FLOAT64 CGraphNode::getSize ( )
inline

Definition at line 52 of file CGraphNode.h.

References msize.

Referenced by CQGLNetworkPainter::drawNode().

52 {return this->msize;}
C_FLOAT64 msize
Definition: CGraphNode.h:31
virtual void CGraphNode::scale ( const double &  scaleFactor)
inlinevirtual

Definition at line 82 of file CGraphNode.h.

References CLGraphicalObject::mBBox, msize, and CLBoundingBox::scale().

83  {
84  this->mBBox.scale(scaleFactor);
85  this->msize = this->msize * scaleFactor;
86  }
void scale(const double &scaleFactor)
Definition: CLBase.h:285
CLBoundingBox mBBox
C_FLOAT64 msize
Definition: CGraphNode.h:31
virtual void CGraphNode::scale ( const double &  scaleFactor,
bool  changeSizeP 
)
inlinevirtual

Definition at line 88 of file CGraphNode.h.

References CLGraphicalObject::mBBox, msize, and CLBoundingBox::scale().

89  {
90  this->mBBox.scale(scaleFactor);
91 
92  if (changeSizeP)
93  this->msize = this->msize * scaleFactor;
94  }
void scale(const double &scaleFactor)
Definition: CLBase.h:285
CLBoundingBox mBBox
C_FLOAT64 msize
Definition: CGraphNode.h:31
void CGraphNode::setLabelText ( std::string  name)

Definition at line 79 of file CGraphNode.cpp.

References mLabelText.

80 {
81  this->mLabelText = name;
82 }
std::string mLabelText
Definition: CGraphNode.h:35
void CGraphNode::setObjectKey ( std::string  key)
inline

Definition at line 57 of file CGraphNode.h.

References mObjectKey.

57 {mObjectKey = key;}
std::string mObjectKey
Definition: CGraphNode.h:33
void CGraphNode::setSize ( C_FLOAT64  newSize)

Definition at line 61 of file CGraphNode.cpp.

References msize.

62 {
63  this->msize = newSize;
64  // now change corresponding end point(s) of attached curves)
65 }
C_FLOAT64 msize
Definition: CGraphNode.h:31

Friends And Related Function Documentation

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

Definition at line 67 of file CGraphNode.cpp.

68 {
69  os << "node key: " << gn.morigNodeKey << " size: " << gn.msize << std::endl;
70  os << "object key: " << gn.mObjectKey << std::endl;
71  os << "bounding box: " << gn.mBBox << std::endl;
72  os << "label: " << gn.mLabelText << std::endl;
73  //for (int i=0;i<gn.mConnectedCurveIndices.size();i++)
74  // os << gn.mConnectedCurveIndices[i] << std::endl;;
75 
76  return os;
77 }
std::string mLabelText
Definition: CGraphNode.h:35
CLBoundingBox mBBox
C_FLOAT64 msize
Definition: CGraphNode.h:31
std::string morigNodeKey
Definition: CGraphNode.h:32
std::string mObjectKey
Definition: CGraphNode.h:33

Member Data Documentation

std::string CGraphNode::mLabelText
private

Definition at line 35 of file CGraphNode.h.

Referenced by getLabelText(), operator<<(), and setLabelText().

std::string CGraphNode::mObjectKey
private

Definition at line 33 of file CGraphNode.h.

Referenced by getObjectKey(), operator<<(), and setObjectKey().

std::string CGraphNode::morigNodeKey
private

Definition at line 32 of file CGraphNode.h.

Referenced by getOrigNodeKey(), and operator<<().

C_FLOAT64 CGraphNode::msize
private

Definition at line 31 of file CGraphNode.h.

Referenced by getSize(), operator<<(), scale(), and setSize().


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