ome-xml 5.2.3

Detector.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_DETECTOR_H
47 #define OME_XML_MODEL_DETECTOR_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/DetectorType.h>
67 #include <ome/xml/model/enums/UnitsElectricPotential.h>
68
69 namespace ome
70 {
71 namespace xml
72 {
73 namespace model
74 {
75
76 // Forward declarations.
77 class Annotation;
78 class OMEModel;
79
83 class Detector : public ManufacturerSpec
84 {
85 private:
86 class Impl;
88 ome::compat::shared_ptr<Impl> impl;
89
90 public:
92 Detector();
93
99 Detector (const Detector& copy);
100
102 virtual
103 ~Detector ();
104
119 static ome::compat::shared_ptr< Detector>
120 create(const common::xml::dom::Element& element,
121 ome::xml::model::OMEModel& model);
122
123 // Documented in superclass.
124 const std::string&
125 elementName() const;
126
127 // Documented in superclass.
128 bool
129 validElementName(const std::string& name) const;
130
131 private:
133 Detector&
134 operator= (const Detector&);
135
136 public:
137 // -- OMEModelObject API methods --
138
140 virtual void
141 update(const common::xml::dom::Element& element,
142 ome::xml::model::OMEModel& model);
143
144 public:
145 // -- Detector API methods --
146
148 bool
149 link (ome::compat::shared_ptr<Reference>& reference,
150 ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
151
157 ome::compat::shared_ptr<double>
158 getZoom ();
159
165 const ome::compat::shared_ptr<double>
166 getZoom () const;
167
173 void
174 setZoom (ome::compat::shared_ptr<double>& zoom);
175
181 ome::compat::shared_ptr<double>
182 getAmplificationGain ();
183
189 const ome::compat::shared_ptr<double>
190 getAmplificationGain () const;
191
197 void
198 setAmplificationGain (ome::compat::shared_ptr<double>& amplificationGain);
199
205 ome::compat::shared_ptr<double>
206 getGain ();
207
213 const ome::compat::shared_ptr<double>
214 getGain () const;
215
221 void
222 setGain (ome::compat::shared_ptr<double>& gain);
223
229 ome::compat::shared_ptr<double>
230 getOffset ();
231
237 const ome::compat::shared_ptr<double>
238 getOffset () const;
239
245 void
246 setOffset (ome::compat::shared_ptr<double>& offset);
247
253 ome::compat::shared_ptr<ome::xml::model::enums::DetectorType>
254 getType ();
255
261 const ome::compat::shared_ptr<ome::xml::model::enums::DetectorType>
262 getType () const;
263
269 void
270 setType (ome::compat::shared_ptr<ome::xml::model::enums::DetectorType>& type);
271
277 const std::string&
278 getID () const;
279
285 void
286 setID (const std::string& id);
287
293 ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsElectricPotential > >&
294 getVoltage ();
295
301 const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsElectricPotential > >&
302 getVoltage () const;
303
309 void
310 setVoltage (const ome::compat::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsElectricPotential > >& voltage);
311
317 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type
318 sizeOfLinkedAnnotationList () const;
319
325 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type
326 getLinkedAnnotationList () const;
327
335 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
336 getLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index) const;
337
348 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
349 setLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index,
350 const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
351
362 bool
363 linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
364
380 bool
381 unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
382
388 ome::compat::weak_ptr<ome::xml::model::Instrument>
389 getInstrument ();
390
396 const ome::compat::weak_ptr<ome::xml::model::Instrument>
397 getInstrument () const;
398
404 void
405 setInstrument (ome::compat::weak_ptr<ome::xml::model::Instrument>& instrument_BackReference);
406
408 virtual common::xml::dom::Element
409 asXMLElement (common::xml::dom::Document& document) const;
410
411
412 protected:
413 // Documented in base class.
414 virtual common::xml::dom::Element
415 asXMLElementInternal (common::xml::dom::Document& document,
416 common::xml::dom::Element& element) const;
417
418 public:
419 // Documented in superclass.
420 const std::string&
421 getXMLNamespace() const;
422 };
423
424 }
425 }
426 }
427
428 #endif // OME_XML_MODEL_DETECTOR_H
429
430 /*
431 * Local Variables:
432 * mode:C++
433 * End:
434 */
ome::xml::model::OMEModel
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
ome::xml::model::Detector::setInstrument
void setInstrument(ome::compat::weak_ptr< ome::xml::model::Instrument > &instrument_BackReference)
Set the Instrument property.
Definition: Detector.cpp:557
ome::xml::model::Detector::setVoltage
void setVoltage(const ome::compat::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsElectricPotential > > &voltage)
Set the Voltage property.
Definition: Detector.cpp:476
ome::xml::model::Detector::validElementName
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Detector.cpp:206
ome::xml::model::Detector::sizeOfLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Detector.cpp:483
ome::xml::model::Detector::setAmplificationGain
void setAmplificationGain(ome::compat::shared_ptr< double > &amplificationGain)
Set the AmplificationGain property.
Definition: Detector.cpp:378
ome::xml::model::Detector::getOffset
ome::compat::shared_ptr< double > getOffset()
Get the Offset property.
Definition: Detector.cpp:406
ome::xml::model::Detector::setOffset
void setOffset(ome::compat::shared_ptr< double > &offset)
Set the Offset property.
Definition: Detector.cpp:420
ome::xml::model::Detector::getLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Detector.cpp:489
ome::common::xml::dom::Document
ome::common::xml::dom::Element
ome::xml::model::Detector::setID
void setID(const std::string &id)
Set the ID property.
Definition: Detector.cpp:455
ome::xml::model::Detector::setZoom
void setZoom(ome::compat::shared_ptr< double > &zoom)
Set the Zoom property.
Definition: Detector.cpp:357
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::Detector::Impl
Private implementation details of Detector model object.
Definition: Detector.cpp:75
ome::xml::model::Detector::getVoltage
ome::compat::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsElectricPotential > > & getVoltage()
Get the Voltage property.
Definition: Detector.cpp:462
ome::xml::model::Detector::setType
void setType(ome::compat::shared_ptr< ome::xml::model::enums::DetectorType > &type)
Set the Type property.
Definition: Detector.cpp:441
ome::xml::model::Detector::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: Detector.cpp:312
ome::xml::model::Detector::create
static ome::compat::shared_ptr< Detector > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Detector model object from DOM element.
Definition: Detector.cpp:190
ome::xml::model::Detector::getType
ome::compat::shared_ptr< ome::xml::model::enums::DetectorType > getType()
Get the Type property.
Definition: Detector.cpp:427
ome::xml::model::Detector
Detector model object.
Definition: Detector.h:83
ome::xml::model::Detector::getInstrument
ome::compat::weak_ptr< ome::xml::model::Instrument > getInstrument()
Get the Instrument property.
Definition: Detector.cpp:543
ome::xml::model::Detector::getZoom
ome::compat::shared_ptr< double > getZoom()
Get the Zoom property.
Definition: Detector.cpp:343
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::Detector::impl
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Detector.h:86
ome::xml::model::Detector::setGain
void setGain(ome::compat::shared_ptr< double > &gain)
Set the Gain property.
Definition: Detector.cpp:399
ome
Open Microscopy Environment C++ implementation.
ome::xml::model::Detector::unlinkAnnotation
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Detector.cpp:525
ome::xml::model::Detector::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: Detector.cpp:570
ome::xml::model::Detector::getID
const std::string & getID() const
Get the ID property.
Definition: Detector.cpp:448
ome::xml::model::Detector::Detector
Detector()
Default constructor.
Definition: Detector.cpp:170
ome::xml::model::Detector::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: Detector.cpp:501
ome::xml::model::Detector::elementName
const std::string & elementName() const
Get the element name of this model object.
Definition: Detector.cpp:199
ome::xml::model::Detector::getGain
ome::compat::shared_ptr< double > getGain()
Get the Gain property.
Definition: Detector.cpp:385
ome::xml::model::ManufacturerSpec
ManufacturerSpec model object.
Definition: ManufacturerSpec.h:79
ome::xml::model::Detector::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: Detector.cpp:495
ome::xml::model::primitives::Quantity
A quantity of a defined unit.
Definition: Quantity.h:57
ome::xml::model::Detector::getXMLNamespace
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Detector.cpp:690
ome::xml::model::Detector::~Detector
virtual ~Detector()
Destructor.
Definition: Detector.cpp:185
ome::xml::model::Detector::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: Detector.cpp:214
ome::xml::model::Detector::getAmplificationGain
ome::compat::shared_ptr< double > getAmplificationGain()
Get the AmplificationGain property.
Definition: Detector.cpp:364
ome::xml::model::Detector::operator=
Detector & operator=(const Detector &)
Assignment operator (deleted).
ome::xml::model::Detector::asXMLElement
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Detector.cpp:563
ome::xml::model::Detector::linkAnnotation
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Detector.cpp:511
log.h