ome-xml  5.6.0
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 
61 #include <ome/xml/model/primitives/Quantity.h>
62 
63 #include <ome/xml/model/Instrument.h>
64 #include <ome/xml/model/ManufacturerSpec.h>
65 #include <ome/xml/model/enums/DetectorType.h>
66 #include <ome/xml/model/enums/UnitsElectricPotential.h>
67 
68 namespace ome
69 {
70  namespace xml
71  {
72  namespace model
73  {
74 
75  // Forward declarations.
76  class Annotation;
77  class OMEModel;
78 
82  class Detector : public ManufacturerSpec
83  {
84  private:
85  class Impl;
87  std::shared_ptr<Impl> impl;
88 
89  public:
91  Detector();
92 
98  Detector (const Detector& copy);
99 
101  virtual
102  ~Detector ();
103 
118  static std::shared_ptr<Detector>
119  create(const common::xml::dom::Element& element,
121 
122  // Documented in superclass.
123  const std::string&
124  elementName() const;
125 
126  // Documented in superclass.
127  bool
128  validElementName(const std::string& name) const;
129 
131  Detector&
132  operator= (const Detector&) = delete;
134 
135  // -- OMEModelObject API methods --
136 
138  virtual void
139  update(const common::xml::dom::Element& element,
141 
142  public:
143  // -- Detector API methods --
144 
146  bool
147  link (std::shared_ptr<Reference>& reference,
148  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
149 
155  std::shared_ptr<double>
156  getZoom ();
157 
163  const std::shared_ptr<double>
164  getZoom () const;
165 
171  void
172  setZoom (std::shared_ptr<double>& zoom);
173 
179  std::shared_ptr<double>
181 
187  const std::shared_ptr<double>
188  getAmplificationGain () const;
189 
195  void
196  setAmplificationGain (std::shared_ptr<double>& amplificationGain);
197 
203  std::shared_ptr<double>
204  getGain ();
205 
211  const std::shared_ptr<double>
212  getGain () const;
213 
219  void
220  setGain (std::shared_ptr<double>& gain);
221 
227  std::shared_ptr<double>
228  getOffset ();
229 
235  const std::shared_ptr<double>
236  getOffset () const;
237 
243  void
244  setOffset (std::shared_ptr<double>& offset);
245 
251  std::shared_ptr<ome::xml::model::enums::DetectorType>
252  getType ();
253 
259  const std::shared_ptr<ome::xml::model::enums::DetectorType>
260  getType () const;
261 
267  void
268  setType (std::shared_ptr<ome::xml::model::enums::DetectorType>& type);
269 
275  const std::string&
276  getID () const;
277 
283  void
284  setID (const std::string& id);
285 
291  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsElectricPotential > >&
292  getVoltage ();
293 
299  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsElectricPotential > >&
300  getVoltage () const;
301 
307  void
309 
317 
324  getLinkedAnnotationList () const;
325 
333  const std::weak_ptr<ome::xml::model::Annotation>&
335 
346  const std::weak_ptr<ome::xml::model::Annotation>&
348  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
349 
360  bool
361  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
362 
378  bool
379  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
380 
386  std::weak_ptr<ome::xml::model::Instrument>
387  getInstrument ();
388 
394  const std::weak_ptr<ome::xml::model::Instrument>
395  getInstrument () const;
396 
402  void
403  setInstrument (std::weak_ptr<ome::xml::model::Instrument>& instrument_BackReference);
404 
405  protected:
406  // Documented in base class.
407  virtual void
409  common::xml::dom::Element& element) const;
410 
411  public:
412  // Documented in superclass.
413  const std::string&
414  getXMLNamespace() const;
415  };
416 
417  }
418  }
419 }
420 
421 #endif // OME_XML_MODEL_DETECTOR_H
422 
423 /*
424  * Local Variables:
425  * mode:C++
426  * End:
427  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Detector.cpp:214
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: Detector.cpp:505
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Detector.cpp:487
std::weak_ptr< ome::xml::model::Instrument > getInstrument()
Get the Instrument property.
Definition: Detector.cpp:547
void setZoom(std::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 > >, std::owner_less< Ptr< T > > > > > type
Multi-index container type.
Definition: OMEModelObject.h:93
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: Detector.cpp:316
void setID(const std::string &id)
Set the ID property.
Definition: Detector.cpp:459
std::shared_ptr< double > getGain()
Get the Gain property.
Definition: Detector.cpp:389
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsElectricPotential > > & getVoltage()
Get the Voltage property.
Definition: Detector.cpp:466
std::shared_ptr< double > getAmplificationGain()
Get the AmplificationGain property.
Definition: Detector.cpp:368
void setType(std::shared_ptr< ome::xml::model::enums::DetectorType > &type)
Set the Type property.
Definition: Detector.cpp:445
Private implementation details of Detector model object.
Definition: Detector.cpp:75
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Detector.cpp:515
std::shared_ptr< double > getOffset()
Get the Offset property.
Definition: Detector.cpp:410
Detector model object.
Definition: Detector.h:82
std::shared_ptr< ome::xml::model::enums::DetectorType > getType()
Get the Type property.
Definition: Detector.cpp:431
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
Open Microscopy Environment C++ implementation.
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Detector.h:85
const std::string & getID() const
Get the ID property.
Definition: Detector.cpp:452
Detector()
Default constructor.
Definition: Detector.cpp:174
const std::string & elementName() const
Get the element name of this model object.
Definition: Detector.cpp:207
void setAmplificationGain(std::shared_ptr< double > &amplificationGain)
Set the AmplificationGain property.
Definition: Detector.cpp:382
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Detector.cpp:493
void setInstrument(std::weak_ptr< ome::xml::model::Instrument > &instrument_BackReference)
Set the Instrument property.
Definition: Detector.cpp:561
ManufacturerSpec model object.
Definition: ManufacturerSpec.h:78
void setVoltage(const std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsElectricPotential > > &voltage)
Set the Voltage property.
Definition: Detector.cpp:480
std::shared_ptr< double > getZoom()
Get the Zoom property.
Definition: Detector.cpp:347
A quantity of a defined unit.
Definition: Quantity.h:57
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Detector.cpp:670
virtual ~Detector()
Destructor.
Definition: Detector.cpp:193
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: Detector.cpp:499
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: Detector.cpp:220
static std::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:198
void setGain(std::shared_ptr< double > &gain)
Set the Gain property.
Definition: Detector.cpp:403
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: Detector.cpp:567
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Detector.cpp:529
void setOffset(std::shared_ptr< double > &offset)
Set the Offset property.
Definition: Detector.cpp:424