Esempio n. 1
0
/*
 * Ctor.
 */
ListOfGlobalStyles::ListOfGlobalStyles(RenderPkgNamespaces* renderns)
 : ListOf(renderns)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(renderns->getURI());
}
Esempio n. 2
0
/*
 * Ctor.
 */
ListOfLineSegments::ListOfLineSegments(LayoutPkgNamespaces* layoutns)
 : ListOf(layoutns)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(layoutns->getURI());
}
Esempio n. 3
0
/*
 * Ctor.
 */
ListOfSpeciesReferenceGlyphs::ListOfSpeciesReferenceGlyphs(LayoutPkgNamespaces* layoutns)
 : ListOf(layoutns)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(layoutns->getURI());
}
/*
 * Ctor.
 */
ListOfGlobalRenderInformation::ListOfGlobalRenderInformation(RenderPkgNamespaces* renderns)
 : ListOf(renderns)
 , mVersionMajor(1)
 , mVersionMinor(0)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(renderns->getURI());
}
Esempio n. 5
0
/*
 * Creates a new Transformation2D object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
Transformation2D::Transformation2D (RenderPkgNamespaces* renderns):
    Transformation(renderns)
{
    this->updateMatrix2D();
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 6
0
/*
 * Creates a new RenderCubicBezier object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
RenderCubicBezier::RenderCubicBezier (RenderPkgNamespaces* renderns):
    RenderPoint(renderns)
{
    if (!hasValidLevelVersionNamespaceCombination())
        throw SBMLConstructorException();
    // set the element namespace of this object
    setElementNamespace(renderns->getURI());

    // connect child elements to this element.
    connectToChild();

    // load package extensions bound with this object (if any)
    loadPlugins(renderns);
}
Esempio n. 7
0
/*
 * Creates a new Style object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
Style::Style (RenderPkgNamespaces* renderns):
    SBase(renderns)
    ,mId("")
    ,mGroup(renderns) 
{
      // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
/*
 * Creates a new GlobalRenderInformation object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
GlobalRenderInformation::GlobalRenderInformation (RenderPkgNamespaces* renderns):
    RenderInformationBase(renderns), mListOfStyles(renderns)
{
    if (!hasValidLevelVersionNamespaceCombination())
        throw SBMLConstructorException();
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 9
0
/*
 * Constructor which creates a GlobalStyle with the given @p id
 * and all lists empty.
 *
 * @param id the new id for the GlobalStyle.
 *
 * This constructor is deprecated. The new libsbml API only has
 * constructors which take the SBML level and version or one that takes
 * an SBMLNamespaces object.
 */
