ome-xml  5.6.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 
114  Shape&
115  operator= (const Shape&) = delete;
117 
118  // -- OMEModelObject API methods --
119 
121  virtual void
122  update(const common::xml::dom::Element& element,
124 
125  public:
126  // -- Shape API methods --
127 
129  bool
130  link (std::shared_ptr<Reference>& reference,
131  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
132 
138  std::shared_ptr<std::string>
140 
146  const std::shared_ptr<std::string>
147  getStrokeDashArray () const;
148 
154  void
155  setStrokeDashArray (std::shared_ptr<std::string>& strokeDashArray);
156 
162  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
163  getStrokeWidth ();
164 
170  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
171  getStrokeWidth () const;
172 
178  void
180 
186  std::shared_ptr<bool>
187  getLocked ();
188 
194  const std::shared_ptr<bool>
195  getLocked () const;
196 
202  void
203  setLocked (std::shared_ptr<bool>& locked);
204 
210  std::shared_ptr<ome::xml::model::enums::FillRule>
211  getFillRule ();
212 
218  const std::shared_ptr<ome::xml::model::enums::FillRule>
219  getFillRule () const;
220 
226  void
227  setFillRule (std::shared_ptr<ome::xml::model::enums::FillRule>& fillRule);
228 
234  std::shared_ptr<std::string>
235  getText ();
236 
242  const std::shared_ptr<std::string>
243  getText () const;
244 
250  void
251  setText (std::shared_ptr<std::string>& text);
252 
258  std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
259  getTheC ();
260 
266  const std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
267  getTheC () const;
268 
274  void
275  setTheC (std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theC);
276 
282  std::shared_ptr<ome::xml::model::enums::FontFamily>
283  getFontFamily ();
284 
290  const std::shared_ptr<ome::xml::model::enums::FontFamily>
291  getFontFamily () const;
292 
298  void
299  setFontFamily (std::shared_ptr<ome::xml::model::enums::FontFamily>& fontFamily);
300 
306  std::shared_ptr<ome::xml::model::enums::FontStyle>
307  getFontStyle ();
308 
314  const std::shared_ptr<ome::xml::model::enums::FontStyle>
315  getFontStyle () const;
316 
322  void
323  setFontStyle (std::shared_ptr<ome::xml::model::enums::FontStyle>& fontStyle);
324 
330  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > >&
331  getFontSize ();
332 
338  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > >&
339  getFontSize () const;
340 
346  void
348 
354  std::shared_ptr<ome::xml::model::primitives::Color>
355  getFillColor ();
356 
362  const std::shared_ptr<ome::xml::model::primitives::Color>
363  getFillColor () const;
364 
370  void
371  setFillColor (std::shared_ptr<ome::xml::model::primitives::Color>& fillColor);
372 
378  std::shared_ptr<ome::xml::model::primitives::Color>
379  getStrokeColor ();
380 
386  const std::shared_ptr<ome::xml::model::primitives::Color>
387  getStrokeColor () const;
388 
394  void
395  setStrokeColor (std::shared_ptr<ome::xml::model::primitives::Color>& strokeColor);
396 
402  std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
403  getTheT ();
404 
410  const std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
411  getTheT () const;
412 
418  void
419  setTheT (std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theT);
420 
426  const std::string&
427  getID () const;
428 
434  void
435  setID (const std::string& id);
436 
442  std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
443  getTheZ ();
444 
450  const std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
451  getTheZ () const;
452 
458  void
459  setTheZ (std::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theZ);
460 
466  std::shared_ptr<ome::xml::model::AffineTransform>
467  getTransform ();
468 
474  const std::shared_ptr<ome::xml::model::AffineTransform>
475  getTransform () const;
476 
482  void
483  setTransform (std::shared_ptr<ome::xml::model::AffineTransform>& transform);
484 
492 
499  getLinkedAnnotationList () const;
500 
508  const std::weak_ptr<ome::xml::model::Annotation>&
510 
521  const std::weak_ptr<ome::xml::model::Annotation>&
523  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
524 
535  bool
536  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
537 
553  bool
554  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
555 
561  std::weak_ptr<ome::xml::model::Union>
562  getUnion ();
563 
569  const std::weak_ptr<ome::xml::model::Union>
570  getUnion () const;
571 
577  void
578  setUnion (std::weak_ptr<ome::xml::model::Union>& union_BackReference);
579 
585  virtual const std::string&
586  getShapeType() const = 0;
587 
588  protected:
589  // Documented in base class.
590  virtual void
592  common::xml::dom::Element& element) const;
593 
594  public:
595  // Documented in superclass.
596  const std::string&
597  getXMLNamespace() const;
598  };
599 
600  }
601  }
602 }
603 
604 #endif // OME_XML_MODEL_SHAPE_H
605 
606 /*
607  * Local Variables:
608  * mode:C++
609  * End:
610  */
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:639
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Shape.cpp:1041
void setFontFamily(std::shared_ptr< ome::xml::model::enums::FontFamily > &fontFamily)
Set the FontFamily property.
Definition: Shape.cpp:611
std::shared_ptr< ome::xml::model::primitives::Color > getStrokeColor()
Get the StrokeColor property.
Definition: Shape.cpp:681
void setStrokeDashArray(std::shared_ptr< std::string > &strokeDashArray)
Set the StrokeDashArray property.
Definition: Shape.cpp:485
void setFillColor(std::shared_ptr< ome::xml::model::primitives::Color > &fillColor)
Set the FillColor property.
Definition: Shape.cpp:674
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:860
void setTheZ(std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theZ)
Set the TheZ property.
Definition: Shape.cpp:751
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:653
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Shape.cpp:821
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:597
void setTheC(std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theC)
Set the TheC property.
Definition: Shape.cpp:590
void setTheT(std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theT)
Set the TheT property.
Definition: Shape.cpp:716
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Shape.cpp:257
virtual SKIP 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:263
void setText(std::shared_ptr< std::string > &text)
Set the Text property.
Definition: Shape.cpp:569
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setID(const std::string &id)
Set the ID property.
Definition: Shape.cpp:730
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:660
std::shared_ptr< bool > getLocked()
Get the Locked property.
Definition: Shape.cpp:513
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:791
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:440
void setStrokeWidth(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > &strokeWidth)
Set the StrokeWidth property.
Definition: Shape.cpp:506
void setUnion(std::weak_ptr< ome::xml::model::Union > &union_BackReference)
Set the Union property.
Definition: Shape.cpp:853
void setFillRule(std::shared_ptr< ome::xml::model::enums::FillRule > &fillRule)
Set the FillRule property.
Definition: Shape.cpp:548
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:737
std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheC()
Get the TheC property.
Definition: Shape.cpp:576
Open Microscopy Environment C++ implementation.
std::shared_ptr< ome::xml::model::enums::FontStyle > getFontStyle()
Get the FontStyle property.
Definition: Shape.cpp:618
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Shape.cpp:807
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:101
void setTransform(std::shared_ptr< ome::xml::model::AffineTransform > &transform)
Set the Transform property.
Definition: Shape.cpp:772
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > & getStrokeWidth()
Get the StrokeWidth property.
Definition: Shape.cpp:492
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Shape.cpp:785
const std::string & getID() const
Get the ID property.
Definition: Shape.cpp:723
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Shape.cpp:779
Shape model object.
Definition: Shape.h:87
Shape()
Default constructor.
Definition: Shape.cpp:233
std::shared_ptr< std::string > getText()
Get the Text property.
Definition: Shape.cpp:555
std::weak_ptr< ome::xml::model::Union > getUnion()
Get the Union property.
Definition: Shape.cpp:839
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:632
A quantity of a defined unit.
Definition: Quantity.h:57
virtual ~Shape()
Destructor.
Definition: Shape.cpp:252
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:797
void setLocked(std::shared_ptr< bool > &locked)
Set the Locked property.
Definition: Shape.cpp:527
void setStrokeColor(std::shared_ptr< ome::xml::model::primitives::Color > &strokeColor)
Set the StrokeColor property.
Definition: Shape.cpp:695
std::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheT()
Get the TheT property.
Definition: Shape.cpp:702
std::shared_ptr< std::string > getStrokeDashArray()
Get the StrokeDashArray property.
Definition: Shape.cpp:471
std::shared_ptr< ome::xml::model::enums::FillRule > getFillRule()
Get the FillRule property.
Definition: Shape.cpp:534
std::shared_ptr< ome::xml::model::AffineTransform > getTransform()
Get the Transform property.
Definition: Shape.cpp:758