ome-xml 5.2.3

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 #include <ome/common/xml/dom/NodeList.h>
61
62 #include <ome/xml/model/primitives/Quantity.h>
63
64 #include <ome/xml/model/AffineTransform.h>
65 #include <ome/xml/model/Union.h>
66 #include <ome/xml/model/detail/OMEModelObject.h>
67 #include <ome/xml/model/enums/FillRule.h>
68 #include <ome/xml/model/enums/FontFamily.h>
69 #include <ome/xml/model/enums/FontStyle.h>
70 #include <ome/xml/model/enums/UnitsLength.h>
71 #include <ome/xml/model/primitives/Color.h>
72 #include <ome/xml/model/primitives/NonNegativeInteger.h>
73
74 namespace ome
75 {
76 namespace xml
77 {
78 namespace model
79 {
80
81 // Forward declarations.
82 class Annotation;
83 class OMEModel;
84
88 class Shape : public detail::OMEModelObject
89 {
90 private:
91 class Impl;
93 ome::compat::shared_ptr<Impl> impl;
94
95 public:
97 Shape();
98
104 Shape (const Shape& copy);
105
107 virtual
108 ~Shape ();
109
110 // Documented in superclass.
111 bool
112 validElementName(const std::string& name) const;
113
114 private:
116 Shape&
117 operator= (const Shape&);
118
119 public:
120 // -- OMEModelObject API methods --
121
123 virtual void
124 update(const common::xml::dom::Element& element,
125 ome::xml::model::OMEModel& model);
126
127 public:
128 // -- Shape API methods --
129
131 bool
132 link (ome::compat::shared_ptr<Reference>& reference,
133 ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
134
140 ome::compat::shared_ptr<std::string>
141 getStrokeDashArray ();
142
148 const ome::compat::shared_ptr<std::string>
149 getStrokeDashArray () const;
150
156 void
157 setStrokeDashArray (ome::compat::shared_ptr<std::string>& strokeDashArray);
158
164 ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
165 getStrokeWidth ();
166
172 const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
173 getStrokeWidth () const;
174
180 void
181 setStrokeWidth (const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >& strokeWidth);
182
188 ome::compat::shared_ptr<bool>
189 getLocked ();
190
196 const ome::compat::shared_ptr<bool>
197 getLocked () const;
198
204 void
205 setLocked (ome::compat::shared_ptr<bool>& locked);
206
212 ome::compat::shared_ptr<ome::xml::model::enums::FillRule>
213 getFillRule ();
214
220 const ome::compat::shared_ptr<ome::xml::model::enums::FillRule>
221 getFillRule () const;
222
228 void
229 setFillRule (ome::compat::shared_ptr<ome::xml::model::enums::FillRule>& fillRule);
230
236 ome::compat::shared_ptr<std::string>
237 getText ();
238
244 const ome::compat::shared_ptr<std::string>
245 getText () const;
246
252 void
253 setText (ome::compat::shared_ptr<std::string>& text);
254
260 ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
261 getTheC ();
262
268 const ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
269 getTheC () const;
270
276 void
277 setTheC (ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theC);
278
284 ome::compat::shared_ptr<ome::xml::model::enums::FontFamily>
285 getFontFamily ();
286
292 const ome::compat::shared_ptr<ome::xml::model::enums::FontFamily>
293 getFontFamily () const;
294
300 void
301 setFontFamily (ome::compat::shared_ptr<ome::xml::model::enums::FontFamily>& fontFamily);
302
308 ome::compat::shared_ptr<ome::xml::model::enums::FontStyle>
309 getFontStyle ();
310
316 const ome::compat::shared_ptr<ome::xml::model::enums::FontStyle>
317 getFontStyle () const;
318
324 void
325 setFontStyle (ome::compat::shared_ptr<ome::xml::model::enums::FontStyle>& fontStyle);
326
332 ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > >&
333 getFontSize ();
334
340 const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > >&
341 getFontSize () const;
342
348 void
349 setFontSize (const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength, ome::xml::model::primitives::NonNegativeInteger > >& fontSize);
350
356 ome::compat::shared_ptr<ome::xml::model::primitives::Color>
357 getFillColor ();
358
364 const ome::compat::shared_ptr<ome::xml::model::primitives::Color>
365 getFillColor () const;
366
372 void
373 setFillColor (ome::compat::shared_ptr<ome::xml::model::primitives::Color>& fillColor);
374
380 ome::compat::shared_ptr<ome::xml::model::primitives::Color>
381 getStrokeColor ();
382
388 const ome::compat::shared_ptr<ome::xml::model::primitives::Color>
389 getStrokeColor () const;
390
396 void
397 setStrokeColor (ome::compat::shared_ptr<ome::xml::model::primitives::Color>& strokeColor);
398
404 ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
405 getTheT ();
406
412 const ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
413 getTheT () const;
414
420 void
421 setTheT (ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theT);
422
428 const std::string&
429 getID () const;
430
436 void
437 setID (const std::string& id);
438
444 ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
445 getTheZ ();
446
452 const ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>
453 getTheZ () const;
454
460 void
461 setTheZ (ome::compat::shared_ptr<ome::xml::model::primitives::NonNegativeInteger>& theZ);
462
468 ome::compat::shared_ptr<ome::xml::model::AffineTransform>
469 getTransform ();
470
476 const ome::compat::shared_ptr<ome::xml::model::AffineTransform>
477 getTransform () const;
478
484 void
485 setTransform (ome::compat::shared_ptr<ome::xml::model::AffineTransform>& transform);
486
492 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type
493 sizeOfLinkedAnnotationList () const;
494
500 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type
501 getLinkedAnnotationList () const;
502
510 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
511 getLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index) const;
512
523 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
524 setLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index,
525 const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
526
537 bool
538 linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
539
555 bool
556 unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
557
563 ome::compat::weak_ptr<ome::xml::model::Union>
564 getUnion ();
565
571 const ome::compat::weak_ptr<ome::xml::model::Union>
572 getUnion () const;
573
579 void
580 setUnion (ome::compat::weak_ptr<ome::xml::model::Union>& union_BackReference);
581
587 virtual const std::string&
588 getShapeType() const = 0;
589
591 virtual common::xml::dom::Element
592 asXMLElement (common::xml::dom::Document& document) const;
593
594
595 protected:
596 // Documented in base class.
597 virtual common::xml::dom::Element
598 asXMLElementInternal (common::xml::dom::Document& document,
599 common::xml::dom::Element& element) const;
600
601 public:
602 // Documented in superclass.
603 const std::string&
604 getXMLNamespace() const;
605 };
606
607 }
608 }
609 }
610
611 #endif // OME_XML_MODEL_SHAPE_H
612
613 /*
614 * Local Variables:
615 * mode:C++
616 * End:
617 */
ome::xml::model::OMEModel
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
ome::xml::model::Shape::getTheZ
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheZ()
Get the TheZ property.
Definition: Shape.cpp:727
ome::xml::model::Shape::getLinkedAnnotation
const ome::compat::weak_ptr< ome::xml::model::Annotation > & getLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type index) const
Get linked Annotation.
Definition: Shape.cpp:781
ome::xml::model::Shape::getFontStyle
ome::compat::shared_ptr< ome::xml::model::enums::FontStyle > getFontStyle()
Get the FontStyle property.
Definition: Shape.cpp:608
ome::xml::model::Shape::getXMLNamespace
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Shape.cpp:1059
ome::xml::model::Shape::getFontSize
ome::compat::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:629
ome::xml::model::Shape::setLocked
void setLocked(ome::compat::shared_ptr< bool > &locked)
Set the Locked property.
Definition: Shape.cpp:517
ome::xml::model::Shape::operator=
Shape & operator=(const Shape &)
Assignment operator (deleted).
ome::xml::model::Shape::setUnion
void setUnion(ome::compat::weak_ptr< ome::xml::model::Union > &union_BackReference)
Set the Union property.
Definition: Shape.cpp:843
ome::xml::model::Shape::setTheC
void setTheC(ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theC)
Set the TheC property.
Definition: Shape.cpp:580
ome::xml::model::Shape::getTransform
ome::compat::shared_ptr< ome::xml::model::AffineTransform > getTransform()
Get the Transform property.
Definition: Shape.cpp:748
ome::xml::model::Shape::setFontFamily
void setFontFamily(ome::compat::shared_ptr< ome::xml::model::enums::FontFamily > &fontFamily)
Set the FontFamily property.
Definition: Shape.cpp:601
ome::common::xml::dom::Document
ome::common::xml::dom::Element
ome::xml::model::Shape::validElementName
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
ome::xml::model::Shape::update
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:257
ome::xml::model::detail::OMEModelObject
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
ome::xml::model::Shape::setID
void setID(const std::string &id)
Set the ID property.
Definition: Shape.cpp:720
ome::xml::model::Shape::getShapeType
virtual const std::string & getShapeType() const =0
Get the Shape type.
ome::xml::model::OMEModelObject::indexed_container::type
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 > >, ome::compat::owner_less< Ptr< T > > > > > type
Multi-index container type.
Definition: OMEModelObject.h:94
ome::xml::model::Shape::setStrokeWidth
void setStrokeWidth(const ome::compat::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > &strokeWidth)
Set the StrokeWidth property.
Definition: Shape.cpp:496
ome::xml::model::Shape::getTheC
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheC()
Get the TheC property.
Definition: Shape.cpp:566
ome::xml::model::Shape::setTransform
void setTransform(ome::compat::shared_ptr< ome::xml::model::AffineTransform > &transform)
Set the Transform property.
Definition: Shape.cpp:762
ome::xml::model::Shape::setLinkedAnnotation
const ome::compat::weak_ptr< ome::xml::model::Annotation > & setLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Set linked Annotation.
Definition: Shape.cpp:787
ome::xml::model::Shape::setStrokeColor
void setStrokeColor(ome::compat::shared_ptr< ome::xml::model::primitives::Color > &strokeColor)
Set the StrokeColor property.
Definition: Shape.cpp:685
ome::xml::model::Shape::getStrokeWidth
ome::compat::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > & getStrokeWidth()
Get the StrokeWidth property.
Definition: Shape.cpp:482
ome::xml::model::Shape::link
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:430
ome::xml::model::OMEModelObject::indexed_container
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
ome::xml::model::Shape::getFillRule
ome::compat::shared_ptr< ome::xml::model::enums::FillRule > getFillRule()
Get the FillRule property.
Definition: Shape.cpp:524
ome
Open Microscopy Environment C++ implementation.
ome::xml::model::Shape::getStrokeDashArray
ome::compat::shared_ptr< std::string > getStrokeDashArray()
Get the StrokeDashArray property.
Definition: Shape.cpp:461
ome::xml::model::Shape::getFillColor
ome::compat::shared_ptr< ome::xml::model::primitives::Color > getFillColor()
Get the FillColor property.
Definition: Shape.cpp:650
ome::xml::model::Shape::setStrokeDashArray
void setStrokeDashArray(ome::compat::shared_ptr< std::string > &strokeDashArray)
Set the StrokeDashArray property.
Definition: Shape.cpp:475
ome::xml::model::Shape::impl
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Shape.h:91
ome::xml::model::Shape::setText
void setText(ome::compat::shared_ptr< std::string > &text)
Set the Text property.
Definition: Shape.cpp:559
ome::xml::model::Shape::setTheT
void setTheT(ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theT)
Set the TheT property.
Definition: Shape.cpp:706
ome::xml::model::Shape::linkAnnotation
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Shape.cpp:797
ome::xml::transform
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
ome::xml::model::Shape::setFontStyle
void setFontStyle(ome::compat::shared_ptr< ome::xml::model::enums::FontStyle > &fontStyle)
Set the FontStyle property.
Definition: Shape.cpp:622
ome::xml::model::Shape::getID
const std::string & getID() const
Get the ID property.
Definition: Shape.cpp:713
ome::xml::model::Shape::getLocked
ome::compat::shared_ptr< bool > getLocked()
Get the Locked property.
Definition: Shape.cpp:503
ome::xml::model::Shape
Shape model object.
Definition: Shape.h:88
ome::xml::model::Shape::Shape
Shape()
Default constructor.
Definition: Shape.cpp:229
ome::xml::model::Shape::setTheZ
void setTheZ(ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > &theZ)
Set the TheZ property.
Definition: Shape.cpp:741
ome::xml::model::Shape::getLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Shape.cpp:775
ome::xml::model::Shape::sizeOfLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Shape.cpp:769
ome::xml::model::Shape::Impl
Private implementation details of Shape model object.
Definition: Shape.cpp:78
ome::xml::model::Shape::getTheT
ome::compat::shared_ptr< ome::xml::model::primitives::NonNegativeInteger > getTheT()
Get the TheT property.
Definition: Shape.cpp:692
ome::xml::model::primitives::Quantity
A quantity of a defined unit.
Definition: Quantity.h:57
ome::xml::model::Shape::~Shape
virtual ~Shape()
Destructor.
Definition: Shape.cpp:244
ome::xml::model::Shape::getText
ome::compat::shared_ptr< std::string > getText()
Get the Text property.
Definition: Shape.cpp:545
ome::xml::model::Shape::setFontSize
void setFontSize(const ome::compat::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:643
ome::xml::model::Shape::getUnion
ome::compat::weak_ptr< ome::xml::model::Union > getUnion()
Get the Union property.
Definition: Shape.cpp:829
ome::xml::model::Shape::setFillRule
void setFillRule(ome::compat::shared_ptr< ome::xml::model::enums::FillRule > &fillRule)
Set the FillRule property.
Definition: Shape.cpp:538
ome::xml::model::Shape::asXMLElementInternal
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:857
ome::xml::model::Shape::asXMLElement
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Shape.cpp:850
ome::xml::model::Shape::unlinkAnnotation
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Shape.cpp:811
ome::xml::model::Shape::getFontFamily
ome::compat::shared_ptr< ome::xml::model::enums::FontFamily > getFontFamily()
Get the FontFamily property.
Definition: Shape.cpp:587
log.h
ome::xml::model::Shape::getStrokeColor
ome::compat::shared_ptr< ome::xml::model::primitives::Color > getStrokeColor()
Get the StrokeColor property.
Definition: Shape.cpp:671
ome::xml::model::Shape::setFillColor
void setFillColor(ome::compat::shared_ptr< ome::xml::model::primitives::Color > &fillColor)
Set the FillColor property.
Definition: Shape.cpp:664