COPASI API  4.16.103
Public Member Functions | Protected Attributes | Private Member Functions | List of all members
CLGroup Class Reference

#include <CLGroup.h>

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

Public Member Functions

void addChildElement (const CLTransformation2D *pChild)
 
 CLGroup (CCopasiContainer *pParent=NULL)
 
 CLGroup (const CLGroup &source, CCopasiContainer *pParent=NULL)
 
 CLGroup (const RenderGroup &source, CCopasiContainer *pParent=NULL)
 
CLRenderCurvecreateCurve ()
 
CLEllipsecreateEllipse ()
 
CLGroupcreateGroup ()
 
CLImagecreateImage ()
 
CLPolygoncreatePolygon ()
 
CLRectanglecreateRectangle ()
 
CLTextcreateText ()
 
CCopasiObjectgetElement (size_t n)
 
const CCopasiObjectgetElement (size_t n) const
 
const std::string & getEndHead () const
 
const std::string & getFontFamily () const
 
CLRelAbsVectorgetFontSize ()
 
const CLRelAbsVectorgetFontSize () const
 
CLText::FONT_STYLE getFontStyle () const
 
CLText::FONT_WEIGHT getFontWeight () const
 
const std::string & getKey () const
 
const CCopasiVector
< CCopasiObject > * 
getListOfElements () const
 
CCopasiVector< CCopasiObject > * getListOfElements ()
 
size_t getNumElements () const
 
const std::string & getStartHead () const
 
CLText::TEXT_ANCHOR getTextAnchor () const
 
CLText::TEXT_ANCHOR getVTextAnchor () const
 
bool isSetEndHead () const
 
bool isSetFontFamily () const
 
bool isSetFontSize () const
 
bool isSetFontStyle () const
 
bool isSetFontWeight () const
 
bool isSetStartHead () const
 
bool isSetTextAnchor () const
 
bool isSetVTextAnchor () const
 
void setEndHead (const std::string &key)
 
void setFontFamily (const std::string &family)
 
void setFontSize (const CLRelAbsVector &size)
 
void setFontStyle (CLText::FONT_STYLE style)
 
void setFontWeight (CLText::FONT_WEIGHT weight)
 
void setStartHead (const std::string &key)
 
void setTextAnchor (CLText::TEXT_ANCHOR anchor)
 
void setVTextAnchor (CLText::TEXT_ANCHOR anchor)
 
RenderGroup * toSBML (unsigned int level, unsigned int version) const
 
 ~CLGroup ()
 
- Public Member Functions inherited from CLGraphicalPrimitive2D
virtual void addSBMLAttributes (GraphicalPrimitive2D *pPrimitive) const
 
 CLGraphicalPrimitive2D ()
 
 CLGraphicalPrimitive2D (const GraphicalPrimitive2D &source)
 
const std::string & getFillColor () const
 
FILL_RULE getFillRule () const
 
bool isSetFill () const
 
bool isSetFillRule () const
 
void setFillColor (const std::string &color)
 
void setFillRule (FILL_RULE rule)
 
- Public Member Functions inherited from CLGraphicalPrimitive1D
virtual void addSBMLAttributes (GraphicalPrimitive1D *pPrimitive) const
 
 CLGraphicalPrimitive1D ()
 
 CLGraphicalPrimitive1D (const GraphicalPrimitive1D &source)
 
const std::vector< unsigned int > & getDashArray () const
 
const std::string & getStroke () const
 
double getStrokeWidth () const
 
bool isSetDashArray () const
 
bool isSetStroke () const
 
bool isSetStrokeWidth () const
 
void parseDashArray (const std::string &s)
 
void setDashArray (const std::vector< unsigned int > &array)
 
void setStroke (const std::string &key)
 
void setStrokeWidth (double width)
 
- Public Member Functions inherited from CLTransformation2D
 CLTransformation2D ()
 
 CLTransformation2D (const double m[6])
 
 CLTransformation2D (const Transformation2D &source)
 
std::string get2DTransformationString () const
 
const double * getMatrix2D () const
 
virtual void parseTransformation (const std::string &transformationString)
 
void setMatrix (const double m[12])
 
void setMatrix2D (const double m[6])
 
- Public Member Functions inherited from CLTransformation
 CLTransformation ()
 
 CLTransformation (const double matrix[12])
 
std::string get3DTransformationString () const
 
virtual const double * getMatrix () const
 
bool is2DTransformation () const
 
bool isIdentityMatrix () const
 
bool isSetMatrix () const
 
void setMatrix (const double m[12])
 
- Public Member Functions inherited from CLBase
 CLBase ()
 
 CLBase (const CLBase &b)
 
 CLBase (const SBase &)
 
const std::string & getTag () const
 
bool hasTag () const
 
virtual void moveBy (const CLPoint &)
 
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
 
virtual void print (std::ostream *ostream) 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 ()
 

Protected Attributes

CCopasiVector< CCopasiObjectmElements
 
std::string mEndHead
 
std::string mFontFamily
 
CLRelAbsVector mFontSize
 
CLText::FONT_STYLE mFontStyle
 
CLText::FONT_WEIGHT mFontWeight
 
std::string mKey
 
std::string mStartHead
 
CLText::TEXT_ANCHOR mTextAnchor
 
CLText::TEXT_ANCHOR mVTextAnchor
 
- Protected Attributes inherited from CLGraphicalPrimitive2D
std::string mFill
 
FILL_RULE mFillRule
 
- Protected Attributes inherited from CLGraphicalPrimitive1D
std::string mStroke
 
std::vector< unsigned int > mStrokeDashArray
 
double mStrokeWidth
 
- Protected Attributes inherited from CLTransformation2D
double mMatrix2D [6]
 
- Protected Attributes inherited from CLTransformation
double mMatrix [12]
 
- Protected Attributes inherited from CLBase
std::string mTag
 
- Protected Attributes inherited from CCopasiContainer
objectMap mObjects
 

Private Member Functions

