bioformats  5.1.2
Detector.h
1 /*
2  * #%L
3  * OME-XML C++ library for working with OME-XML metadata structures.
4  * %%
5  * Copyright © 2006 - 2015 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/Instrument.h>
63 #include <ome/xml/model/ManufacturerSpec.h>
64 #include <ome/xml/model/enums/DetectorType.h>
65 
66 namespace ome
67 {
68  namespace xml
69  {
70  namespace model
71  {
72 
73  // Forward declarations.
74  class OMEModel;
75 
79  class Detector : public ManufacturerSpec
80  {
81  private:
83  ome::compat::shared_ptr<double> zoom;
85  ome::compat::shared_ptr<double> amplificationGain;
87  ome::compat::shared_ptr<double> gain;
89  ome::compat::shared_ptr<double> offset;
91  ome::compat::shared_ptr<ome::xml::model::enums::DetectorType> type;
93  std::string id;
95  ome::compat::shared_ptr<double> voltage;
97  ome::compat::weak_ptr<ome::xml::model::Instrument> instrument;
98 
99  public:
101  Detector ();
102 
108  Detector (const Detector& copy);
109 
111  virtual
112  ~Detector ();
113 
114 
115 
130  static ome::compat::shared_ptr< Detector>
131  create(const common::xml::dom::Element& element,
133 
134  // Documented in superclass.
135  const std::string&
136  elementName() const;
137 
138  // Documented in superclass.
139  bool
140  validElementName(const std::string& name) const;
141 
142 
143  // -- OMEModelObject API methods --
144 
146  virtual void
147  update(const common::xml::dom::Element& element,
149 
150  public:
151  // -- Detector API methods --
152 
154  bool
155  link (ome::compat::shared_ptr<Reference>& reference,
156  ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
157 
163  ome::compat::shared_ptr<double>
164  getZoom ();
165 
171  const ome::compat::shared_ptr<double>
172  getZoom () const;
173 
179  void
180  setZoom (ome::compat::shared_ptr<double>& zoom);
181 
187  ome::compat::shared_ptr<double>
189 
195  const ome::compat::shared_ptr<double>
196  getAmplificationGain () const;
197 
203  void
204  setAmplificationGain (ome::compat::shared_ptr<double>& amplificationGain);
205 
211  ome::compat::shared_ptr<double>
212  getGain ();
213 
219  const ome::compat::shared_ptr<double>
220  getGain () const;
221 
227  void
228  setGain (ome::compat::shared_ptr<double>& gain);
229 
235  ome::compat::shared_ptr<double>
236  getOffset ();
237 
243  const ome::compat::shared_ptr<double>
244  getOffset () const;
245 
251  void
252  setOffset (ome::compat::shared_ptr<double>& offset);
253 
259  ome::compat::shared_ptr<ome::xml::model::enums::DetectorType>
260  getType ();
261 
267  const ome::compat::shared_ptr<ome::xml::model::enums::DetectorType>
268  getType () const;
269 
275  void
276  setType (ome::compat::shared_ptr<ome::xml::model::enums::DetectorType>& type);
277 
283  const std::string&
284  getID () const;
285 
291  void
292  setID (const std::string& id);
293 
299  ome::compat::shared_ptr<double>
300  getVoltage ();
301 
307  const ome::compat::shared_ptr<double>
308  getVoltage () const;
309 
315  void
316  setVoltage (ome::compat::shared_ptr<double>& voltage);
317 
323  ome::compat::weak_ptr<ome::xml::model::Instrument>
324  getInstrument ();
325 
331  const ome::compat::weak_ptr<ome::xml::model::Instrument>
332  getInstrument () const;
333 
339  void
340  setInstrument (ome::compat::weak_ptr<ome::xml::model::Instrument>& instrument_BackReference);
341 
342 
345  asXMLElement (common::xml::dom::Document& document) const;
346 
347 
348  protected:
349  // Documented in base class.
352  common::xml::dom::Element& element) const;
353 
354  public:
355  // Documented in superclass.
356  const std::string&
357  getXMLNamespace() const;
358  };
359 
360  }
361  }
362 }
363 
364 #endif // OME_XML_MODEL_DETECTOR_H
365 
366 /*
367  * Local Variables:
368  * mode:C++
369  * End:
370  */
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:429
const std::string & getID() const
Get the ID property.
Definition: Detector.cpp:380
void setVoltage(ome::compat::shared_ptr< double > &voltage)
Set the Voltage property.
Definition: Detector.cpp:408
void setAmplificationGain(ome::compat::shared_ptr< double > &amplificationGain)
Set the AmplificationGain property.
Definition: Detector.cpp:310
ome::compat::shared_ptr< double > getVoltage()
Get the Voltage property.
Definition: Detector.cpp:394
ome::compat::shared_ptr< std::string > model
Model property.
Definition: ManufacturerSpec.h:83
ome::compat::shared_ptr< double > offset
Offset property.
Definition: Detector.h:89
ome::compat::shared_ptr< double > getOffset()
Get the Offset property.
Definition: Detector.cpp:338
void setOffset(ome::compat::shared_ptr< double > &offset)
Set the Offset property.
Definition: Detector.cpp:352
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:436
DOM Document wrapper.
Definition: Document.h:82
DOM Element wrapper.
Definition: Element.h:66
void setID(const std::string &id)
Set the ID property.
Definition: Detector.cpp:387
void setZoom(ome::compat::shared_ptr< double > &zoom)
Set the Zoom property.
Definition: Detector.cpp:289
void setType(ome::compat::shared_ptr< ome::xml::model::enums::DetectorType > &type)
Set the Type property.
Definition: Detector.cpp:373
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:260
ome::compat::shared_ptr< double > voltage
Voltage property.
Definition: Detector.h:95
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:156
ome::compat::shared_ptr< ome::xml::model::enums::DetectorType > getType()
Get the Type property.
Definition: Detector.cpp:359
Detector model object.
Definition: Detector.h:79
ome::compat::weak_ptr< ome::xml::model::Instrument > getInstrument()
Get the Instrument property.
Definition: Detector.cpp:415
ome::compat::shared_ptr< double > getZoom()
Get the Zoom property.
Definition: Detector.cpp:275
void setGain(ome::compat::shared_ptr< double > &gain)
Set the Gain property.
Definition: Detector.cpp:331
Open Microscopy Environment C++ implementation.
Definition: CoreMetadata.cpp:40
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Detector.cpp:541
Detector()
Default constructor.
Definition: Detector.cpp:118
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:443
ome::compat::shared_ptr< double > gain
Gain property.
Definition: Detector.h:87
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Detector.cpp:172
ome::compat::shared_ptr< double > amplificationGain
AmplificationGain property.
Definition: Detector.h:85
ome::compat::shared_ptr< double > getGain()
Get the Gain property.
Definition: Detector.cpp:317
ome::compat::shared_ptr< ome::xml::model::enums::DetectorType > type
Type property.
Definition: Detector.h:91
std::string id
ID property.
Definition: Detector.h:93
const std::string & elementName() const
Get the element name of this model object.
Definition: Detector.cpp:165
ome::compat::weak_ptr< ome::xml::model::Instrument > instrument
Instrument_BackReference back reference.
Definition: Detector.h:97
ManufacturerSpec model object.
Definition: ManufacturerSpec.h:77
virtual ~Detector()
Destructor.
Definition: Detector.cpp:151
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:181
ome::compat::shared_ptr< double > getAmplificationGain()
Get the AmplificationGain property.
Definition: Detector.cpp:296
Boost.Log compatibility.
ome::compat::shared_ptr< double > zoom
Zoom property.
Definition: Detector.h:83
Xerces-C modern C++ wrapper.
Definition: Base.h:53