ome-xml  5.5.0
Shape.h
1 /*
2  * #%L
3  * OME-XML C++ library for working with OME-XML metadata structures.
4  * %%
5  * Copyright © 2006 - 2016 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 
61 #include <ome/xml/model/primitives/Quantity.h>
62 
63 #include <ome/xml/model/AffineTransform.h>
64 #include <ome/xml/model/Union.h>
65 #include <ome/xml/model/detail/OMEModelObject.h>
66 #include <ome/xml/model/enums/FillRule.h>
67 #include <ome/xml/model/enums/FontFamily.h>
68 #include <ome/xml/model/enums/FontStyle.h>
69 #include <ome/xml/model/enums/UnitsLength.h>
70 #include <ome/xml/model/primitives/Color.h>
71 #include <ome/xml/model/primitives/NonNegativeInteger.h>
72 
73 namespace ome
74 {
75  namespace xml
76  {
77  namespace model
78  {
79 
80  // Forward declarations.
81  class Annotation;
82  class OMEModel;
83 
88  {
89  private:
90  class Impl;
92  std::shared_ptr<Impl> impl;
93 
94  public:
96  Shape();
97 
103  Shape (const Shape& copy);
104 
106  virtual
107  ~Shape ();
108 
109  // Documented in superclass.
110  bool
111  validElementName(const std::string& name) const;
112 
113  private:
115  Shape&
116  operator= (const Shape&);
117 
118  public:
119  // -- OMEModelObject API methods --
120 
122  virtual void
123  update(const common::xml::dom::Element& element,
125 
126  public:
127  // -- Shape API methods --
128 
130  bool
131  link (std::shared_ptr<Reference>& reference,
132  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
133 
139  std::shared_ptr<std::string>
141 
147  const std::shared_ptr<std::string>
148  getStrokeDashArray () const;
149 
155  void
156  setStrokeDashArray (std::shared_ptr<std::string>& strokeDashArray);
157 
163  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
164  getStrokeWidth ();
165 
171  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
172  getStrokeWidth () const;
173 
179  void
181 
187  std::shared_ptr<bool>
188  getLocked ();
189 
195  const std::shared_ptr<bool>
196  getLocked () const;
197 
203  void
204  setLocked (std::shared_ptr<bool>& locked);
205 
211  std::shared_ptr<ome::xml::model::enums::FillRule>
212  getFillRule ();
213 
219  const std::shared_ptr<ome::xml::model::enums::FillRule>
220  getFillRule () const;
221 
227  void
228  setFillRule (std::shared_ptr<ome::xml::model::enums::FillRule>& fillRule);
229 
235  std::shared_ptr<std::string>
236  getText ();
237 
243  const std::shared_ptr<std::string>
244  getText () const;
245 
251  void
252  setText (std::shared_ptr<std::string>& text);
253 
259  std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
260  getTheC ();
261 
267  const std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
268  getTheC () const;
269 
275  void
276  setTheC (std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theC);
277 
283  std::shared_ptr<ome::xml::model::enums::FontFamily>
284  getFontFamily ();
285 
291  const std::shared_ptr<ome::xml::model::enums::FontFamily>
292  getFontFamily () const;
293 
299  void
300  setFontFamily (std::shared_ptr<ome::xml::model::enums::FontFamily>& fontFamily);
301 
307  std::shared_ptr<ome::xml::model::enums::FontStyle>
308  getFontStyle ();
309 
315  const std::shared_ptr<ome::xml::model::enums::FontStyle>
316  getFontStyle () const;
317 
323  void
324  setFontStyle (std::shared_ptr<ome::xml::model::enums::FontStyle>& fontStyle);
325 
331  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > >&
332  getFontSize ();
333 
339  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > >&
340  getFontSize () const;
341 
347  void
349 
355  std::shared_ptr<ome::xml::model::primitives::Color>
356  getFillColor ();
357 
363  const std::shared_ptr<ome::xml::model::primitives::Color>
364  getFillColor () const;
365 
371  void
372  setFillColor (std::shared_ptr<ome::xml::model::primitives::Color>& fillColor);
373 
379  std::shared_ptr<ome::xml::model::primitives::Color>
380  getStrokeColor ();
381 
387  const std::shared_ptr<ome::xml::model::primitives::Color>
388  getStrokeColor () const;
389 
395  void
396  setStrokeColor (std::shared_ptr<ome::xml::model::primitives::Color>& strokeColor);
397 
403  std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
404  getTheT ();
405 
411  const std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
412  getTheT () const;
413 
419  void
420  setTheT (std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theT);
421 
427  const std::string&
428  getID () const;
429 
435  void
436  setID (const std::string& id);
437 
443  std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
444  getTheZ ();
445 
451  const std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
452  getTheZ () const;
453 
459  void
460  setTheZ (std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theZ);
461 
467  std::shared_ptr<ome::xml::model::AffineTransform>
468  getTransform ();
469 
475  const std::shared_ptr<ome::xml::model::AffineTransform>
476  getTransform () const;
477 
483  void
484  setTransform (std::shared_ptr<ome::xml::model::AffineTransform>& transform);
485 
493 
500  getLinkedAnnotationList () const;
501 
509  const std::weak_ptr<ome::xml::model::Annotation>&
511 
522  const std::weak_ptr<ome::xml::model::Annotation>&
524  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
525 
536  bool
537  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
538 
554  bool
555  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
556 
562  std::weak_ptr<ome::xml::model::Union>
563  getUnion ();
564 
570  const std::weak_ptr<ome::xml::model::Union>
571  getUnion () const;
572 
578  void
579  setUnion (std::weak_ptr<ome::xml::model::Union>& union_BackReference);
580 
586  virtual const std::string&
587  getShapeType() const = 0;
588 
589  protected:
590  // Documented in base class.
591  virtual void
593  common::xml::dom::Element& element) const;
594 
595  public:
596  // Documented in superclass.
597  const std::string&
598  getXMLNamespace() const;
599  };
600 
601  }
602  }
603 }
604 
605 #endif // OME_XML_MODEL_SHAPE_H
606 
607 /*
608  * Local Variables:
609  * mode:C++
610  * End:
611  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > > & getFontSize()
Get the FontSize property.
Definition: Shape.cpp:631
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Shape.cpp:1033
void setFontFamily(std::shared_ptr< ome::xml::model::enums::FontFamily > &fontFamily)
Set the FontFamily property.
Definition: Shape.cpp:603
std::shared_ptr< ome::xml::model::primitives::Color > getStrokeColor()
Get the StrokeColor property.
Definition: Shape.cpp:673
void setStrokeDashArray(std::shared_ptr< std::string > &strokeDashArray)
Set the StrokeDashArray property.
Definition: Shape.cpp:477
void setFillColor(std::shared_ptr< ome::xml::model::primitives::Color > &fillColor)
Set the FillColor property.
Definition: Shape.cpp:666
Shape & operator=(const Shape &)
Assignment operator (deleted).
virtual void 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:852
void setTheZ(std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theZ)
Set the TheZ property.
Definition: Shape.cpp:743
void setFontSize(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > > &fontSize)
Set the FontSize property.
Definition: Shape.cpp:645
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Shape.cpp:813
boost::multi_index_container< Ptr< T >, boost::multi_index::indexed_by< boost::multi_index::random_access<>, boost::multi_index::ordered_unique< boost::multi_index::identity< Ptr< T > >, std::owner_less< Ptr< T > > > > > type
Multi-index container type.
Definition: OMEModelObject.h:93
std::shared_ptr< ome::xml::model::enums::FontFamily > getFontFamily()
Get the FontFamily property.
Definition: Shape.cpp:589
void setTheC(std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theC)
Set the TheC property.
Definition: Shape.cpp:582
void setTheT(std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theT)
Set the TheT property.
Definition: Shape.cpp:708
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Shape.cpp:249
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:255
void setText(std::shared_ptr< std::string > &text)
Set the Text property.
Definition: Shape.cpp:561
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setID(const std::string &id)
Set the ID property.
Definition: Shape.cpp:722
virtual const std::string & getShapeType() const =0
Get the Shape type.
std::shared_ptr< ome::xml::model::primitives::Color > getFillColor()
Get the FillColor property.
Definition: Shape.cpp:652
std::shared_ptr< bool > getLocked()
Get the Locked property.
Definition: Shape.cpp:505
const std::weak_ptr< ome::xml::model::Annotation > & getLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type index) const
Get linked Annotation.
Definition: Shape.cpp:783
bool link(std::shared_ptr< Reference > &reference, std::shared_ptr< ome::xml::model::OMEModelObject > &object)
Link a given OME model object to this model object.
Definition: Shape.cpp:432
void setStrokeWidth(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > &strokeWidth)
Set the StrokeWidth property.
Definition: Shape.cpp:498
void setUnion(std::weak_ptr< ome::xml::model::Union > &union_BackReference)
Set the Union property.
Definition: Shape.cpp:845
void setFillRule(std::shared_ptr< ome::xml::model::enums::FillRule > &fillRule)
Set the FillRule property.
Definition: Shape.cpp:540
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheZ()
Get the TheZ property.
Definition: Shape.cpp:729
std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheC()
Get the TheC property.
Definition: Shape.cpp:568
Open Microscopy Environment C++ implementation.
std::shared_ptr< ome::xml::model::enums::FontStyle > getFontStyle()
Get the FontStyle property.
Definition: Shape.cpp:610
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Shape.cpp:799
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Shape.h:90
void transform(const std::string &target_schema, const Input &input, Output &output, ome::common::xml::EntityResolver &entity_resolver, OMETransformResolver &transform_resolver)
Transform OME-XML to a different model schema version.
Definition: OMETransform.h:99
void setTransform(std::shared_ptr< ome::xml::model::AffineTransform > &transform)
Set the Transform property.
Definition: Shape.cpp:764
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > & getStrokeWidth()
Get the StrokeWidth property.
Definition: Shape.cpp:484
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Shape.cpp:777
const std::string & getID() const
Get the ID property.
Definition: Shape.cpp:715
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Shape.cpp:771
Shape model object.
Definition: Shape.h:87
Shape()
Default constructor.
Definition: Shape.cpp:229
std::shared_ptr< std::string > getText()
Get the Text property.
Definition: Shape.cpp:547
std::weak_ptr< ome::xml::model::Union > getUnion()
Get the Union property.
Definition: Shape.cpp:831
Private implementation details of Shape model object.
Definition: Shape.cpp:78
void setFontStyle(std::shared_ptr< ome::xml::model::enums::FontStyle > &fontStyle)
Set the FontStyle property.
Definition: Shape.cpp:624
A quantity of a defined unit.
Definition: Quantity.h:57
virtual ~Shape()
Destructor.
Definition: Shape.cpp:244
const std::weak_ptr< ome::xml::model::Annotation > & setLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Set linked Annotation.
Definition: Shape.cpp:789
void setLocked(std::shared_ptr< bool > &locked)
Set the Locked property.
Definition: Shape.cpp:519
void setStrokeColor(std::shared_ptr< ome::xml::model::primitives::Color > &strokeColor)
Set the StrokeColor property.
Definition: Shape.cpp:687
std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheT()
Get the TheT property.
Definition: Shape.cpp:694
std::shared_ptr< std::string > getStrokeDashArray()
Get the StrokeDashArray property.
Definition: Shape.cpp:463
std::shared_ptr< ome::xml::model::enums::FillRule > getFillRule()
Get the FillRule property.
Definition: Shape.cpp:526
std::shared_ptr< ome::xml::model::AffineTransform > getTransform()
Get the Transform property.
Definition: Shape.cpp:750