CLGroupoperator= (const CLGroup &source)
 

Additional Inherited Members

- Public Types inherited from CLGraphicalPrimitive2D
enum  FILL_RULE { UNSET, NONZERO, EVENODD, INHERIT }
 
- 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 CLTransformation2D
static const double * getIdentityMatrix2D ()
 
- Static Public Member Functions inherited from CLTransformation
static const double * getIdentityMatrix ()
 
- 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 CLTransformation2D
static const double IDENTITY2D [6] = {1.0, 0.0, 0.0, 1.0, 0.0, 0.0}
 
- Static Public Attributes inherited from CLTransformation
static const double IDENTITY3D [12] = {1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0}
 
- 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 CLTransformation2D
virtual void addSBMLAttributes (Transformation2D *pTransformation) const
 
void updateMatrix2D ()
 
void updateMatrix3D ()
 
- 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)
 
- Static Protected Attributes inherited from CCopasiObject
static CRenameHandlersmpRenameHandler = NULL
 

Detailed Description

Definition at line 33 of file CLGroup.h.

Constructor & Destructor Documentation

CLGroup::CLGroup ( CCopasiContainer pParent = NULL)

Constructor.

Definition at line 42 of file CLGroup.cpp.

References CKeyFactory::add(), CCopasiRootContainer::getKeyFactory(), and mKey.

Referenced by addChildElement(), CLGroup(), and createGroup().

42  :
44  CCopasiContainer("RenderGroup", pParent),
45  mFontFamily(""),
46  mFontSize(CLRelAbsVector(std::numeric_limits<double>::quiet_NaN(), std::numeric_limits<double>::quiet_NaN())),
51  mStartHead(""),
52  mEndHead(""),
53  mElements("GroupElements", this),
54  mKey("")
55 {
56  this->mKey = CCopasiRootContainer::getKeyFactory()->add("RenderGroup", this);
57 }
CLText::FONT_STYLE mFontStyle
Definition: CLGroup.h:43
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
std::string mFontFamily
Definition: CLGroup.h:40
CLText::TEXT_ANCHOR mTextAnchor
Definition: CLGroup.h:44
CLRelAbsVector mFontSize
Definition: CLGroup.h:41
std::string mStartHead
Definition: CLGroup.h:46
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()
CLText::FONT_WEIGHT mFontWeight
Definition: CLGroup.h:42
std::string mKey
Definition: CLGroup.h:53
CLText::TEXT_ANCHOR mVTextAnchor
Definition: CLGroup.h:45
std::string mEndHead
Definition: CLGroup.h:47
CLGroup::CLGroup ( const CLGroup source,
CCopasiContainer pParent = NULL 
)

Copy constructor.

Definition at line 62 of file CLGroup.cpp.

References CKeyFactory::add(), CCopasiVector< T >::add(), CLGroup(), CCopasiRootContainer::getKeyFactory(), mElements, mKey, and CCopasiVector< T >::size().

62  :
63  CLGraphicalPrimitive2D(source),
64  CCopasiContainer(source, pParent),
65  mFontFamily(source.mFontFamily),
66  mFontSize(source.mFontSize),
67  mFontWeight(source.mFontWeight),
68  mFontStyle(source.mFontStyle),
69  mTextAnchor(source.mTextAnchor),
70  mVTextAnchor(source.mVTextAnchor),
71  mStartHead(source.mStartHead),
72  mEndHead(source.mEndHead),
73  mElements("GroupElements", this),
74  mKey("")
75 {
76  this->mKey = CCopasiRootContainer::getKeyFactory()->add("RenderGroup", this);
77  // copy the elements
78  size_t i, iMax = source.mElements.size();
79  CCopasiObject* pChild = NULL;
80 
81  for (i = 0; i < iMax; ++i)
82  {
83  pChild = source.mElements[i];
84 
85  if (dynamic_cast<const CLRectangle*>(pChild))
86  {
87  this->mElements.add(new CLRectangle(*static_cast<const CLRectangle*>(pChild), this), true);
88  }
89  else if (dynamic_cast<const CLEllipse*>(pChild))
90  {
91  this->mElements.add(new CLEllipse(*static_cast<const CLEllipse*>(pChild), this), true);
92  }
93  else if (dynamic_cast<const CLRenderCurve*>(pChild))
94  {
95  this->mElements.add(new CLRenderCurve(*static_cast<const CLRenderCurve*>(pChild), this), true);
96  }
97  else if (dynamic_cast<const CLPolygon*>(pChild))
98  {
99  this->mElements.add(new CLPolygon(*static_cast<const CLPolygon*>(pChild), this), true);
100  }
101  else if (dynamic_cast<const CLText*>(pChild))
102  {
103  this->mElements.add(new CLText(*static_cast<const CLText*>(pChild), this), true);
104  }
105  else if (dynamic_cast<const CLImage*>(pChild))
106  {
107  this->mElements.add(new CLImage(*static_cast<const CLImage*>(pChild), this), true);
108  }
109  else if (dynamic_cast<const CLGroup*>(pChild))
110  {
111  this->mElements.add(new CLGroup(*static_cast<const CLGroup*>(pChild), this), true);
112  }
113  }
114 }
CLText::FONT_STYLE mFontStyle
Definition: CLGroup.h:43
Definition: CLText.h:27
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual size_t size() const
std::string mFontFamily
Definition: CLGroup.h:40
CLText::TEXT_ANCHOR mTextAnchor
Definition: CLGroup.h:44
CLRelAbsVector mFontSize
Definition: CLGroup.h:41
virtual bool add(const CType &src)
std::string mStartHead
Definition: CLGroup.h:46
CLGroup(CCopasiContainer *pParent=NULL)
Definition: CLGroup.cpp:42
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()
CLText::FONT_WEIGHT mFontWeight
Definition: CLGroup.h:42
std::string mKey
Definition: CLGroup.h:53
CLText::TEXT_ANCHOR mVTextAnchor
Definition: CLGroup.h:45
std::string mEndHead
Definition: CLGroup.h:47
CLGroup::CLGroup ( const RenderGroup &  source,
CCopasiContainer pParent = NULL 
)

