46 #ifndef OME_XML_MODEL_INSTRUMENT_H 47 #define OME_XML_MODEL_INSTRUMENT_H 57 #include <ome/common/xml/dom/Document.h> 58 #include <ome/common/xml/dom/Element.h> 59 #include <ome/common/xml/dom/Node.h> 61 #include <ome/xml/model/primitives/Quantity.h> 63 #include <ome/xml/model/Microscope.h> 64 #include <ome/xml/model/detail/OMEModelObject.h> 92 std::shared_ptr<Impl>
impl;
123 static std::shared_ptr<Instrument>
152 link (std::shared_ptr<Reference>& reference,
153 std::shared_ptr<ome::xml::model::OMEModelObject>&
object);
169 setID (
const std::string&
id);
176 std::shared_ptr<ome::xml::model::Microscope>
184 const std::shared_ptr<ome::xml::model::Microscope>
193 setMicroscope (std::shared_ptr<ome::xml::model::Microscope>& microscope);
200 std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type
209 std::vector<std::shared_ptr<ome::xml::model::LightSource>>&
218 const std::vector<std::shared_ptr<ome::xml::model::LightSource>>&
228 std::shared_ptr<ome::xml::model::LightSource>&
229 getLightSource (std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type index);
238 const std::shared_ptr<ome::xml::model::LightSource>&
239 getLightSource (std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type index)
const;
249 setLightSource (std::vector<std::shared_ptr<ome::xml::model::LightSource>>::size_type index,
250 std::shared_ptr<ome::xml::model::LightSource>& lightSource);
261 addLightSource (std::shared_ptr<ome::xml::model::LightSource>& lightSource);
280 std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type
289 std::vector<std::shared_ptr<ome::xml::model::Detector>>&
298 const std::vector<std::shared_ptr<ome::xml::model::Detector>>&
308 std::shared_ptr<ome::xml::model::Detector>&
309 getDetector (std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type index);
318 const std::shared_ptr<ome::xml::model::Detector>&
319 getDetector (std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type index)
const;
329 setDetector (std::vector<std::shared_ptr<ome::xml::model::Detector>>::size_type index,
330 std::shared_ptr<ome::xml::model::Detector>& detector);
341 addDetector (std::shared_ptr<ome::xml::model::Detector>& detector);
353 removeDetector (std::shared_ptr<ome::xml::model::Detector>& detector);
360 std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type
369 std::vector<std::shared_ptr<ome::xml::model::Objective>>&
378 const std::vector<std::shared_ptr<ome::xml::model::Objective>>&
388 std::shared_ptr<ome::xml::model::Objective>&
389 getObjective (std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type index);
398 const std::shared_ptr<ome::xml::model::Objective>&
399 getObjective (std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type index)
const;
409 setObjective (std::vector<std::shared_ptr<ome::xml::model::Objective>>::size_type index,
410 std::shared_ptr<ome::xml::model::Objective>& objective);
421 addObjective (std::shared_ptr<ome::xml::model::Objective>& objective);
433 removeObjective (std::shared_ptr<ome::xml::model::Objective>& objective);
440 std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type
449 std::vector<std::shared_ptr<ome::xml::model::FilterSet>>&
458 const std::vector<std::shared_ptr<ome::xml::model::FilterSet>>&
468 std::shared_ptr<ome::xml::model::FilterSet>&
469 getFilterSet (std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type index);
478 const std::shared_ptr<ome::xml::model::FilterSet>&
479 getFilterSet (std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type index)
const;
489 setFilterSet (std::vector<std::shared_ptr<ome::xml::model::FilterSet>>::size_type index,
490 std::shared_ptr<ome::xml::model::FilterSet>& filterSet);
501 addFilterSet (std::shared_ptr<ome::xml::model::FilterSet>& filterSet);
513 removeFilterSet (std::shared_ptr<ome::xml::model::FilterSet>& filterSet);
520 std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type
529 std::vector<std::shared_ptr<ome::xml::model::Filter>>&
538 const std::vector<std::shared_ptr<ome::xml::model::Filter>>&
548 std::shared_ptr<ome::xml::model::Filter>&
549 getFilter (std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type index);
558 const std::shared_ptr<ome::xml::model::Filter>&
559 getFilter (std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type index)
const;
569 setFilter (std::vector<std::shared_ptr<ome::xml::model::Filter>>::size_type index,
570 std::shared_ptr<ome::xml::model::Filter>& filter);
581 addFilter (std::shared_ptr<ome::xml::model::Filter>& filter);
593 removeFilter (std::shared_ptr<ome::xml::model::Filter>& filter);
600 std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type
609 std::vector<std::shared_ptr<ome::xml::model::Dichroic>>&
618 const std::vector<std::shared_ptr<ome::xml::model::Dichroic>>&
628 std::shared_ptr<ome::xml::model::Dichroic>&
629 getDichroic (std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type index);
638 const std::shared_ptr<ome::xml::model::Dichroic>&
639 getDichroic (std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type index)
const;
649 setDichroic (std::vector<std::shared_ptr<ome::xml::model::Dichroic>>::size_type index,
650 std::shared_ptr<ome::xml::model::Dichroic>& dichroic);
661 addDichroic (std::shared_ptr<ome::xml::model::Dichroic>& dichroic);
673 removeDichroic (std::shared_ptr<ome::xml::model::Dichroic>& dichroic);
698 const std::weak_ptr<ome::xml::model::Annotation>&
711 const std::weak_ptr<ome::xml::model::Annotation>&
713 const std::shared_ptr<ome::xml::model::Annotation>& annotation);
726 linkAnnotation (
const std::shared_ptr<ome::xml::model::Annotation>& annotation);
744 unlinkAnnotation (
const std::shared_ptr<ome::xml::model::Annotation>& annotation);
769 const std::weak_ptr<ome::xml::model::Image>&
782 const std::weak_ptr<ome::xml::model::Image>&
784 const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
797 linkImage (
const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
815 unlinkImage (
const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
833 #endif // OME_XML_MODEL_INSTRUMENT_H OME model interface (abstract top-level container)
Definition: OMEModel.h:61
std::vector< std::shared_ptr< ome::xml::model::Dichroic > >::size_type sizeOfDichroicList() const
Get size of linked Dichroic list.
Definition: Instrument.cpp:746
std::shared_ptr< ome::xml::model::Objective > & getObjective(std::vector< std::shared_ptr< ome::xml::model::Objective >>::size_type index)
Get Objective.
Definition: Instrument.cpp:590
Instrument model object.
Definition: Instrument.h:87
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Instrument.cpp:810
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Instrument.cpp:864
static std::shared_ptr< Instrument > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Instrument model object from DOM element.
Definition: Instrument.cpp:230
void addDetector(std::shared_ptr< ome::xml::model::Detector > &detector)
Add Detector.
Definition: Instrument.cpp:553
std::shared_ptr< ome::xml::model::FilterSet > & getFilterSet(std::vector< std::shared_ptr< ome::xml::model::FilterSet >>::size_type index)
Get FilterSet.
Definition: Instrument.cpp:648
void addDichroic(std::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Add Dichroic.
Definition: Instrument.cpp:785
std::shared_ptr< ome::xml::model::Microscope > getMicroscope()
Get the Microscope property.
Definition: Instrument.cpp:435
void addFilterSet(std::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Add FilterSet.
Definition: Instrument.cpp:669
void setDichroic(std::vector< std::shared_ptr< ome::xml::model::Dichroic >>::size_type index, std::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Set Dichroic.
Definition: Instrument.cpp:776
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
virtual ~Instrument()
Destructor.
Definition: Instrument.cpp:225
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setID(const std::string &id)
Set the ID property.
Definition: Instrument.cpp:428
std::vector< std::shared_ptr< ome::xml::model::FilterSet > > & getFilterSetList()
Get the FilterSet list.
Definition: Instrument.cpp:636
std::shared_ptr< ome::xml::model::Detector > & getDetector(std::vector< std::shared_ptr< ome::xml::model::Detector >>::size_type index)
Get Detector.
Definition: Instrument.cpp:532
std::vector< std::shared_ptr< ome::xml::model::FilterSet > >::size_type sizeOfFilterSetList() const
Get size of linked FilterSet list.
Definition: Instrument.cpp:630
std::shared_ptr< ome::xml::model::LightSource > & getLightSource(std::vector< std::shared_ptr< ome::xml::model::LightSource >>::size_type index)
Get LightSource.
Definition: Instrument.cpp:474
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: Instrument.cpp:252
void setFilter(std::vector< std::shared_ptr< ome::xml::model::Filter >>::size_type index, std::shared_ptr< ome::xml::model::Filter > &filter)
Set Filter.
Definition: Instrument.cpp:718
std::vector< std::shared_ptr< ome::xml::model::LightSource > > & getLightSourceList()
Get the LightSource list.
Definition: Instrument.cpp:462
Private implementation details of Instrument model object.
Definition: Instrument.cpp:100
const std::string & elementName() const
Get the element name of this model object.
Definition: Instrument.cpp:239
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Instrument.cpp:832
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
std::vector< std::shared_ptr< ome::xml::model::LightSource > >::size_type sizeOfLightSourceList() const
Get size of linked LightSource list.
Definition: Instrument.cpp:456
Open Microscopy Environment C++ implementation.
const std::string & getID() const
Get the ID property.
Definition: Instrument.cpp:421
std::shared_ptr< ome::xml::model::Dichroic > & getDichroic(std::vector< std::shared_ptr< ome::xml::model::Dichroic >>::size_type index)
Get Dichroic.
Definition: Instrument.cpp:764
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Instrument.cpp:1050
void addLightSource(std::shared_ptr< ome::xml::model::LightSource > &lightSource)
Add LightSource.
Definition: Instrument.cpp:495
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Instrument.cpp:870
const std::weak_ptr< ome::xml::model::Image > & getLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index) const
Get linked Image.
Definition: Instrument.cpp:876
std::vector< std::shared_ptr< ome::xml::model::Detector > > & getDetectorList()
Get the Detector list.
Definition: Instrument.cpp:520
void setFilterSet(std::vector< std::shared_ptr< ome::xml::model::FilterSet >>::size_type index, std::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Set FilterSet.
Definition: Instrument.cpp:660
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: Instrument.cpp:822
std::vector< std::shared_ptr< ome::xml::model::Objective > > & getObjectiveList()
Get the Objective list.
Definition: Instrument.cpp:578
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: Instrument.cpp:390
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: Instrument.cpp:816
std::vector< std::shared_ptr< ome::xml::model::Objective > >::size_type sizeOfObjectiveList() const
Get size of linked Objective list.
Definition: Instrument.cpp:572
void addFilter(std::shared_ptr< ome::xml::model::Filter > &filter)
Add Filter.
Definition: Instrument.cpp:727
void setDetector(std::vector< std::shared_ptr< ome::xml::model::Detector >>::size_type index, std::shared_ptr< ome::xml::model::Detector > &detector)
Set Detector.
Definition: Instrument.cpp:544
void addObjective(std::shared_ptr< ome::xml::model::Objective > &objective)
Add Objective.
Definition: Instrument.cpp:611
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Instrument.cpp:804
std::vector< std::shared_ptr< ome::xml::model::Dichroic > > & getDichroicList()
Get the Dichroic list.
Definition: Instrument.cpp:752
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Instrument.cpp:846
const std::weak_ptr< ome::xml::model::Image > & setLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Set linked Image.
Definition: Instrument.cpp:882
std::vector< std::shared_ptr< ome::xml::model::Detector > >::size_type sizeOfDetectorList() const
Get size of linked Detector list.
Definition: Instrument.cpp:514
void setMicroscope(std::shared_ptr< ome::xml::model::Microscope > µscope)
Set the Microscope property.
Definition: Instrument.cpp:449
bool linkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: Instrument.cpp:892
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: Instrument.cpp:921
std::vector< std::shared_ptr< ome::xml::model::Filter > >::size_type sizeOfFilterList() const
Get size of linked Filter list.
Definition: Instrument.cpp:688
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Instrument.cpp:246
void removeFilterSet(std::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Remove FilterSet.
Definition: Instrument.cpp:677
void removeObjective(std::shared_ptr< ome::xml::model::Objective > &objective)
Remove Objective.
Definition: Instrument.cpp:619
void removeFilter(std::shared_ptr< ome::xml::model::Filter > &filter)
Remove Filter.
Definition: Instrument.cpp:735
void setObjective(std::vector< std::shared_ptr< ome::xml::model::Objective >>::size_type index, std::shared_ptr< ome::xml::model::Objective > &objective)
Set Objective.
Definition: Instrument.cpp:602
void removeLightSource(std::shared_ptr< ome::xml::model::LightSource > &lightSource)
Remove LightSource.
Definition: Instrument.cpp:503
Instrument()
Default constructor.
Definition: Instrument.cpp:206
void setLightSource(std::vector< std::shared_ptr< ome::xml::model::LightSource >>::size_type index, std::shared_ptr< ome::xml::model::LightSource > &lightSource)
Set LightSource.
Definition: Instrument.cpp:486
std::vector< std::shared_ptr< ome::xml::model::Filter > > & getFilterList()
Get the Filter list.
Definition: Instrument.cpp:694
void removeDetector(std::shared_ptr< ome::xml::model::Detector > &detector)
Remove Detector.
Definition: Instrument.cpp:561
void removeDichroic(std::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Remove Dichroic.
Definition: Instrument.cpp:793
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: Instrument.cpp:905
std::shared_ptr< ome::xml::model::Filter > & getFilter(std::vector< std::shared_ptr< ome::xml::model::Filter >>::size_type index)
Get Filter.
Definition: Instrument.cpp:706
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Instrument.h:90