bioformats  5.1.3
Shape.h
1 /*
2  * #%L
3  * OME-XML C++ library for working with OME-XML metadata structures.
4  * %%
5  * Copyright © 2006 - 2015 Open Microscopy Environment:
6  * - Massachusetts Institute of Technology
7  * - National Institutes of Health
8  * - University of Dundee
9  * - Board of Regents of the University of Wisconsin-Madison
10  * - Glencoe Software, Inc.
11  * %%
12  * Redistribution and use in source and binary forms, with or without
13  * modification, are permitted provided that the following conditions are met:
14  *
15  * 1. Redistributions of source code must retain the above copyright notice,
16  * this list of conditions and the following disclaimer.
17  * 2. Redistributions in binary form must reproduce the above copyright notice,
18  * this list of conditions and the following disclaimer in the documentation
19  * and/or other materials provided with the distribution.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * The views and conclusions contained in the software and documentation are
34  * those of the authors and should not be interpreted as representing official
35  * policies, either expressed or implied, of any organization.
36  * #L%
37  */
38 
39 /*─────────────────────────────────────────────────────────────────────────────
40  *
41  * THIS IS AUTOMATICALLY GENERATED CODE. DO NOT MODIFY.
42  *
43  *─────────────────────────────────────────────────────────────────────────────
44  */
45 
46 #ifndef OME_XML_MODEL_SHAPE_H
47 #define OME_XML_MODEL_SHAPE_H
48 
49 #include <algorithm>
50 #include <list>
51 #include <stdexcept>
52 #include <string>
53 #include <vector>
54 
55 #include <ome/common/log.h>
56 
57 #include <ome/common/xml/dom/Document.h>
58 #include <ome/common/xml/dom/Element.h>
59 #include <ome/common/xml/dom/Node.h>
60 #include <ome/common/xml/dom/NodeList.h>
61 
62 #include <ome/xml/model/AffineTransform.h>
63 #include <ome/xml/model/Union.h>
64 #include <ome/xml/model/detail/OMEModelObject.h>
65 #include <ome/xml/model/enums/FillRule.h>
66 #include <ome/xml/model/enums/FontFamily.h>
67 #include <ome/xml/model/enums/FontStyle.h>
68 #include <ome/xml/model/enums/LineCap.h>
69 #include <ome/xml/model/primitives/Color.h>
70 #include <ome/xml/model/primitives/NonNegativeInteger.h>
71 
72 namespace ome
73 {
74  namespace xml
75  {
76  namespace model
77  {
78 
79  // Forward declarations.
80  class OMEModel;
81 
86  {
87  private:
89  ome::compat::shared_ptr<std::string> strokeDashArray;
91  ome::compat::shared_ptr<double> strokeWidth;
93  ome::compat::shared_ptr<bool> locked;
95  ome::compat::shared_ptr<ome::xml::model::enums::FillRule> fillRule;
97  ome::compat::shared_ptr<bool> visible;
99  ome::compat::shared_ptr<ome::xml::model::enums::LineCap> lineCap;
101  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger> theC;
103  ome::compat::shared_ptr<ome::xml::model::enums::FontFamily> fontFamily;
105  ome::compat::shared_ptr<ome::xml::model::enums::FontStyle> fontStyle;
107  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger> fontSize;
109  ome::compat::shared_ptr<ome::xml::model::primitives::Color> fillColor;
111  ome::compat::shared_ptr<std::string> text;
113  ome::compat::shared_ptr<ome::xml::model::primitives::Color> strokeColor;
115  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger> theT;
117  std::string id;
119  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger> theZ;
129  ome::compat::shared_ptr<ome::xml::model::AffineTransform> transform;
131  ome::compat::weak_ptr<ome::xml::model::Union> union_;
132 
133  public:
135  Shape ();
136 
142  Shape (const Shape& copy);
143 
145  virtual
146  ~Shape ();
147 
148 
149 
150  // Documented in superclass.
151  bool
152  validElementName(const std::string& name) const;
153 
154 
155  // -- OMEModelObject API methods --
156 
158  virtual void
159  update(const common::xml::dom::Element& element,
161 
162  public:
163  // -- Shape API methods --
164 
166  bool
167  link (ome::compat::shared_ptr<Reference>& reference,
168  ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
169 
175  ome::compat::shared_ptr<std::string>
177 
183  const ome::compat::shared_ptr<std::string>
184  getStrokeDashArray () const;
185 
191  void
192  setStrokeDashArray (ome::compat::shared_ptr<std::string>& strokeDashArray);
193 
199  ome::compat::shared_ptr<double>
200  getStrokeWidth ();
201 
207  const ome::compat::shared_ptr<double>
208  getStrokeWidth () const;
209 
215  void
216  setStrokeWidth (ome::compat::shared_ptr<double>& strokeWidth);
217 
223  ome::compat::shared_ptr<bool>
224  getLocked ();
225 
231  const ome::compat::shared_ptr<bool>
232  getLocked () const;
233 
239  void
240  setLocked (ome::compat::shared_ptr<bool>& locked);
241 
247  ome::compat::shared_ptr<ome::xml::model::enums::FillRule>
248  getFillRule ();
249 
255  const ome::compat::shared_ptr<ome::xml::model::enums::FillRule>
256  getFillRule () const;
257 
263  void
264  setFillRule (ome::compat::shared_ptr<ome::xml::model::enums::FillRule>& fillRule);
265 
271  ome::compat::shared_ptr<bool>
272  getVisible ();
273 
279  const ome::compat::shared_ptr<bool>
280  getVisible () const;
281 
287  void
288  setVisible (ome::compat::shared_ptr<bool>& visible);
289 
295  ome::compat::shared_ptr<ome::xml::model::enums::LineCap>
296  getLineCap ();
297 
303  const ome::compat::shared_ptr<ome::xml::model::enums::LineCap>
304  getLineCap () const;
305 
311  void
312  setLineCap (ome::compat::shared_ptr<ome::xml::model::enums::LineCap>& lineCap);
313 
319  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
320  getTheC ();
321 
327  const ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
328  getTheC () const;
329 
335  void
336  setTheC (ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theC);
337 
343  ome::compat::shared_ptr<ome::xml::model::enums::FontFamily>
344  getFontFamily ();
345 
351  const ome::compat::shared_ptr<ome::xml::model::enums::FontFamily>
352  getFontFamily () const;
353 
359  void
360  setFontFamily (ome::compat::shared_ptr<ome::xml::model::enums::FontFamily>& fontFamily);
361 
367  ome::compat::shared_ptr<ome::xml::model::enums::FontStyle>
368  getFontStyle ();
369 
375  const ome::compat::shared_ptr<ome::xml::model::enums::FontStyle>
376  getFontStyle () const;
377 
383  void
384  setFontStyle (ome::compat::shared_ptr<ome::xml::model::enums::FontStyle>& fontStyle);
385 
391  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
392  getFontSize ();
393 
399  const ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
400  getFontSize () const;
401 
407  void
408  setFontSize (ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& fontSize);
409 
415  ome::compat::shared_ptr<ome::xml::model::primitives::Color>
416  getFillColor ();
417 
423  const ome::compat::shared_ptr<ome::xml::model::primitives::Color>
424  getFillColor () const;
425 
431  void
432  setFillColor (ome::compat::shared_ptr<ome::xml::model::primitives::Color>& fillColor);
433 
439  ome::compat::shared_ptr<std::string>
440  getText ();
441 
447  const ome::compat::shared_ptr<std::string>
448  getText () const;
449 
455  void
456  setText (ome::compat::shared_ptr<std::string>& text);
457 
463  ome::compat::shared_ptr<ome::xml::model::primitives::Color>
464  getStrokeColor ();
465 
471  const ome::compat::shared_ptr<ome::xml::model::primitives::Color>
472  getStrokeColor () const;
473 
479  void
480  setStrokeColor (ome::compat::shared_ptr<ome::xml::model::primitives::Color>& strokeColor);
481 
487  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
488  getTheT ();
489 
495  const ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
496  getTheT () const;
497 
503  void
504  setTheT (ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theT);
505 
511  const std::string&
512  getID () const;
513 
519  void
520  setID (const std::string& id);
521 
527  ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
528  getTheZ ();
529 
535  const ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
536  getTheZ () const;
537 
543  void
544  setTheZ (ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theZ);
545 
546 
547 
548 
549 
550 
551 
552 
553 
559  ome::compat::shared_ptr<ome::xml::model::AffineTransform>
560  getTransform ();
561 
567  const ome::compat::shared_ptr<ome::xml::model::AffineTransform>
568  getTransform () const;
569 
575  void
576  setTransform (ome::compat::shared_ptr<ome::xml::model::AffineTransform>& transform);
577 
583  ome::compat::weak_ptr<ome::xml::model::Union>
584  getUnion ();
585 
591  const ome::compat::weak_ptr<ome::xml::model::Union>
592  getUnion () const;
593 
599  void
600  setUnion (ome::compat::weak_ptr<ome::xml::model::Union>& union_BackReference);
601 
607  virtual const std::string&
608  getShapeType() const = 0;
609 
610 
611  protected:
612  // Documented in base class.
615  common::xml::dom::Element& element) const;
616 
617  public:
618  // Documented in superclass.
619  const std::string&
620  getXMLNamespace() const;
621  };
622 
623  }
624  }
625 }
626 
627 #endif // OME_XML_MODEL_SHAPE_H
628 
629 /*
630  * Local Variables:
631  * mode:C++
632  * End:
633  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
ome::compat::shared_ptr< ome::xml::model::enums::LineCap > getLineCap()
Get the LineCap property.
Definition: Shape.cpp:596
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheZ()
Get the TheZ property.
Definition: Shape.cpp:799
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > theZ
TheZ property.
Definition: Shape.h:119
ome::compat::shared_ptr< ome::xml::model::enums::FontStyle > getFontStyle()
Get the FontStyle property.
Definition: Shape.cpp:659
ome::compat::shared_ptr< std::string > strokeDashArray
StrokeDashArray property.
Definition: Shape.h:89
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > theC
TheC property.
Definition: Shape.h:101
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Shape.cpp:1082
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > theT
TheT property.
Definition: Shape.h:115
void setLocked(ome::compat::shared_ptr< bool > &locked)
Set the Locked property.
Definition: Shape.cpp:547
void setUnion(ome::compat::weak_ptr< ome::xml::model::Union > &union_BackReference)
Set the Union property.
Definition: Shape.cpp:863
void setTheC(ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theC)
Set the TheC property.
Definition: Shape.cpp:631
ome::compat::shared_ptr< ome::xml::model::AffineTransform > getTransform()
Get the Transform property.
Definition: Shape.cpp:828
void setFontFamily(ome::compat::shared_ptr< ome::xml::model::enums::FontFamily > &fontFamily)
Set the FontFamily property.
Definition: Shape.cpp:652
ome::compat::shared_ptr< ome::xml::model::enums::FillRule > fillRule
FillRule property.
Definition: Shape.h:95
DOM Document wrapper.
Definition: Document.h:82
DOM Element wrapper.
Definition: Element.h:66
virtual void update(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Update the object hierarchy recursively from an XML DOM tree.
Definition: Shape.cpp:232
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
ome::compat::shared_ptr< double > getStrokeWidth()
Get the StrokeWidth property.
Definition: Shape.cpp:512
void setID(const std::string &id)
Set the ID property.
Definition: Shape.cpp:792
virtual const std::string & getShapeType() const =0
Get the Shape type.
ome::compat::shared_ptr< ome::xml::model::enums::LineCap > lineCap
LineCap property.
Definition: Shape.h:99
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheC()
Get the TheC property.
Definition: Shape.cpp:617
void setTransform(ome::compat::shared_ptr< ome::xml::model::AffineTransform > &transform)
Set the Transform property.
Definition: Shape.cpp:842
ome::compat::shared_ptr< bool > locked
Locked property.
Definition: Shape.h:93
void setVisible(ome::compat::shared_ptr< bool > &visible)
Set the Visible property.
Definition: Shape.cpp:589
void setStrokeColor(ome::compat::shared_ptr< ome::xml::model::primitives::Color > &strokeColor)
Set the StrokeColor property.
Definition: Shape.cpp:757
ome::compat::shared_ptr< ome::xml::model::enums::FontStyle > fontStyle
FontStyle property.
Definition: Shape.h:105
void setFontSize(ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &fontSize)
Set the FontSize property.
Definition: Shape.cpp:694
bool link(ome::compat::shared_ptr< Reference > &reference, ome::compat::shared_ptr< ome::xml::model::OMEModelObject > &object)
Link a given OME model object to this model object.
Definition: Shape.cpp:476
ome::compat::shared_ptr< ome::xml::model::enums::FillRule > getFillRule()
Get the FillRule property.
Definition: Shape.cpp:554
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
ome::compat::shared_ptr< std::string > getStrokeDashArray()
Get the StrokeDashArray property.
Definition: Shape.cpp:491
ome::compat::shared_ptr< ome::xml::model::primitives::Color > getFillColor()
Get the FillColor property.
Definition: Shape.cpp:701
ome::compat::shared_ptr< bool > visible
Visible property.
Definition: Shape.h:97
void setStrokeDashArray(ome::compat::shared_ptr< std::string > &strokeDashArray)
Set the StrokeDashArray property.
Definition: Shape.cpp:505
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getFontSize()
Get the FontSize property.
Definition: Shape.cpp:680
void setText(ome::compat::shared_ptr< std::string > &text)
Set the Text property.
Definition: Shape.cpp:736
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > fontSize
FontSize property.
Definition: Shape.h:107
void setTheT(ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theT)
Set the TheT property.
Definition: Shape.cpp:778
virtual common::xml::dom::Element asXMLElementInternal(common::xml::dom::Document &document, common::xml::dom::Element &element) const
Transform the object hierarchy rooted at this element to XML.
Definition: Shape.cpp:870
void setFontStyle(ome::compat::shared_ptr< ome::xml::model::enums::FontStyle > &fontStyle)
Set the FontStyle property.
Definition: Shape.cpp:673
ome::compat::shared_ptr< std::string > text
Text property.
Definition: Shape.h:111
ome::compat::shared_ptr< bool > getVisible()
Get the Visible property.
Definition: Shape.cpp:575
ome::compat::weak_ptr< ome::xml::model::Union > union_
Union_BackReference back reference.
Definition: Shape.h:131
ome::compat::shared_ptr< bool > getLocked()
Get the Locked property.
Definition: Shape.cpp:533
void setLineCap(ome::compat::shared_ptr< ome::xml::model::enums::LineCap > &lineCap)
Set the LineCap property.
Definition: Shape.cpp:610
Shape model object.
Definition: Shape.h:85
Shape()
Default constructor.
Definition: Shape.cpp:164
void setTheZ(ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theZ)
Set the TheZ property.
Definition: Shape.cpp:813
ome::compat::shared_ptr< ome::xml::model::primitives::Color > strokeColor
StrokeColor property.
Definition: Shape.h:113
void setStrokeWidth(ome::compat::shared_ptr< double > &strokeWidth)
Set the StrokeWidth property.
Definition: Shape.cpp:526
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheT()
Get the TheT property.
Definition: Shape.cpp:764
virtual ~Shape()
Destructor.
Definition: Shape.cpp:217
ome::compat::shared_ptr< std::string > getText()
Get the Text property.
Definition: Shape.cpp:722
ome::compat::weak_ptr< ome::xml::model::Union > getUnion()
Get the Union property.
Definition: Shape.cpp:849
ome::compat::shared_ptr< ome::xml::model::primitives::Color > fillColor
FillColor property.
Definition: Shape.h:109
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Shape.cpp:223
ome::compat::shared_ptr< double > strokeWidth
StrokeWidth property.
Definition: Shape.h:91
void setFillRule(ome::compat::shared_ptr< ome::xml::model::enums::FillRule > &fillRule)
Set the FillRule property.
Definition: Shape.cpp:568
const std::string & getID() const
Get the ID property.
Definition: Shape.cpp:785
std::string id
ID property.
Definition: Shape.h:117
ome::compat::shared_ptr< ome::xml::model::enums::FontFamily > fontFamily
FontFamily property.
Definition: Shape.h:103
Boost.Log compatibility.
ome::compat::shared_ptr< ome::xml::model::enums::FontFamily > getFontFamily()
Get the FontFamily property.
Definition: Shape.cpp:638
ome::compat::shared_ptr< ome::xml::model::AffineTransform > transform
*** WARNING *** Unhandled or skipped property Line *** WARNING *** Unhandled or skipped property Rect...
Definition: Shape.h:129
Xerces-C modern C++ wrapper.
Definition: Base.h:53
ome::compat::shared_ptr< ome::xml::model::primitives::Color > getStrokeColor()
Get the StrokeColor property.
Definition: Shape.cpp:743
void setFillColor(ome::compat::shared_ptr< ome::xml::model::primitives::Color > &fillColor)
Set the FillColor property.
Definition: Shape.cpp:715