Constructor to generate object from the corresponding SBML object.

Definition at line 119 of file CLGroup.cpp.

References CKeyFactory::add(), CCopasiVector< T >::add(), CLText::ANCHOR_BOTTOM, CLText::ANCHOR_END, CLText::ANCHOR_MIDDLE, CLText::ANCHOR_START, CLText::ANCHOR_TOP, CLText::ANCHOR_UNSET, CLGroup(), CCopasiRootContainer::getKeyFactory(), mElements, mKey, setFontStyle(), setFontWeight(), setTextAnchor(), setVTextAnchor(), CLText::STYLE_ITALIC, CLText::STYLE_NORMAL, CLText::STYLE_UNSET, CLText::WEIGHT_BOLD, CLText::WEIGHT_NORMAL, and CLText::WEIGHT_UNSET.

119  :
120  CLGraphicalPrimitive2D(source),
121  CCopasiContainer("RenderGroup", pParent),
122  mFontFamily(source.getFontFamily()),
123  mFontSize(source.getFontSize()),
124  mStartHead(source.getStartHead()),
125  mEndHead(source.getEndHead()),
126  mElements("GroupElements", this),
127  mKey("")
128 {
129  this->mKey = CCopasiRootContainer::getKeyFactory()->add("RenderGroup", this);
130 
131  // copy the elements
132  switch (source.getFontWeight())
133  {
134  case Text::WEIGHT_UNSET:
136  break;
137 
138  case Text::WEIGHT_BOLD:
140  break;
141 
142  default:
144  break;
145  }
146 
147  switch (source.getFontStyle())
148  {
149  case Text::STYLE_UNSET:
151  break;
152 
153  case Text::STYLE_ITALIC:
155  break;
156 
157  default:
159  break;
160  }
161 
162  switch (source.getTextAnchor())
163  {
164  case Text::ANCHOR_UNSET:
166  break;
167 
168  case Text::ANCHOR_END:
170  break;
171 
172  case Text::ANCHOR_MIDDLE:
174  break;
175 
176  default:
178  break;
179  }
180 
181  switch (source.getVTextAnchor())
182  {
183  case Text::ANCHOR_UNSET:
185  break;
186 
187  case Text::ANCHOR_BOTTOM:
189  break;
190 
191  case Text::ANCHOR_MIDDLE:
193  break;
194 
195  default:
197  break;
198  }
199 
200  size_t i, iMax = source.getNumElements();
201  const Transformation2D* pChild = NULL;
202 
203  for (i = 0; i < iMax; ++i)
204  {
205  pChild = dynamic_cast<const Transformation2D*>(source.getElement((unsigned int) i));
206 
207  if (dynamic_cast<const Rectangle*>(pChild))
208  {
209  this->mElements.add(new CLRectangle(*static_cast<const Rectangle*>(pChild), this), true);
210  }
211  else if (dynamic_cast<const Ellipse*>(pChild))
212  {
213  this->mElements.add(new CLEllipse(*static_cast<const Ellipse*>(pChild), this), true);
214  }
215  else if (dynamic_cast<const RenderCurve*>(pChild))
216  {
217  this->mElements.add(new CLRenderCurve(*static_cast<const RenderCurve*>(pChild), this), true);
218  }
219  else if (dynamic_cast<const Polygon*>(pChild))
220  {
221  this->mElements.add(new CLPolygon(*static_cast<const Polygon*>(pChild), this), true);
222  }
223  else if (dynamic_cast<const Text*>(pChild))
224  {
225  this->mElements.add(new CLText(*static_cast<const Text*>(pChild), this), true);
226  }
227  else if (dynamic_cast<const Image*>(pChild))
228  {
229  this->mElements.add(new CLImage(*static_cast<const Image*>(pChild), this), true);
230  }
231  else if (dynamic_cast<const RenderGroup*>(pChild))
232  {
233  this->mElements.add(new CLGroup(*static_cast<const RenderGroup*>(pChild), this), true);
234  }
235  }
236 }
void setTextAnchor(CLText::TEXT_ANCHOR anchor)
Definition: CLGroup.cpp:280
Definition: CLText.h:27
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
std::string mFontFamily
Definition: CLGroup.h:40
CLRelAbsVector mFontSize
Definition: CLGroup.h:41
void setFontWeight(CLText::FONT_WEIGHT weight)
Definition: CLGroup.cpp:264
void setVTextAnchor(CLText::TEXT_ANCHOR anchor)
Definition: CLGroup.cpp:288
virtual bool add(const CType &src)
std::string mStartHead
Definition: CLGroup.h:46
CLGroup(CCopasiContainer *pParent=NULL)
Definition: CLGroup.cpp:42
std::string add(const std::string &prefix, CCopasiObject *pObject)
static CKeyFactory * getKeyFactory()
std::string mKey
Definition: CLGroup.h:53
void setFontStyle(CLText::FONT_STYLE style)
Definition: CLGroup.cpp:272
std::string mEndHead
Definition: CLGroup.h:47
CLGroup::~CLGroup ( )

Destructor.

Destructor

Definition at line 240 of file CLGroup.cpp.

References CCopasiRootContainer::getKeyFactory(), mKey, and CKeyFactory::remove().

241 {
243 }
bool remove(const std::string &key)
static CKeyFactory * getKeyFactory()
std::string mKey
Definition: CLGroup.h:53

Member Function Documentation

void CLGroup::addChildElement ( const CLTransformation2D pChild)

Adds a copy of the given element to the end of the list of children elements.

Definition at line 517 of file CLGroup.cpp.

References CCopasiVector< T >::add(), CLGroup(), and mElements.

