ome-xml  5.5.1
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 
130  private:
132  Detector&
133  operator= (const Detector&);
134 
135  public:
136  // -- OMEModelObject API methods --
137 
139  virtual void
140  update(const common::xml::dom::Element& element,
142 
143  public:
144  // -- Detector API methods --
145 
147  bool
148  link (std::shared_ptr<Reference>& reference,
149  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
150 
156  std::shared_ptr<double>
157  getZoom ();
158 
164  const std::shared_ptr<double>
165  getZoom () const;
166 
172  void
173  setZoom (std::shared_ptr<double>& zoom);
174 
180  std::shared_ptr<double>
182 
188  const std::shared_ptr<double>
189  getAmplificationGain () const;
190 
196  void
197  setAmplificationGain (std::shared_ptr<double>& amplificationGain);
198 
204  std::shared_ptr<double>
205  getGain ();
206 
212  const std::shared_ptr<double>
213  getGain () const;
214 
220  void
221  setGain (std::shared_ptr<double>& gain);
222 
228  std::shared_ptr<double>
229  getOffset ();
230 
236  const std::shared_ptr<double>
237  getOffset () const;
238 
244  void
245  setOffset (std::shared_ptr<double>& offset);
246 
252  std::shared_ptr<ome::xml::model::enums::DetectorType>
253  getType ();
254 
260  const std::shared_ptr<ome::xml::model::enums::DetectorType>
261  getType () const;
262 
268  void
269  setType (std::shared_ptr<ome::xml::model::enums::DetectorType>& type);
270 
276  const std::string&
277  getID () const;
278 
284  void
285  setID (const std::string& id);
286 
292  std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsElectricPotential > >&
293  getVoltage ();
294 
300  const std::shared_ptr<ome::xml::model::primitives::Quantity<ome::xml::model::enums::UnitsElectricPotential > >&
301  getVoltage () const;
302 
308  void
310 
318 
325  getLinkedAnnotationList () const;
326 
334  const std::weak_ptr<ome::xml::model::Annotation>&
336 
347  const std::weak_ptr<ome::xml::model::Annotation>&
349  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
350 
361  bool
362  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
363 
379  bool
380  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
381 
387  std::weak_ptr<ome::xml::model::Instrument>
388  getInstrument ();
389 
395  const std::weak_ptr<ome::xml::model::Instrument>
396  getInstrument () const;
397 
403  void
404  setInstrument (std::weak_ptr<ome::xml::model::Instrument>& instrument_BackReference);
405 
406  protected:
407  // Documented in base class.
408  virtual void
410  common::xml::dom::Element& element) const;
411 
412  public:
413  // Documented in superclass.
414  const std::string&
415  getXMLNamespace() const;
416  };
417 
418  }
419  }
420 }
421 
422 #endif // OME_XML_MODEL_DETECTOR_H
423 
424 /*
425  * Local Variables:
426  * mode:C++
427  * End:
428  */
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:206
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:497
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Detector.cpp:479
std::weak_ptr< ome::xml::model::Instrument > getInstrument()
Get the Instrument property.
Definition: Detector.cpp:539
void setZoom(std::shared_ptr< double > &zoom)
Set the Zoom property.
Definition: Detector.cpp:353
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:308
void setID(const std::string &id)
Set the ID property.
Definition: Detector.cpp:451
std::shared_ptr< double > getGain()
Get the Gain property.
Definition: Detector.cpp:381
std::shared_ptr< ome::xml::model::primitives::Quantity< ome::xml::model::enums::UnitsElectricPotential > > & getVoltage()
Get the Voltage property.
Definition: Detector.cpp:458
std::shared_ptr< double > getAmplificationGain()
Get the AmplificationGain property.
Definition: Detector.cpp:360
void setType(std::shared_ptr< ome::xml::model::enums::DetectorType > &type)
Set the Type property.
Definition: Detector.cpp:437
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:507
std::shared_ptr< double > getOffset()
Get the Offset property.
Definition: Detector.cpp:402
Detector model object.
Definition: Detector.h:82
std::shared_ptr< ome::xml::model::enums::DetectorType > getType()
Get the Type property.
Definition: Detector.cpp:423
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:444
Detector()
Default constructor.
Definition: Detector.cpp:170
const std::string & elementName() const
Get the element name of this model object.
Definition: Detector.cpp:199
void setAmplificationGain(std::shared_ptr< double > &amplificationGain)
Set the AmplificationGain property.
Definition: Detector.cpp:374
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Detector.cpp:485
void setInstrument(std::weak_ptr< ome::xml::model::Instrument > &instrument_BackReference)
Set the Instrument property.
Definition: Detector.cpp:553
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:472
std::shared_ptr< double > getZoom()
Get the Zoom property.
Definition: Detector.cpp:339
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:662
virtual ~Detector()
Destructor.
Definition: Detector.cpp:185
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:491
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:212
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:190
void setGain(std::shared_ptr< double > &gain)
Set the Gain property.
Definition: Detector.cpp:395
Detector & operator=(const Detector &)
Assignment operator (deleted).
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:559
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Detector.cpp:521
void setOffset(std::shared_ptr< double > &offset)
Set the Offset property.
Definition: Detector.cpp:416