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> 60 #include <ome/common/xml/dom/NodeList.h> 62 #include <ome/xml/model/primitives/Quantity.h> 64 #include <ome/xml/model/Microscope.h> 65 #include <ome/xml/model/detail/OMEModelObject.h> 93 ome::compat::shared_ptr<Impl>
impl;
124 static ome::compat::shared_ptr< Instrument>
154 link (ome::compat::shared_ptr<Reference>& reference,
155 ome::compat::shared_ptr< ome::xml::model::OMEModelObject>&
object);
171 setID (
const std::string&
id);
178 ome::compat::shared_ptr<ome::xml::model::Microscope>
186 const ome::compat::shared_ptr<ome::xml::model::Microscope>
195 setMicroscope (ome::compat::shared_ptr<ome::xml::model::Microscope>& microscope);
202 std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type
211 std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >&
220 const std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >&
230 ome::compat::shared_ptr<ome::xml::model::LightSource>&
231 getLightSource (std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type index);
240 const ome::compat::shared_ptr<ome::xml::model::LightSource>&
241 getLightSource (std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type index)
const;
251 setLightSource (std::vector<ome::compat::shared_ptr<ome::xml::model::LightSource> >::size_type index,
252 ome::compat::shared_ptr<ome::xml::model::LightSource>& lightSource);
263 addLightSource (ome::compat::shared_ptr<ome::xml::model::LightSource>& lightSource);
275 removeLightSource (ome::compat::shared_ptr<ome::xml::model::LightSource>& lightSource);
282 std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type
291 std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >&
300 const std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >&
310 ome::compat::shared_ptr<ome::xml::model::Detector>&
311 getDetector (std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type index);
320 const ome::compat::shared_ptr<ome::xml::model::Detector>&
321 getDetector (std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type index)
const;
331 setDetector (std::vector<ome::compat::shared_ptr<ome::xml::model::Detector> >::size_type index,
332 ome::compat::shared_ptr<ome::xml::model::Detector>& detector);
343 addDetector (ome::compat::shared_ptr<ome::xml::model::Detector>& detector);
355 removeDetector (ome::compat::shared_ptr<ome::xml::model::Detector>& detector);
362 std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type
371 std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >&
380 const std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >&
390 ome::compat::shared_ptr<ome::xml::model::Objective>&
391 getObjective (std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type index);
400 const ome::compat::shared_ptr<ome::xml::model::Objective>&
401 getObjective (std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type index)
const;
411 setObjective (std::vector<ome::compat::shared_ptr<ome::xml::model::Objective> >::size_type index,
412 ome::compat::shared_ptr<ome::xml::model::Objective>& objective);
423 addObjective (ome::compat::shared_ptr<ome::xml::model::Objective>& objective);
435 removeObjective (ome::compat::shared_ptr<ome::xml::model::Objective>& objective);
442 std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type
451 std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >&
460 const std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >&
470 ome::compat::shared_ptr<ome::xml::model::FilterSet>&
471 getFilterSet (std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type index);
480 const ome::compat::shared_ptr<ome::xml::model::FilterSet>&
481 getFilterSet (std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type index)
const;
491 setFilterSet (std::vector<ome::compat::shared_ptr<ome::xml::model::FilterSet> >::size_type index,
492 ome::compat::shared_ptr<ome::xml::model::FilterSet>& filterSet);
503 addFilterSet (ome::compat::shared_ptr<ome::xml::model::FilterSet>& filterSet);
515 removeFilterSet (ome::compat::shared_ptr<ome::xml::model::FilterSet>& filterSet);
522 std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type
531 std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >&
540 const std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >&
550 ome::compat::shared_ptr<ome::xml::model::Filter>&
551 getFilter (std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type index);
560 const ome::compat::shared_ptr<ome::xml::model::Filter>&
561 getFilter (std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type index)
const;
571 setFilter (std::vector<ome::compat::shared_ptr<ome::xml::model::Filter> >::size_type index,
572 ome::compat::shared_ptr<ome::xml::model::Filter>& filter);
583 addFilter (ome::compat::shared_ptr<ome::xml::model::Filter>& filter);
595 removeFilter (ome::compat::shared_ptr<ome::xml::model::Filter>& filter);
602 std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type
611 std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >&
620 const std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >&
630 ome::compat::shared_ptr<ome::xml::model::Dichroic>&
631 getDichroic (std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type index);
640 const ome::compat::shared_ptr<ome::xml::model::Dichroic>&
641 getDichroic (std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type index)
const;
651 setDichroic (std::vector<ome::compat::shared_ptr<ome::xml::model::Dichroic> >::size_type index,
652 ome::compat::shared_ptr<ome::xml::model::Dichroic>& dichroic);
663 addDichroic (ome::compat::shared_ptr<ome::xml::model::Dichroic>& dichroic);
675 removeDichroic (ome::compat::shared_ptr<ome::xml::model::Dichroic>& dichroic);
700 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
713 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
715 const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
728 linkAnnotation (
const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
746 unlinkAnnotation (
const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
771 const ome::compat::weak_ptr<ome::xml::model::Image>&
784 const ome::compat::weak_ptr<ome::xml::model::Image>&
786 const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
799 linkImage (
const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
817 unlinkImage (
const ome::compat::shared_ptr<ome::xml::model::Image>& image_BackReference);
840 #endif // OME_XML_MODEL_INSTRUMENT_H OME model interface (abstract top-level container)
Definition: OMEModel.h:62
void setMicroscope(ome::compat::shared_ptr< ome::xml::model::Microscope > µscope)
Set the Microscope property.
Definition: Instrument.cpp:460
std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > > & getFilterSetList()
Get the FilterSet list.
Definition: Instrument.cpp:647
std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > >::size_type sizeOfDetectorList() const
Get size of linked Detector list.
Definition: Instrument.cpp:525
Instrument model object.
Definition: Instrument.h:88
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Instrument.h:91
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Instrument.cpp:932
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Instrument.cpp:815
bool linkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: Instrument.cpp:903
virtual ~Instrument()
Destructor.
Definition: Instrument.cpp:217
void removeFilterSet(ome::compat::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Remove FilterSet.
Definition: Instrument.cpp:688
void addDichroic(ome::compat::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Add Dichroic.
Definition: Instrument.cpp:796
std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > > & getFilterList()
Get the Filter list.
Definition: Instrument.cpp:705
void addFilter(ome::compat::shared_ptr< ome::xml::model::Filter > &filter)
Add Filter.
Definition: Instrument.cpp:738
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
void setID(const std::string &id)
Set the ID property.
Definition: Instrument.cpp:439
void removeFilter(ome::compat::shared_ptr< ome::xml::model::Filter > &filter)
Remove Filter.
Definition: Instrument.cpp:746
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 > >, ome::compat::owner_less< Ptr< T > > > > > type
Multi-index container type.
Definition: OMEModelObject.h:94
std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > >::size_type sizeOfObjectiveList() const
Get size of linked Objective list.
Definition: Instrument.cpp:583
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Instrument.cpp:857
void addFilterSet(ome::compat::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Add FilterSet.
Definition: Instrument.cpp:680
std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > >::size_type sizeOfFilterSetList() const
Get size of linked FilterSet list.
Definition: Instrument.cpp:641
void addObjective(ome::compat::shared_ptr< ome::xml::model::Objective > &objective)
Add Objective.
Definition: Instrument.cpp:622
std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > > & getDichroicList()
Get the Dichroic list.
Definition: Instrument.cpp:763
std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > >::size_type sizeOfDichroicList() const
Get size of linked Dichroic list.
Definition: Instrument.cpp:757
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: Instrument.cpp:246
bool unlinkImage(const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: Instrument.cpp:916
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: Instrument.cpp:401
Private implementation details of Instrument model object.
Definition: Instrument.cpp:100
void setDichroic(std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Set Dichroic.
Definition: Instrument.cpp:787
const std::string & elementName() const
Get the element name of this model object.
Definition: Instrument.cpp:231
ome::compat::shared_ptr< ome::xml::model::Objective > & getObjective(std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > >::size_type index)
Get Objective.
Definition: Instrument.cpp:601
const ome::compat::weak_ptr< ome::xml::model::Image > & getLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type index) const
Get linked Image.
Definition: Instrument.cpp:887
std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > > & getDetectorList()
Get the Detector list.
Definition: Instrument.cpp:531
std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > > & getObjectiveList()
Get the Objective list.
Definition: Instrument.cpp:589
const ome::compat::weak_ptr< ome::xml::model::Annotation > & getLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type index) const
Get linked Annotation.
Definition: Instrument.cpp:827
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
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: Instrument.cpp:939
ome::compat::shared_ptr< ome::xml::model::FilterSet > & getFilterSet(std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > >::size_type index)
Get FilterSet.
Definition: Instrument.cpp:659
Open Microscopy Environment C++ implementation.
void addDetector(ome::compat::shared_ptr< ome::xml::model::Detector > &detector)
Add Detector.
Definition: Instrument.cpp:564
const std::string & getID() const
Get the ID property.
Definition: Instrument.cpp:432
ome::compat::shared_ptr< ome::xml::model::LightSource > & getLightSource(std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > >::size_type index)
Get LightSource.
Definition: Instrument.cpp:485
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Instrument.cpp:1092
void setLightSource(std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > >::size_type index, ome::compat::shared_ptr< ome::xml::model::LightSource > &lightSource)
Set LightSource.
Definition: Instrument.cpp:497
void removeLightSource(ome::compat::shared_ptr< ome::xml::model::LightSource > &lightSource)
Remove LightSource.
Definition: Instrument.cpp:514
const ome::compat::weak_ptr< ome::xml::model::Annotation > & setLinkedAnnotation(OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Set linked Annotation.
Definition: Instrument.cpp:833
std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > > & getLightSourceList()
Get the LightSource list.
Definition: Instrument.cpp:473
void removeDetector(ome::compat::shared_ptr< ome::xml::model::Detector > &detector)
Remove Detector.
Definition: Instrument.cpp:572
ome::compat::shared_ptr< ome::xml::model::Detector > & getDetector(std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > >::size_type index)
Get Detector.
Definition: Instrument.cpp:543
void setFilter(std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Filter > &filter)
Set Filter.
Definition: Instrument.cpp:729
void setObjective(std::vector< ome::compat::shared_ptr< ome::xml::model::Objective > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Objective > &objective)
Set Objective.
Definition: Instrument.cpp:613
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: Instrument.cpp:875
const ome::compat::weak_ptr< ome::xml::model::Image > & setLinkedImage(OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Image > &image_BackReference)
Set linked Image.
Definition: Instrument.cpp:893
std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > >::size_type sizeOfFilterList() const
Get size of linked Filter list.
Definition: Instrument.cpp:699
void setFilterSet(std::vector< ome::compat::shared_ptr< ome::xml::model::FilterSet > >::size_type index, ome::compat::shared_ptr< ome::xml::model::FilterSet > &filterSet)
Set FilterSet.
Definition: Instrument.cpp:671
static ome::compat::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:222
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Instrument.cpp:238
std::vector< ome::compat::shared_ptr< ome::xml::model::LightSource > >::size_type sizeOfLightSourceList() const
Get size of linked LightSource list.
Definition: Instrument.cpp:467
Instrument()
Default constructor.
Definition: Instrument.cpp:202
void addLightSource(ome::compat::shared_ptr< ome::xml::model::LightSource > &lightSource)
Add LightSource.
Definition: Instrument.cpp:506
void removeObjective(ome::compat::shared_ptr< ome::xml::model::Objective > &objective)
Remove Objective.
Definition: Instrument.cpp:630
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Instrument.cpp:821
ome::compat::shared_ptr< ome::xml::model::Microscope > getMicroscope()
Get the Microscope property.
Definition: Instrument.cpp:446
void removeDichroic(ome::compat::shared_ptr< ome::xml::model::Dichroic > &dichroic)
Remove Dichroic.
Definition: Instrument.cpp:804
Instrument & operator=(const Instrument &)
Assignment operator (deleted).
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Instrument.cpp:843
ome::compat::shared_ptr< ome::xml::model::Filter > & getFilter(std::vector< ome::compat::shared_ptr< ome::xml::model::Filter > >::size_type index)
Get Filter.
Definition: Instrument.cpp:717
ome::compat::shared_ptr< ome::xml::model::Dichroic > & getDichroic(std::vector< ome::compat::shared_ptr< ome::xml::model::Dichroic > >::size_type index)
Get Dichroic.
Definition: Instrument.cpp:775
OMEModelObject::indexed_container< ome::xml::model::Image, ome::compat::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: Instrument.cpp:881
void setDetector(std::vector< ome::compat::shared_ptr< ome::xml::model::Detector > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Detector > &detector)
Set Detector.
Definition: Instrument.cpp:555