Referenced by CCopasiXMLParser::ImageElement::start(), CCopasiXMLParser::RectangleElement::start(), CCopasiXMLParser::EllipseElement::start(), CCopasiXMLParser::TextElement::start(), CCopasiXMLParser::RenderCurveElement::start(), CCopasiXMLParser::PolygonElement::start(), and CCopasiXMLParser::GroupElement::start().

518 {
519  if (dynamic_cast<const CLRectangle*>(pChild))
520  {
521  this->mElements.add(new CLRectangle(*static_cast<const CLRectangle*>(pChild), this), true);
522  }
523  else if (dynamic_cast<const CLEllipse*>(pChild))
524  {
525  this->mElements.add(new CLEllipse(*static_cast<const CLEllipse*>(pChild), this), true);
526  }
527  else if (dynamic_cast<const CLRenderCurve*>(pChild))
528  {
529  this->mElements.add(new CLRenderCurve(*static_cast<const CLRenderCurve*>(pChild), this), true);
530  }
531  else if (dynamic_cast<const CLPolygon*>(pChild))
532  {
533  this->mElements.add(new CLPolygon(*static_cast<const CLPolygon*>(pChild), this), true);
534  }
535  else if (dynamic_cast<const CLText*>(pChild))
536  {
537  this->mElements.add(new CLText(*static_cast<const CLText*>(pChild), this), true);
538  }
539  else if (dynamic_cast<const CLImage*>(pChild))
540  {
541  this->mElements.add(new CLImage(*static_cast<const CLImage*>(pChild), this), true);
542  }
543  else if (dynamic_cast<const CLGroup*>(pChild))
544  {
545  this->mElements.add(new CLGroup(*static_cast<const CLGroup*>(pChild), this), true);
546  }
547 }
Definition: CLText.h:27
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CLGroup(CCopasiContainer *pParent=NULL)
Definition: CLGroup.cpp:42
CLRenderCurve * CLGroup::createCurve ( )

Creates a curve object and adds it to the end of the list of child elements.

Definition at line 485 of file CLGroup.cpp.

References CCopasiVector< T >::add(), and mElements.

