ome-xml  5.2.0-m5
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,
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,
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>
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
311 
319 
326  getLinkedAnnotationList () const;
327 
335  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
337 
348  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
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 
409  asXMLElement (common::xml::dom::Document& document) const;
410 
411 
412  protected:
413  // Documented in base class.
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 model interface (abstract top-level container)
Definition: OMEModel.h:62
void setInstrument(ome::compat::weak_ptr< ome::xml::model::Instrument > &instrument_BackReference)
Set the Instrument property.
Definition: Detector.cpp:561
const std::string & getID() const
Get the ID property.
Definition: Detector.cpp:452
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:480
void setAmplificationGain(ome::compat::shared_ptr< double > &amplificationGain)
Set the AmplificationGain property.
Definition: Detector.cpp:382
ome::compat::shared_ptr< double > getOffset()
Get the Offset property.
Definition: Detector.cpp:410
void setOffset(ome::compat::shared_ptr< double > &offset)
Set the Offset property.
Definition: Detector.cpp:424
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:567
void setID(const std::string &id)
Set the ID property.
Definition: Detector.cpp:459
void setZoom(ome::compat::shared_ptr< double > &zoom)
Set the Zoom property.
Definition: Detector.cpp:361
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
Private implementation details of Detector model object.
Definition: Detector.cpp:75
ome::compat::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsElectricPotential > > & getVoltage()
Get the Voltage property.
Definition: Detector.cpp:466
void setType(ome::compat::shared_ptr< ome::xml::model::enums::DetectorType > &type)
Set the Type property.
Definition: Detector.cpp:445
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:316
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:194
ome::compat::shared_ptr< ome::xml::model::enums::DetectorType > getType()
Get the Type property.
Definition: Detector.cpp:431
Detector model object.
Definition: Detector.h:83
ome::compat::weak_ptr< ome::xml::model::Instrument > getInstrument()
Get the Instrument property.
Definition: Detector.cpp:547
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Detector.cpp:493
ome::compat::shared_ptr< double > getZoom()
Get the Zoom property.
Definition: Detector.cpp:347
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Detector.h:86
void setGain(ome::compat::shared_ptr< double > &gain)
Set the Gain property.
Definition: Detector.cpp:403
Open Microscopy Environment C++ implementation.
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Detector.cpp:529
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Detector.cpp:694
Detector()
Default constructor.
Definition: Detector.cpp:170
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:574
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:505
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Detector.cpp:210
ome::compat::shared_ptr< double > getGain()
Get the Gain property.
Definition: Detector.cpp:389
const std::string & elementName() const
Get the element name of this model object.
Definition: Detector.cpp:203
ManufacturerSpec model object.
Definition: ManufacturerSpec.h:79
A quantity of a defined unit.
Definition: Quantity.h:57
virtual ~Detector()
Destructor.
Definition: Detector.cpp:189
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:218
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:487
ome::compat::shared_ptr< double > getAmplificationGain()
Get the AmplificationGain property.
Definition: Detector.cpp:368
Detector & operator=(const Detector &)
Assignment operator (deleted).
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Detector.cpp:515
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:499