ome-xml  5.6.0
Filter.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_FILTER_H
47 #define OME_XML_MODEL_FILTER_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/TransmittanceRange.h>
66 #include <ome/xml/model/enums/FilterType.h>
67 
68 namespace ome
69 {
70  namespace xml
71  {
72  namespace model
73  {
74 
75  // Forward declarations.
76  class Annotation;
77  class FilterSet;
78  class LightPath;
79  class OMEModel;
80 
84  class Filter : public ManufacturerSpec
85  {
86  private:
87  class Impl;
89  std::shared_ptr<Impl> impl;
90 
91  public:
93  Filter();
94 
100  Filter (const Filter& copy);
101 
103  virtual
104  ~Filter ();
105 
120  static std::shared_ptr<Filter>
121  create(const common::xml::dom::Element& element,
123 
124  // Documented in superclass.
125  const std::string&
126  elementName() const;
127 
128  // Documented in superclass.
129  bool
130  validElementName(const std::string& name) const;
131 
133  Filter&
134  operator= (const Filter&) = delete;
136 
137  // -- OMEModelObject API methods --
138 
140  virtual void
141  update(const common::xml::dom::Element& element,
143 
144  public:
145  // -- Filter API methods --
146 
148  bool
149  link (std::shared_ptr<Reference>& reference,
150  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
151 
157  std::shared_ptr<std::string>
158  getFilterWheel ();
159 
165  const std::shared_ptr<std::string>
166  getFilterWheel () const;
167 
173  void
174  setFilterWheel (std::shared_ptr<std::string>& filterWheel);
175 
181  std::shared_ptr<ome::xml::model::enums::FilterType>
182  getType ();
183 
189  const std::shared_ptr<ome::xml::model::enums::FilterType>
190  getType () const;
191 
197  void
198  setType (std::shared_ptr<ome::xml::model::enums::FilterType>& type);
199 
205  const std::string&
206  getID () const;
207 
213  void
214  setID (const std::string& id);
215 
221  std::shared_ptr<ome::xml::model::TransmittanceRange>
223 
229  const std::shared_ptr<ome::xml::model::TransmittanceRange>
230  getTransmittanceRange () const;
231 
237  void
238  setTransmittanceRange (std::shared_ptr<ome::xml::model::TransmittanceRange>& transmittanceRange);
239 
247 
254  getLinkedAnnotationList () const;
255 
263  const std::weak_ptr<ome::xml::model::Annotation>&
265 
276  const std::weak_ptr<ome::xml::model::Annotation>&
278  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
279 
290  bool
291  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
292 
308  bool
309  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
310 
316  std::weak_ptr<ome::xml::model::Instrument>
317  getInstrument ();
318 
324  const std::weak_ptr<ome::xml::model::Instrument>
325  getInstrument () const;
326 
332  void
333  setInstrument (std::weak_ptr<ome::xml::model::Instrument>& instrument_BackReference);
334 
342 
350 
358  const std::weak_ptr<ome::xml::model::FilterSet>&
360 
371  const std::weak_ptr<ome::xml::model::FilterSet>&
373  const std::shared_ptr<ome::xml::model::FilterSet>& filterSet_BackReference);
374 
385  bool
386  linkFilterSetExcitationFilter (const std::shared_ptr<ome::xml::model::FilterSet>& filterSet_BackReference);
387 
403  bool
404  unlinkFilterSetExcitationFilter (const std::shared_ptr<ome::xml::model::FilterSet>& filterSet_BackReference);
405 
413 
421 
429  const std::weak_ptr<ome::xml::model::FilterSet>&
431 
442  const std::weak_ptr<ome::xml::model::FilterSet>&
444  const std::shared_ptr<ome::xml::model::FilterSet>& filterSet_BackReference);
445 
456  bool
457  linkFilterSetEmissionFilter (const std::shared_ptr<ome::xml::model::FilterSet>& filterSet_BackReference);
458 
474  bool
475  unlinkFilterSetEmissionFilter (const std::shared_ptr<ome::xml::model::FilterSet>& filterSet_BackReference);
476 
484 
492 
500  const std::weak_ptr<ome::xml::model::LightPath>&
502 
513  const std::weak_ptr<ome::xml::model::LightPath>&
515  const std::shared_ptr<ome::xml::model::LightPath>& lightPath_BackReference);
516 
527  bool
528  linkLightPathExcitationFilter (const std::shared_ptr<ome::xml::model::LightPath>& lightPath_BackReference);
529 
545  bool
546  unlinkLightPathExcitationFilter (const std::shared_ptr<ome::xml::model::LightPath>& lightPath_BackReference);
547 
555 
563 
571  const std::weak_ptr<ome::xml::model::LightPath>&
573 
584  const std::weak_ptr<ome::xml::model::LightPath>&
586  const std::shared_ptr<ome::xml::model::LightPath>& lightPath_BackReference);
587 
598  bool
599  linkLightPathEmissionFilter (const std::shared_ptr<ome::xml::model::LightPath>& lightPath_BackReference);
600 
616  bool
617  unlinkLightPathEmissionFilter (const std::shared_ptr<ome::xml::model::LightPath>& lightPath_BackReference);
618 
619  protected:
620  // Documented in base class.
621  virtual void
623  common::xml::dom::Element& element) const;
624 
625  public:
626  // Documented in superclass.
627  const std::string&
628  getXMLNamespace() const;
629  };
630 
631  }
632  }
633 }
634 
635 #endif // OME_XML_MODEL_FILTER_H
636 
637 /*
638  * Local Variables:
639  * mode:C++
640  * End:
641  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
std::weak_ptr< ome::xml::model::Instrument > getInstrument()
Get the Instrument property.
Definition: Filter.cpp:468
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Filter.cpp:224
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Filter.cpp:436
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Filter.h:87
static std::shared_ptr< Filter > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Filter model object from DOM element.
Definition: Filter.cpp:208
std::shared_ptr< ome::xml::model::enums::FilterType > getType()
Get the Type property.
Definition: Filter.cpp:352
const std::weak_ptr< ome::xml::model::FilterSet > & setLinkedFilterSetExcitationFilter(OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::FilterSet > &filterSet_BackReference)
Set linked FilterSetExcitationFilter.
Definition: Filter.cpp:507
Filter()
Default constructor.
Definition: Filter.cpp:184
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Filter.cpp:450
const std::string & elementName() const
Get the element name of this model object.
Definition: Filter.cpp:217
virtual ~Filter()
Destructor.
Definition: Filter.cpp:203
bool linkLightPathEmissionFilter(const std::shared_ptr< ome::xml::model::LightPath > &lightPath_BackReference)
Link LightPathEmissionFilter.
Definition: Filter.cpp:691
void setTransmittanceRange(std::shared_ptr< ome::xml::model::TransmittanceRange > &transmittanceRange)
Set the TransmittanceRange property.
Definition: Filter.cpp:401
void setFilterWheel(std::shared_ptr< std::string > &filterWheel)
Set the FilterWheel property.
Definition: Filter.cpp:345
OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type::size_type sizeOfLinkedFilterSetEmissionFilterList() const
Get size of linked FilterSetEmissionFilter list.
Definition: Filter.cpp:547
std::shared_ptr< std::string > getFilterWheel()
Get the FilterWheel property.
Definition: Filter.cpp:331
const std::weak_ptr< ome::xml::model::LightPath > & getLinkedLightPathExcitationFilter(OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type::size_type index) const
Get linked LightPathExcitationFilter.
Definition: Filter.cpp:617
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: Filter.cpp:420
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
OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type getLinkedLightPathEmissionFilterList() const
Get the linked LightPathEmissionFilter list.
Definition: Filter.cpp:669
OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type getLinkedLightPathExcitationFilterList() const
Get the linked LightPathExcitationFilter list.
Definition: Filter.cpp:611
bool unlinkLightPathExcitationFilter(const std::shared_ptr< ome::xml::model::LightPath > &lightPath_BackReference)
Unlink LightPathExcitationFilter.
Definition: Filter.cpp:646
bool linkFilterSetExcitationFilter(const std::shared_ptr< ome::xml::model::FilterSet > &filterSet_BackReference)
Link FilterSetExcitationFilter.
Definition: Filter.cpp:517
const std::string & getID() const
Get the ID property.
Definition: Filter.cpp:373
void setInstrument(std::weak_ptr< ome::xml::model::Instrument > &instrument_BackReference)
Set the Instrument property.
Definition: Filter.cpp:482
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: Filter.cpp:426
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type::size_type sizeOfLinkedLightPathEmissionFilterList() const
Get size of linked LightPathEmissionFilter list.
Definition: Filter.cpp:663
Private implementation details of Filter model object.
Definition: Filter.cpp:78
Open Microscopy Environment C++ implementation.
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: Filter.cpp:230
OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type::size_type sizeOfLinkedLightPathExcitationFilterList() const
Get size of linked LightPathExcitationFilter list.
Definition: Filter.cpp:605
OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type getLinkedFilterSetExcitationFilterList() const
Get the linked FilterSetExcitationFilter list.
Definition: Filter.cpp:495
bool linkLightPathExcitationFilter(const std::shared_ptr< ome::xml::model::LightPath > &lightPath_BackReference)
Link LightPathExcitationFilter.
Definition: Filter.cpp:633
bool unlinkLightPathEmissionFilter(const std::shared_ptr< ome::xml::model::LightPath > &lightPath_BackReference)
Unlink LightPathEmissionFilter.
Definition: Filter.cpp:704
std::shared_ptr< ome::xml::model::TransmittanceRange > getTransmittanceRange()
Get the TransmittanceRange property.
Definition: Filter.cpp:387
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Filter.cpp:408
const std::weak_ptr< ome::xml::model::FilterSet > & getLinkedFilterSetExcitationFilter(OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type::size_type index) const
Get linked FilterSetExcitationFilter.
Definition: Filter.cpp:501
const std::weak_ptr< ome::xml::model::LightPath > & setLinkedLightPathEmissionFilter(OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::LightPath > &lightPath_BackReference)
Set linked LightPathEmissionFilter.
Definition: Filter.cpp:681
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: Filter.cpp:720
bool unlinkFilterSetEmissionFilter(const std::shared_ptr< ome::xml::model::FilterSet > &filterSet_BackReference)
Unlink FilterSetEmissionFilter.
Definition: Filter.cpp:588
ManufacturerSpec model object.
Definition: ManufacturerSpec.h:78
const std::weak_ptr< ome::xml::model::LightPath > & getLinkedLightPathEmissionFilter(OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type::size_type index) const
Get linked LightPathEmissionFilter.
Definition: Filter.cpp:675
Filter model object.
Definition: Filter.h:84
const std::weak_ptr< ome::xml::model::FilterSet > & getLinkedFilterSetEmissionFilter(OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type::size_type index) const
Get linked FilterSetEmissionFilter.
Definition: Filter.cpp:559
OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type getLinkedFilterSetEmissionFilterList() const
Get the linked FilterSetEmissionFilter list.
Definition: Filter.cpp:553
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Filter.cpp:414
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Filter.cpp:791
const std::weak_ptr< ome::xml::model::LightPath > & setLinkedLightPathExcitationFilter(OMEModelObject::indexed_container< ome::xml::model::LightPath, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::LightPath > &lightPath_BackReference)
Set linked LightPathExcitationFilter.
Definition: Filter.cpp:623
OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type::size_type sizeOfLinkedFilterSetExcitationFilterList() const
Get size of linked FilterSetExcitationFilter list.
Definition: Filter.cpp:489
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: Filter.cpp:300
void setID(const std::string &id)
Set the ID property.
Definition: Filter.cpp:380
bool unlinkFilterSetExcitationFilter(const std::shared_ptr< ome::xml::model::FilterSet > &filterSet_BackReference)
Unlink FilterSetExcitationFilter.
Definition: Filter.cpp:530
void setType(std::shared_ptr< ome::xml::model::enums::FilterType > &type)
Set the Type property.
Definition: Filter.cpp:366
bool linkFilterSetEmissionFilter(const std::shared_ptr< ome::xml::model::FilterSet > &filterSet_BackReference)
Link FilterSetEmissionFilter.
Definition: Filter.cpp:575
const std::weak_ptr< ome::xml::model::FilterSet > & setLinkedFilterSetEmissionFilter(OMEModelObject::indexed_container< ome::xml::model::FilterSet, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::FilterSet > &filterSet_BackReference)
Set linked FilterSetEmissionFilter.
Definition: Filter.cpp:565