ome-xml 5.2.3

Objective.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_OBJECTIVE_H
47 #define OME_XML_MODEL_OBJECTIVE_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/Instrument.h>
65 #include <ome/xml/model/ManufacturerSpec.h>
66 #include <ome/xml/model/enums/Correction.h>
67 #include <ome/xml/model/enums/Immersion.h>
68 #include <ome/xml/model/enums/UnitsLength.h>
69
70 namespace ome
71 {
72 namespace xml
73 {
74 namespace model
75 {
76
77 // Forward declarations.
78 class Annotation;
79 class OMEModel;
80
84 class Objective : public ManufacturerSpec
85 {
86 private:
87 class Impl;
89 ome::compat::shared_ptr<Impl> impl;
90
91 public:
93 Objective();
94
100 Objective (const Objective& copy);
101
103 virtual
104 ~Objective ();
105
120 static ome::compat::shared_ptr< Objective>
121 create(const common::xml::dom::Element& element,
122 ome::xml::model::OMEModel& model);
123
124 // Documented in superclass.
125 const std::string&
126 elementName() const;
127
128 // Documented in superclass.
129 bool
130 validElementName(const std::string& name) const;
131
132 private:
134 Objective&
135 operator= (const Objective&);
136
137 public:
138 // -- OMEModelObject API methods --
139
141 virtual void
142 update(const common::xml::dom::Element& element,
143 ome::xml::model::OMEModel& model);
144
145 public:
146 // -- Objective API methods --
147
149 bool
150 link (ome::compat::shared_ptr<Reference>& reference,
151 ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
152
158 ome::compat::shared_ptr<bool>
159 getIris ();
160
166 const ome::compat::shared_ptr<bool>
167 getIris () const;
168
174 void
175 setIris (ome::compat::shared_ptr<bool>& iris);
176
182 ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
183 getWorkingDistance ();
184
190 const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >&
191 getWorkingDistance () const;
192
198 void
199 setWorkingDistance (const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsLength > >& workingDistance);
200
206 ome::compat::shared_ptr<ome::xml::model::enums::Immersion>
207 getImmersion ();
208
214 const ome::compat::shared_ptr<ome::xml::model::enums::Immersion>
215 getImmersion () const;
216
222 void
223 setImmersion (ome::compat::shared_ptr<ome::xml::model::enums::Immersion>& immersion);
224
230 ome::compat::shared_ptr<ome::xml::model::enums::Correction>
231 getCorrection ();
232
238 const ome::compat::shared_ptr<ome::xml::model::enums::Correction>
239 getCorrection () const;
240
246 void
247 setCorrection (ome::compat::shared_ptr<ome::xml::model::enums::Correction>& correction);
248
254 ome::compat::shared_ptr<double>
255 getLensNA ();
256
262 const ome::compat::shared_ptr<double>
263 getLensNA () const;
264
270 void
271 setLensNA (ome::compat::shared_ptr<double>& lensNA);
272
278 ome::compat::shared_ptr<double>
279 getNominalMagnification ();
280
286 const ome::compat::shared_ptr<double>
287 getNominalMagnification () const;
288
294 void
295 setNominalMagnification (ome::compat::shared_ptr<double>& nominalMagnification);
296
302 ome::compat::shared_ptr<double>
303 getCalibratedMagnification ();
304
310 const ome::compat::shared_ptr<double>
311 getCalibratedMagnification () const;
312
318 void
319 setCalibratedMagnification (ome::compat::shared_ptr<double>& calibratedMagnification);
320
326 const std::string&
327 getID () const;
328
334 void
335 setID (const std::string& id);
336
342 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type
343 sizeOfLinkedAnnotationList () const;
344
350 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type
351 getLinkedAnnotationList () const;
352
360 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
361 getLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index) const;
362
373 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
374 setLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index,
375 const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
376
387 bool
388 linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
389
405 bool
406 unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
407
413 ome::compat::weak_ptr<ome::xml::model::Instrument>
414 getInstrument ();
415
421 const ome::compat::weak_ptr<ome::xml::model::Instrument>
422 getInstrument () const;
423
429 void
430 setInstrument (ome::compat::weak_ptr<ome::xml::model::Instrument>& instrument_BackReference);
431
433 virtual common::xml::dom::Element
434 asXMLElement (common::xml::dom::Document& document) const;
435
436
437 protected:
438 // Documented in base class.
439 virtual common::xml::dom::Element
440 asXMLElementInternal (common::xml::dom::Document& document,
441 common::xml::dom::Element& element) const;
442
443 public:
444 // Documented in superclass.
445 const std::string&
446 getXMLNamespace() const;
447 };
448
449 }
450 }
451 }
452
453 #endif // OME_XML_MODEL_OBJECTIVE_H
454
455 /*
456 * Local Variables:
457 * mode:C++
458 * End:
459 */
ome::xml::model::OMEModel
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
ome::xml::model::Objective::setImmersion
void setImmersion(ome::compat::shared_ptr< ome::xml::model::enums::Immersion > &immersion)
Set the Immersion property.
Definition: Objective.cpp:414
ome::xml::model::Objective::getID
const std::string & getID() const
Get the ID property.
Definition: Objective.cpp:505
ome::xml::model::Objective::sizeOfLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Objective.cpp:519
ome::xml::model::Objective::Impl
Private implementation details of Objective model object.
Definition: Objective.cpp:76
ome::xml::model::Objective::setNominalMagnification
void setNominalMagnification(ome::compat::shared_ptr< double > &nominalMagnification)
Set the NominalMagnification property.
Definition: Objective.cpp:477
ome::xml::model::Objective::getXMLNamespace
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Objective.cpp:738
ome::common::xml::dom::Document
ome::common::xml::dom::Element
ome::xml::model::Objective::getLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Objective.cpp:525
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::Objective::linkAnnotation
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Objective.cpp:547
ome::xml::model::Objective::getInstrument
ome::compat::weak_ptr< ome::xml::model::Instrument > getInstrument()
Get the Instrument property.
Definition: Objective.cpp:579
ome::xml::model::Objective::setLensNA
void setLensNA(ome::compat::shared_ptr< double > &lensNA)
Set the LensNA property.
Definition: Objective.cpp:456
ome::xml::model::Objective::getNominalMagnification
ome::compat::shared_ptr< double > getNominalMagnification()
Get the NominalMagnification property.
Definition: Objective.cpp:463
ome::xml::model::Objective::getLensNA
ome::compat::shared_ptr< double > getLensNA()
Get the LensNA property.
Definition: Objective.cpp:442
ome::xml::model::Objective::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: Objective.cpp:537
ome::xml::model::Objective::create
static ome::compat::shared_ptr< Objective > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Objective model object from DOM element.
Definition: Objective.cpp:198
ome::xml::model::Objective::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: Objective.cpp:327
ome::xml::model::OMEModelObject::indexed_container
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
ome
Open Microscopy Environment C++ implementation.
ome::xml::model::Objective::getWorkingDistance
ome::compat::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > & getWorkingDistance()
Get the WorkingDistance property.
Definition: Objective.cpp:379
ome::xml::model::Objective::getCorrection
ome::compat::shared_ptr< ome::xml::model::enums::Correction > getCorrection()
Get the Correction property.
Definition: Objective.cpp:421
ome::xml::model::Objective::setCalibratedMagnification
void setCalibratedMagnification(ome::compat::shared_ptr< double > &calibratedMagnification)
Set the CalibratedMagnification property.
Definition: Objective.cpp:498
ome::xml::model::Objective
Objective model object.
Definition: Objective.h:84
ome::xml::model::Objective::validElementName
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Objective.cpp:214
ome::xml::model::Objective::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: Objective.cpp:222
ome::xml::model::Objective::setCorrection
void setCorrection(ome::compat::shared_ptr< ome::xml::model::enums::Correction > &correction)
Set the Correction property.
Definition: Objective.cpp:435
ome::xml::model::Objective::unlinkAnnotation
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Objective.cpp:561
ome::xml::model::Objective::~Objective
virtual ~Objective()
Destructor.
Definition: Objective.cpp:193
ome::xml::model::ManufacturerSpec
ManufacturerSpec model object.
Definition: ManufacturerSpec.h:79
ome::xml::model::Objective::impl
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Objective.h:87
ome::xml::model::Objective::getImmersion
ome::compat::shared_ptr< ome::xml::model::enums::Immersion > getImmersion()
Get the Immersion property.
Definition: Objective.cpp:400
ome::xml::model::Objective::setIris
void setIris(ome::compat::shared_ptr< bool > &iris)
Set the Iris property.
Definition: Objective.cpp:372
ome::xml::model::primitives::Quantity
A quantity of a defined unit.
Definition: Quantity.h:57
ome::xml::model::Objective::operator=
Objective & operator=(const Objective &)
Assignment operator (deleted).
ome::xml::model::Objective::Objective
Objective()
Default constructor.
Definition: Objective.cpp:178
ome::xml::model::Objective::setInstrument
void setInstrument(ome::compat::weak_ptr< ome::xml::model::Instrument > &instrument_BackReference)
Set the Instrument property.
Definition: Objective.cpp:593
ome::xml::model::Objective::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: Objective.cpp:531
ome::xml::model::Objective::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: Objective.cpp:606
ome::xml::model::Objective::asXMLElement
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Objective.cpp:599
ome::xml::model::Objective::setWorkingDistance
void setWorkingDistance(const ome::compat::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsLength > > &workingDistance)
Set the WorkingDistance property.
Definition: Objective.cpp:393
log.h
ome::xml::model::Objective::getCalibratedMagnification
ome::compat::shared_ptr< double > getCalibratedMagnification()
Get the CalibratedMagnification property.
Definition: Objective.cpp:484
ome::xml::model::Objective::getIris
ome::compat::shared_ptr< bool > getIris()
Get the Iris property.
Definition: Objective.cpp:358
ome::xml::model::Objective::elementName
const std::string & elementName() const
Get the element name of this model object.
Definition: Objective.cpp:207
ome::xml::model::Objective::setID
void setID(const std::string &id)
Set the ID property.
Definition: Objective.cpp:512