GlobalStyle::GlobalStyle(RenderPkgNamespaces* renderns, const std::string& id):Style(renderns,id)
{
#ifdef DEPRECATION_WARNINGS
    std::cerr << "Warning. GlobalStyle::GlobalStyle(const std::string& id) is deprecated." << std::endl;
#endif // DEPRECATION_WARNINGS
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 10
0
/*
 * Constructor with id and values for the matrix.
 */
Transformation2D::Transformation2D(RenderPkgNamespaces* renderns, const double matrix[6]):Transformation(renderns)
{
#ifdef DEPRECATION_WARNINGS
    std::cerr << "Warning. Transformation2D::Transformation2D(const double matrix[6]) is deprecated." << std::endl;
#endif // DEPRECATION_WARNINGS
    this->setMatrix2D(matrix);
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 11
0
/*
 * Creates a new point with the given ccordinates.
 *
 * @param x x coordinate of the RenderPoint object
 * @param y y coordinate of the RenderPoint object
 * @param z z coordinate of the RenderPoint object
 * If the z value is omitted, it is set to 0.
 */ 
RenderPoint::RenderPoint(RenderPkgNamespaces* renderns, const RelAbsVector& x, const RelAbsVector& y, const RelAbsVector& z) :
    SBase  (renderns)
    , mXOffset(x)
    , mYOffset(y)
    , mZOffset(z)
    , mElementName("element")  
{
      // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 12
0
/*
 * Creates a curve with the given LayoutPkgNamespaces and an empty list of segments.
 */ 
Curve::Curve (LayoutPkgNamespaces *layoutns)
 : SBase (layoutns)
  ,mCurveSegments(layoutns)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(layoutns->getURI());

  connectToChild();

  //
  // load package extensions bound with this object (if any) 
  //
  loadPlugins(layoutns);
}
Esempio n. 13
0
/*
 * Creates a new RenderCurve object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
RenderCurve::RenderCurve (RenderPkgNamespaces* renderns):
    GraphicalPrimitive1D(renderns)
    ,mStartHead("")
    ,mEndHead("")
    ,mListOfElements(renderns)
{
    if (!hasValidLevelVersionNamespaceCombination())
        throw SBMLConstructorException();
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 14
0
/*
 * Creates a CubicBezier with the given points.
 *
 * @param bp1_x x coordinatee of the first base point.
 * @param bp1_y y coordinatee of the first base point.
 * @param bp1_z z coordinatee of the first base point.
 * @param bp1_x x coordinatee of the second base point.
 * @param bp1_y y coordinatee of the second base point.
 * @param bp1_z z coordinatee of the second base point.
 * @param bp1_x x coordinatee of the end point.
 * @param bp1_y y coordinatee of the end point.
 * @param bp1_z z coordinatee of the end point.
 */
RenderCubicBezier::RenderCubicBezier (RenderPkgNamespaces* renderns, const RelAbsVector& bp1_x,const RelAbsVector& bp1_y,const RelAbsVector& bp1_z,const RelAbsVector& bp2_x,const RelAbsVector& bp2_y,const RelAbsVector& bp2_z,const RelAbsVector& end_x,const RelAbsVector& end_y,const RelAbsVector& end_z):RenderPoint(renderns, end_x,end_y,end_z),
    mBasePoint1_X(bp1_x),
    mBasePoint1_Y(bp1_y),
    mBasePoint1_Z(bp1_z),
    mBasePoint2_X(bp2_x),
    mBasePoint2_Y(bp2_y),
    mBasePoint2_Z(bp2_z)
{
    // set the element namespace of this object
    setElementNamespace(renderns->getURI());

    // connect child elements to this element.
    connectToChild();

    // load package extensions bound with this object (if any)
    loadPlugins(renderns);
}
Esempio n. 15
0
/*
 * Instantiates an empty curve object with the given @p id.
 * The decorations  are unset and there are no curve elements.
 *
 * This constructor is deprecated. The new libsbml API only has
 * constructors which take the SBML level and version or one that takes
 * an SBMLNamespaces object.
 */
RenderCurve::RenderCurve(RenderPkgNamespaces* renderns, const std::string& id)
  : GraphicalPrimitive1D(renderns, id)
  , mStartHead("")
  , mEndHead("")
  , mListOfElements(renderns)
{
#ifdef DEPRECATION_WARNINGS
    std::cerr << "Warning. RenderCurve::RenderCurve(const std::string& id) is deprecated." << std::endl;
#endif // DEPRECATION_WARNINGS
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 16
0
/*
 * Creates a new RenderPoint object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
RenderPoint::RenderPoint (RenderPkgNamespaces* renderns):
    SBase(renderns)
    ,mXOffset(RelAbsVector(0.0,0.0))
    ,mYOffset(RelAbsVector(0.0,0.0))
    ,mZOffset(RelAbsVector(0.0,0.0))
    ,mElementName("element")
{
    if (!hasValidLevelVersionNamespaceCombination())
        throw SBMLConstructorException();
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
Esempio n. 17
0
/*
 * Constructor set position and dimensions to (0.0,0.0,0.0) and the id to a
 * copy of the given string.
 */ 
BoundingBox::BoundingBox (LayoutPkgNamespaces* layoutns, const std::string id)
 : 
  SBase(layoutns)
 ,mId (id)
 ,mPosition(layoutns)
 ,mDimensions(layoutns)
  ,mPositionExplicitlySet (false)
  ,mDimensionsExplicitlySet (false)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(layoutns->getURI());

  mPosition.setElementName("position");

  connectToChild();
  loadPlugins(layoutns);
}
/*
 * Creates a new ColorDefinition object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
ColorDefinition::ColorDefinition (RenderPkgNamespaces* renderns) :
    SBase(renderns)
    ,mId("")
    ,mRed(0)
    ,mGreen(0)
    ,mBlue(0)
    ,mAlpha(255)
{
  if (!hasValidLevelVersionNamespaceCombination())
    throw SBMLConstructorException();

    // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
 }
Esempio n. 19
0
/**
 * Creates a new line segment with the given LayoutPkgNamespaces
 */ 
LineSegment::LineSegment (LayoutPkgNamespaces* layoutns)
 : SBase (layoutns)
 , mStartPoint(layoutns)
 , mEndPoint (layoutns)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(layoutns->getURI());

  this->mStartPoint.setElementName("start");
  this->mEndPoint.setElementName("end");

  connectToChild();

  //
  // load package extensions bound with this object (if any) 
  //
  loadPlugins(layoutns);
}
Esempio n. 20
0
BoundingBox::BoundingBox(LayoutPkgNamespaces* layoutns)
 : SBase(layoutns)
  ,mPosition(layoutns)
  ,mDimensions(layoutns)
  ,mPositionExplicitlySet (false)
  ,mDimensionsExplicitlySet (false)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(layoutns->getURI());

  mPosition.setElementName("position");

  connectToChild();

  //
  // load package extensions bound with this object (if any) 
  //
  loadPlugins(layoutns);
}
/*
 * Constructor which sets the ColorDefinition to the given RGBA values.
 *
 * @param r Red component value. Has to be in the range of 0 to 255.
 * @param g Green component value. Has to be in the range of 0 to 255.
 * @param b Blue component value. Has to be in the range of 0 to 255.
 * @param a Alpha component value. Has to be in the range of 0 to 255. 
 * The alpha component can be omitted. In that case it has a default value of 255.
 *
 * This constructor is deprecated. The new libsbml API only has
 * constructors which take the SBML level and version or one that takes
 * an SBMLNamespaces object.
 */