486 {
487  CLRenderCurve* pCurve = new CLRenderCurve(this);
488  this->mElements.add(pCurve, true);
489  return pCurve;
490 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CLEllipse * CLGroup::createEllipse ( )

Creates an ellipse object and adds it to the end of the list of child elements.

Definition at line 474 of file CLGroup.cpp.

References CCopasiVector< T >::add(), and mElements.

475 {
476  CLEllipse* pCLEllipse = new CLEllipse(this);
477  this->mElements.add(pCLEllipse, true);
478  return pCLEllipse;
479 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CLGroup * CLGroup::createGroup ( )

Creates an image object and adds it to the end of the list of child elements.

Definition at line 452 of file CLGroup.cpp.

References CCopasiVector< T >::add(), CLGroup(), and mElements.

453 {
454  CLGroup* pCLGroup = new CLGroup(this);
455  this->mElements.add(pCLGroup, true);
456  return pCLGroup;
457 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CLGroup(CCopasiContainer *pParent=NULL)
Definition: CLGroup.cpp:42
CLImage * CLGroup::createImage ( )

Creates an image object and adds it to the end of the list of child elements.

Definition at line 441 of file CLGroup.cpp.

References CCopasiVector< T >::add(), and mElements.

442 {
443  CLImage* pCLImage = new CLImage(this);
444  this->mElements.add(pCLImage, true);
445  return pCLImage;
446 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CLPolygon * CLGroup::createPolygon ( )

Creates a polygon object and adds it to the end of the list of child elements.

Definition at line 496 of file CLGroup.cpp.

References CCopasiVector< T >::add(), and mElements.

497 {
498  CLPolygon* pCLPolygon = new CLPolygon(this);
499  this->mElements.add(pCLPolygon, true);
500  return pCLPolygon;
501 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CLRectangle * CLGroup::createRectangle ( )

Creates a rectangle object and adds it to the end of the list of child elements.

Definition at line 463 of file CLGroup.cpp.

References CCopasiVector< T >::add(), and mElements.

464 {
465  CLRectangle* pCLRectangle = new CLRectangle(this);
466  this->mElements.add(pCLRectangle, true);
467  return pCLRectangle;
468 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CLText * CLGroup::createText ( )

Creates a text object and adds it to the end of the list of child elements.

Definition at line 507 of file CLGroup.cpp.

References CCopasiVector< T >::add(), and mElements.

508 {
509  CLText* pCLText = new CLText(this);
510  this->mElements.add(pCLText, true);
511  return pCLText;
512 }
Definition: CLText.h:27
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual bool add(const CType &src)
CCopasiObject * CLGroup::getElement ( size_t  n)

Returns element with index n. If there is no such element, NULL is returned.

Definition at line 409 of file CLGroup.cpp.

References mElements, and CCopasiVector< T >::size().

Referenced by addLineEndingToItem(), CLLayoutRenderer::draw_group(), fillItemFromGroup(), CCopasiXMLParser::TextElement::start(), CCopasiXMLParser::RenderCurveElement::start(), CCopasiXMLParser::PolygonElement::start(), CCopasiXMLParser::GroupElement::start(), and CLLayoutRenderer::update_textures_and_colors().

410 {
411  if (n < this->mElements.size())
412  {
413  return this->mElements[n];
414  }
415  else
416  {
417  return NULL;
418  }
419 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual size_t size() const
const CCopasiObject * CLGroup::getElement ( size_t  n) const

Returns element with index n. If there is no such element, NULL is returned.

Definition at line 425 of file CLGroup.cpp.

References mElements, and CCopasiVector< T >::size().

426 {
427  if (n < this->mElements.size())
428  {
429  return this->mElements[n];
430  }
431  else
432  {
433  return NULL;
434  }
435 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual size_t size() const
const std::string & CLGroup::getEndHead ( ) const

Returns the end head id.

Definition at line 376 of file CLGroup.cpp.

References mEndHead.

Referenced by CQRenderConverter::applyStyle(), fillItemFromRenderCurve(), and CLLayoutRenderer::update_textures_and_colors().

377 {
378  return this->mEndHead;
379 }
std::string mEndHead
Definition: CLGroup.h:47
const std::string & CLGroup::getFontFamily ( ) const

Returns the font family.

Definition at line 312 of file CLGroup.cpp.

References mFontFamily.

Referenced by getFont(), CLLayoutRenderer::getFontSpec(), and toSBML().

313 {
314  return this->mFontFamily;
315 }
std::string mFontFamily
Definition: CLGroup.h:40
CLRelAbsVector & CLGroup::getFontSize ( )

Returns the font size.

Definition at line 320 of file CLGroup.cpp.

References mFontSize.

Referenced by getFont(), CLLayoutRenderer::getFontSpec(), and toSBML().

321 {
322  return this->mFontSize;
323 }
CLRelAbsVector mFontSize
Definition: CLGroup.h:41
const CLRelAbsVector & CLGroup::getFontSize ( ) const

Returns the font size.

Definition at line 328 of file CLGroup.cpp.

References mFontSize.

329 {
330  return this->mFontSize;
331 }
CLRelAbsVector mFontSize
Definition: CLGroup.h:41
CLText::FONT_STYLE CLGroup::getFontStyle ( ) const

Returns the font style.

Definition at line 344 of file CLGroup.cpp.

References mFontStyle.

Referenced by getFont(), CLLayoutRenderer::getFontSpec(), and toSBML().

345 {
346  return this->mFontStyle;
347 }
CLText::FONT_STYLE mFontStyle
Definition: CLGroup.h:43
CLText::FONT_WEIGHT CLGroup::getFontWeight ( ) const

Returns the font weight.

Definition at line 336 of file CLGroup.cpp.

References mFontWeight.

Referenced by getFont(), CLLayoutRenderer::getFontSpec(), and toSBML().

337 {
338  return this->mFontWeight;
339 }
CLText::FONT_WEIGHT mFontWeight
Definition: CLGroup.h:42
const std::string & CLGroup::getKey ( ) const
virtual

Returns the key string of the object.

Returns the key of the color definition.

Reimplemented from CCopasiObject.

Definition at line 791 of file CLGroup.cpp.

References mKey.

792 {
793  return this->mKey;
794 }
std::string mKey
Definition: CLGroup.h:53
const CCopasiVector< CCopasiObject > * CLGroup::getListOfElements ( ) const

Returns the list of elements.

Definition at line 392 of file CLGroup.cpp.

References mElements.

393 {
394  return &this->mElements;
395 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
CCopasiVector< CCopasiObject > * CLGroup::getListOfElements ( )

Returns the list of elements.

Definition at line 400 of file CLGroup.cpp.

References mElements.

401 {
402  return &this->mElements;
403 }
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
size_t CLGroup::getNumElements ( ) const
const std::string & CLGroup::getStartHead ( ) const

Returns the start head id.

Definition at line 368 of file CLGroup.cpp.

References mStartHead.

Referenced by CQRenderConverter::applyStyle(), fillItemFromRenderCurve(), and CLLayoutRenderer::update_textures_and_colors().

369 {
370  return this->mStartHead;
371 }
std::string mStartHead
Definition: CLGroup.h:46
CLText::TEXT_ANCHOR CLGroup::getTextAnchor ( ) const

Returns the text anchor.

Definition at line 352 of file CLGroup.cpp.

References mTextAnchor.

Referenced by adjustPosition(), and toSBML().

353 {
354  return this->mTextAnchor;
355 }
CLText::TEXT_ANCHOR mTextAnchor
Definition: CLGroup.h:44
CLText::TEXT_ANCHOR CLGroup::getVTextAnchor ( ) const

Returns the vertical text anchor.

Definition at line 360 of file CLGroup.cpp.

References mVTextAnchor.

Referenced by adjustPosition(), and toSBML().

361 {
362  return this->mVTextAnchor;
363 }
CLText::TEXT_ANCHOR mVTextAnchor
Definition: CLGroup.h:45
bool CLGroup::isSetEndHead ( ) const

Returns true if the start head is set or false otherwise.

Definition at line 560 of file CLGroup.cpp.

References mEndHead.

Referenced by CQRenderConverter::applyStyle(), CCopasiXMLParser::GroupElement::end(), fillItemFromRenderCurve(), and CLLayoutRenderer::update_textures_and_colors().

561 {
562  return (!this->mEndHead.empty() && this->mEndHead != "none");
563 }
std::string mEndHead
Definition: CLGroup.h:47
bool CLGroup::isSetFontFamily ( ) const

Returns true if the font family has been set or false otherwise.

Definition at line 568 of file CLGroup.cpp.

References mFontFamily.

Referenced by CCopasiXMLParser::GroupElement::end(), getFont(), and CLLayoutRenderer::getFontSpec().

569 {
570  return !this->mFontFamily.empty();
571 }
std::string mFontFamily
Definition: CLGroup.h:40
bool CLGroup::isSetFontSize ( ) const

Returns true if the font size has been set or false otherwise.

Definition at line 576 of file CLGroup.cpp.

References CLRelAbsVector::getAbsoluteValue(), CLRelAbsVector::getRelativeValue(), and mFontSize.

Referenced by getFont(), and CLLayoutRenderer::getFontSpec().

577 {
579 }
double getRelativeValue() const
CLRelAbsVector mFontSize
Definition: CLGroup.h:41
double getAbsoluteValue() const
bool CLGroup::isSetFontStyle ( ) const

Returns true if the font style has been set or false otherwise.

Definition at line 592 of file CLGroup.cpp.

References mFontStyle, and CLText::STYLE_UNSET.

Referenced by CCopasiXMLParser::GroupElement::end(), getFont(), and CLLayoutRenderer::getFontSpec().

593 {
594  return (this->mFontStyle != CLText::STYLE_UNSET);
595 }
CLText::FONT_STYLE mFontStyle
Definition: CLGroup.h:43
bool CLGroup::isSetFontWeight ( ) const

Returns true if the font weight has been set or false otherwise.

Definition at line 584 of file CLGroup.cpp.

References mFontWeight, and CLText::WEIGHT_UNSET.

Referenced by CCopasiXMLParser::GroupElement::end(), getFont(), and CLLayoutRenderer::getFontSpec().

585 {
586  return (this->mFontWeight != CLText::WEIGHT_UNSET);
587 }
CLText::FONT_WEIGHT mFontWeight
Definition: CLGroup.h:42
bool CLGroup::isSetStartHead ( ) const

Returns true if the start head is set or false otherwise.

Definition at line 552 of file CLGroup.cpp.

References mStartHead.

Referenced by CCopasiXMLParser::GroupElement::end(), and CLLayoutRenderer::update_textures_and_colors().

553 {
554  return (!this->mStartHead.empty() && this->mStartHead != "none");
555 }
std::string mStartHead
Definition: CLGroup.h:46
bool CLGroup::isSetTextAnchor ( ) const

Returns true if the horizonal alignment attribute has been set.

This methods imports a curve in the old format into the new format. Since the old curves could have gaps, the original curve might have to be split into several new curves. void CLGroup::importOldCurve(const XMLNode& node) { const XMLAttributes& curveAttributes=node.getAttributes(); const XMLNode* child; size_t n=0,nMax = node.getNumChildren(); const XMLNode* pOrigAnnotation=NULL; const XMLNode* pOrigNotes=NULL; while(n<nMax) { child=&node.getChild(n); std::string childName=child->getName(); if(childName=="listOfCurveSegments") { size_t i,iMax=child->getNumChildren(); const XMLNode* child2=NULL; CLRenderPoint start; CLRenderPoint end; CLRenderPoint lastEnd; CLRenderPoint bp1; CLRenderPoint bp2; bool startSet=false; bool endSet=false; bool bp1Set=false; bool bp2Set=false; std::string childName2; CLRenderCurve* pCurve=new CLRenderCurve(); read the attributes pCurve->Transformation2D::readAttributes(curveAttributes); pCurve->GraphicalPrimitive1D::readAttributes(curveAttributes); pCurve->readAttributes(curveAttributes); for(i=0;i<iMax;++i) { child2=&child->getChild(i); childName2=child2->getName(); if(childName2=="curveSegment") { startSet=false; endSet=false; bp1Set=false; bp2Set=false; const XMLAttributes& innerAttributes=child2->getAttributes(); int typeIndex=innerAttributes.getIndex("type"); if(typeIndex==-1 || innerAttributes.getURI(typeIndex)!="http://www.w3.org/2001/XMLSchema-instance") { continue; } size_t j,jMax=child2->getNumChildren(); for(j=0;j<jMax;++j) { const XMLNode* child3=&child2->getChild(j); std::string childName3=child3->getName(); if(childName3=="start") { start=CLRenderPoint(<em>child3); startSet=true; } add the basepoints and the endpoint else if(childName3=="end") { end=CLRenderPoint(*child3); endSet=true; } else if(innerAttributes.getValue(typeIndex)=="CubicBezier" && childName3=="basePoint1") { bp1=CLRenderPoint(*child3); bp1Set=true; } else if(innerAttributes.getValue(typeIndex)=="CubicBezier" && childName3=="basePoint2") { bp2=CLRenderPoint(*child3); bp2Set=true; } } if(!startSet || !endSet) { skip this point TODO this is an error continue; } if(pCurve->getNumElements()==0) { add the start point pCurve->addCurveElement(&start); } else { check if start is identical to lastEnd if not, we have to start a new curve if(!(start == lastEnd)) { if(pCurve->getNumElements() > 1) { add the curve to the goup this->mElements.add(pCurve,true); } else { delete pCurve; } we have do clear the endHead on the preceeding curve pCurve->setEndHead("none"); pCurve=new CLRenderCurve(); read the attributes pCurve->Transformation2D::readAttributes(curveAttributes); pCurve->GraphicalPrimitive1D::readAttributes(curveAttributes); pCurve->readAttributes(curveAttributes); we have to clear the start head on this curve pCurve->setStartHead("none"); pCurve->addCurveElement(&start); } } if(innerAttributes.getValue(typeIndex)=="CubicBezier") { if(!bp1Set) { if(bp2Set) { basepoint1 is the same as basepoint2 bp1=bp2; } else { bp1=CLRenderPoint(CLRelAbsVector((start.x().getAbsoluteValue()+end.x().getAbsoluteValue())/2.0,(start.x().getRelativeValue()+end.x().getRelativeValue())/2.0) ,CLRelAbsVector((start.y().getAbsoluteValue()+end.y().getAbsoluteValue())/2.0,(start.y().getRelativeValue()+end.y().getRelativeValue())/2.0) ,CLRelAbsVector((start.z().getAbsoluteValue()+end.z().getAbsoluteValue())/2.0,(start.z().getRelativeValue()+end.z().getRelativeValue())/2.0) ); bp1Set=true; } } if(!bp2Set) { at this time bp1 has to be set bp2=bp1; } add the cubic bezier element CLRenderCubicBezier pBezier=new CLRenderCubicBezier(bp1.x(),bp1.y(),bp1.z(), bp2.x(),bp2.y(),bp2.z(), end.x(),end.y(),end.z()); pCurve->addCurveElement(pBezier); delete pBezier; lastEnd=end; } else { add the end point pCurve->addCurveElement(&end); lastEnd=end; } } } if(pCurve->getNumElements() > 1) { add the curve to the goup this->mElements.add(pCurve,true); } } else if(childName=="annotation") { pOrigAnnotation=child; } else if(childName=="notes") { pOrigNotes=child; } ++n; } } Returns true if the horizonal alignment attribute has been set.

Definition at line 775 of file CLGroup.cpp.

References CLText::ANCHOR_UNSET, and mTextAnchor.

Referenced by adjustPosition(), and CCopasiXMLParser::GroupElement::end().

776 {
777  return this->mTextAnchor != CLText::ANCHOR_UNSET;
778 }
CLText::TEXT_ANCHOR mTextAnchor
Definition: CLGroup.h:44
bool CLGroup::isSetVTextAnchor ( ) const

Returns true if the vertical alignment attribute has been set.

Definition at line 783 of file CLGroup.cpp.

References CLText::ANCHOR_UNSET, and mVTextAnchor.

Referenced by adjustPosition(), and CCopasiXMLParser::GroupElement::end().

784 {
785  return this->mVTextAnchor != CLText::ANCHOR_UNSET;
786 }
CLText::TEXT_ANCHOR mVTextAnchor
Definition: CLGroup.h:45
CLGroup& CLGroup::operator= ( const CLGroup source)
private
void CLGroup::setEndHead ( const std::string &  key)

Sets the end head id.

Definition at line 304 of file CLGroup.cpp.

References mEndHead.

Referenced by CCopasiXMLParser::GroupElement::end(), and CCopasiXMLParser::GroupElement::start().

305 {
306  this->mEndHead = key;
307 }
std::string mEndHead
Definition: CLGroup.h:47
void CLGroup::setFontFamily ( const std::string &  family)

Sets the font family.

Definition at line 248 of file CLGroup.cpp.

References mFontFamily.

Referenced by CCopasiXMLParser::GroupElement::end(), and CCopasiXMLParser::GroupElement::start().

249 {
250  this->mFontFamily = family;
251 }
std::string mFontFamily
Definition: CLGroup.h:40
void CLGroup::setFontSize ( const CLRelAbsVector size)

Sets the font size.

Definition at line 256 of file CLGroup.cpp.

References mFontSize.

Referenced by CCopasiXMLParser::GroupElement::start().

257 {
258  this->mFontSize = size;
259 }
CLRelAbsVector mFontSize
Definition: CLGroup.h:41
void CLGroup::setFontStyle ( CLText::FONT_STYLE  style)

Sets the font style.

Definition at line 272 of file CLGroup.cpp.

References mFontStyle.

Referenced by CLGroup(), CCopasiXMLParser::GroupElement::end(), and CCopasiXMLParser::GroupElement::start().

273 {
274  this->mFontStyle = style;
275 }
CLText::FONT_STYLE mFontStyle
Definition: CLGroup.h:43
void CLGroup::setFontWeight ( CLText::FONT_WEIGHT  weight)

Sets the font weight.

Definition at line 264 of file CLGroup.cpp.

References mFontWeight.

Referenced by CLGroup(), CCopasiXMLParser::GroupElement::end(), and CCopasiXMLParser::GroupElement::start().

265 {
266  this->mFontWeight = weight;
267 }
CLText::FONT_WEIGHT mFontWeight
Definition: CLGroup.h:42
void CLGroup::setStartHead ( const std::string &  key)

Sets the start head id.

Definition at line 296 of file CLGroup.cpp.

References mStartHead.

Referenced by CCopasiXMLParser::GroupElement::end(), and CCopasiXMLParser::GroupElement::start().

297 {
298  this->mStartHead = key;
299 }
std::string mStartHead
Definition: CLGroup.h:46
void CLGroup::setTextAnchor ( CLText::TEXT_ANCHOR  anchor)

Sets the text anchor.

Definition at line 280 of file CLGroup.cpp.

References mTextAnchor.

Referenced by CLGroup(), CCopasiXMLParser::GroupElement::end(), and CCopasiXMLParser::GroupElement::start().

281 {
282  this->mTextAnchor = anchor;
283 }
CLText::TEXT_ANCHOR mTextAnchor
Definition: CLGroup.h:44
void CLGroup::setVTextAnchor ( CLText::TEXT_ANCHOR  anchor)

Sets the vertical text anchor.

Definition at line 288 of file CLGroup.cpp.

References mVTextAnchor.

Referenced by CLGroup(), CCopasiXMLParser::GroupElement::end(), and CCopasiXMLParser::GroupElement::start().

289 {
290  this->mVTextAnchor = anchor;
291 }
CLText::TEXT_ANCHOR mVTextAnchor
Definition: CLGroup.h:45
RenderGroup * CLGroup::toSBML ( unsigned int  level,
unsigned int  version 
) const

Converts this object to the corresponding SBML object.

Definition at line 799 of file CLGroup.cpp.

References CLGraphicalPrimitive2D::addSBMLAttributes(), CLText::ANCHOR_BOTTOM, CLText::ANCHOR_END, CLText::ANCHOR_MIDDLE, CLText::ANCHOR_UNSET, getFontFamily(), getFontSize(), getFontStyle(), getFontWeight(), getTextAnchor(), getVTextAnchor(), mElements, mEndHead, mStartHead, CCopasiVector< T >::size(), CLText::STYLE_ITALIC, CLText::STYLE_UNSET, CLRelAbsVector::toSBML(), CLText::WEIGHT_BOLD, and CLText::WEIGHT_UNSET.

Referenced by CLStyle::addSBMLAttributes(), and CLLineEnding::toSBML().

800 {
801  RenderGroup* pGroup = new RenderGroup(level, version);
802  this->addSBMLAttributes(pGroup);
803  pGroup->setStartHead(this->mStartHead);
804  pGroup->setEndHead(this->mEndHead);
805  RelAbsVector* pV = this->getFontSize().toSBML();
806  pGroup->setFontSize(*pV);
807  delete pV;
808  pGroup->setFontFamily(this->getFontFamily());
809 
810  switch (this->getFontWeight())
811  {
813  pGroup->setFontWeight(Text::WEIGHT_UNSET);
814  break;
815 
816  case CLText::WEIGHT_BOLD:
817  pGroup->setFontWeight(Text::WEIGHT_BOLD);
818  break;
819 
820  default:
821  pGroup->setFontWeight(Text::WEIGHT_NORMAL);
822  break;
823  }
824 
825  switch (this->getFontStyle())
826  {
827  case CLText::STYLE_UNSET:
828  pGroup->setFontStyle(Text::STYLE_UNSET);
829  break;
830 
832  pGroup->setFontStyle(Text::STYLE_ITALIC);
833  break;
834 
835  default:
836  pGroup->setFontStyle(Text::STYLE_NORMAL);
837  break;
838  }
839 
840  switch (this->getTextAnchor())
841  {
843  pGroup->setTextAnchor(Text::ANCHOR_UNSET);
844  break;
845 
846  case CLText::ANCHOR_END:
847  pGroup->setTextAnchor(Text::ANCHOR_END);
848  break;
849 
851  pGroup->setTextAnchor(Text::ANCHOR_MIDDLE);
852  break;
853 
854  default:
855  pGroup->setTextAnchor(Text::ANCHOR_START);
856  break;
857  }
858 
859  switch (this->getVTextAnchor())
860  {
862  pGroup->setVTextAnchor(Text::ANCHOR_UNSET);
863  break;
864 
866  pGroup->setVTextAnchor(Text::ANCHOR_BOTTOM);
867  break;
868 
870  pGroup->setVTextAnchor(Text::ANCHOR_MIDDLE);
871  break;
872 
873  default:
874  pGroup->setVTextAnchor(Text::ANCHOR_TOP);
875  break;
876  }
877 
878  size_t i, iMax = this->mElements.size();
879  int result;
880 
881  for (i = 0; i < iMax; ++i)
882  {
883  const Transformation2D* pChild = NULL;
884  const CCopasiObject* pObject = this->mElements[i];
885 
886  if (dynamic_cast<const CLRectangle*>(pObject))
887  {
888  pChild = static_cast<const CLRectangle*>(pObject)->toSBML(level, version);
889  }
890  else if (dynamic_cast<const CLEllipse*>(pObject))
891  {
892  pChild = static_cast<const CLEllipse*>(pObject)->toSBML(level, version);
893  }
894  else if (dynamic_cast<const CLRenderCurve*>(pObject))
895  {
896  pChild = static_cast<const CLRenderCurve*>(pObject)->toSBML(level, version);
897  }
898  else if (dynamic_cast<const CLPolygon*>(pObject))
899  {
900  pChild = static_cast<const CLPolygon*>(pObject)->toSBML(level, version);
901  }
902  else if (dynamic_cast<const CLText*>(pObject))
903  {
904  pChild = static_cast<const CLText*>(pObject)->toSBML(level, version);
905  }
906  else if (dynamic_cast<const CLImage*>(pObject))
907  {
908  pChild = static_cast<const CLImage*>(pObject)->toSBML(level, version);
909  }
910  else if (dynamic_cast<const CLGroup*>(pObject))
911  {
912  pChild = static_cast<const CLGroup*>(pObject)->toSBML(level, version);
913  }
914 
915  result = pGroup->addChildElement(pChild);
916  assert(result == LIBSBML_OPERATION_SUCCESS);
917  delete pChild;
918  }
919 
920  return pGroup;
921 }
Definition: CLText.h:27
CCopasiVector< CCopasiObject > mElements
Definition: CLGroup.h:48
virtual size_t size() const
const std::string & getFontFamily() const
Definition: CLGroup.cpp:312
CLRelAbsVector & getFontSize()
Definition: CLGroup.cpp:320
RelAbsVector * toSBML() const
std::string mStartHead
Definition: CLGroup.h:46
virtual void addSBMLAttributes(GraphicalPrimitive2D *pPrimitive) const
CLText::FONT_STYLE getFontStyle() const
Definition: CLGroup.cpp:344
CLText::FONT_WEIGHT getFontWeight() const
Definition: CLGroup.cpp:336
CLText::TEXT_ANCHOR getVTextAnchor() const
Definition: CLGroup.cpp:360
CLText::TEXT_ANCHOR getTextAnchor() const
Definition: CLGroup.cpp:352
std::string mEndHead
Definition: CLGroup.h:47
RenderGroup * toSBML(unsigned int level, unsigned int version) const
Definition: CLGroup.cpp:799

Member Data Documentation

CCopasiVector<CCopasiObject> CLGroup::mElements
protected
std::string CLGroup::mEndHead
protected

Definition at line 47 of file CLGroup.h.

Referenced by getEndHead(), isSetEndHead(), setEndHead(), and toSBML().

std::string CLGroup::mFontFamily
protected

Definition at line 40 of file CLGroup.h.

Referenced by getFontFamily(), isSetFontFamily(), and setFontFamily().

CLRelAbsVector CLGroup::mFontSize
protected

Definition at line 41 of file CLGroup.h.

Referenced by getFontSize(), isSetFontSize(), and setFontSize().

CLText::FONT_STYLE CLGroup::mFontStyle
protected

Definition at line 43 of file CLGroup.h.

Referenced by getFontStyle(), isSetFontStyle(), and setFontStyle().

CLText::FONT_WEIGHT CLGroup::mFontWeight
protected

Definition at line 42 of file CLGroup.h.

Referenced by getFontWeight(), isSetFontWeight(), and setFontWeight().

std::string CLGroup::mKey
protected

key for the object.

Definition at line 53 of file CLGroup.h.

Referenced by CLGroup(), getKey(), and ~CLGroup().

std::string CLGroup::mStartHead
protected

Definition at line 46 of file CLGroup.h.

Referenced by getStartHead(), isSetStartHead(), setStartHead(), and toSBML().

CLText::TEXT_ANCHOR CLGroup::mTextAnchor
protected

Definition at line 44 of file CLGroup.h.

Referenced by getTextAnchor(), isSetTextAnchor(), and setTextAnchor().

CLText::TEXT_ANCHOR CLGroup::mVTextAnchor
protected

Definition at line 45 of file CLGroup.h.

Referenced by getVTextAnchor(), isSetVTextAnchor(), and setVTextAnchor().


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