ColorDefinition::ColorDefinition(RenderPkgNamespaces* renderns, unsigned char r,unsigned char g,unsigned char b,unsigned char a)
   :SBase(renderns)
    ,mId()
    ,mRed(r)
    ,mGreen(g)
    ,mBlue(b)
    ,mAlpha(a)
{

  // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);

#ifdef DEPRECATION_WARNINGS
    std::cerr << "Warning. ColorDefinition::ColorDefinition(unsigned char r,unsigned char g,unsigned char b,unsigned char a) is deprecated." << std::endl;
#endif // DEPRECATION_WARNINGS
}
Esempio n. 22
0
/*
 * Constructor which sets the id, the coordinates and the dimensions to the
 * given 2D values.
 */ 
BoundingBox::BoundingBox (LayoutPkgNamespaces* layoutns, const std::string id,
                          double x, double y, double width, double height)
  : SBase     (layoutns)
  , mId (id)
  , mPosition  (layoutns, x, y, 0.0)
  , mDimensions(layoutns, width, height, 0.0)
  ,mPositionExplicitlySet (true)
  ,mDimensionsExplicitlySet (true)
{
  //
  // set the element namespace of this object
  //
  setElementNamespace(layoutns->getURI());

  mPosition.setElementName("position");

  connectToChild();
  //
  // load package extensions bound with this object (if any) 
  //
  loadPlugins(layoutns);
}
Esempio n. 23
0
/*
 * Creates a new Text object with the given SBMLNamespaces.
 *
 * @param sbmlns The SBML namespace for the object.
 */
Text::Text (RenderPkgNamespaces* renderns)
  : GraphicalPrimitive1D(renderns)
  , mX(RelAbsVector(0.0,0.0))
  , mY(RelAbsVector(0.0,0.0))
  , mZ(RelAbsVector(0.0,0.0))
  , mFontFamily("")
  , mFontSize(RelAbsVector(std::numeric_limits<double>::quiet_NaN(),std::numeric_limits<double>::quiet_NaN()))
  , mFontWeight(Text::WEIGHT_UNSET)
  , mFontStyle(Text::STYLE_UNSET)
  , mTextAnchor(Text::ANCHOR_UNSET)
  , mVTextAnchor(Text::ANCHOR_UNSET)
  , mText("")
{
    if (!hasValidLevelVersionNamespaceCombination())
        throw SBMLConstructorException();
        // set the element namespace of this object
  setElementNamespace(renderns->getURI());

  // connect child elements to this element.
  connectToChild();

  // load package extensions bound with this object (if any) 
  loadPlugins(renderns);
}
/*
 * Ctor.
 */
ListOfColorDefinitions::ListOfColorDefinitions(RenderPkgNamespaces* renderns) 
  : ListOf(renderns)
{
   setElementNamespace(renderns->getURI());
}