ome-xml  5.5.1
ROI.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_ROI_H
47 #define OME_XML_MODEL_ROI_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/Union.h>
64 #include <ome/xml/model/detail/OMEModelObject.h>
65 
66 namespace ome
67 {
68  namespace xml
69  {
70  namespace model
71  {
72 
73  // Forward declarations.
74  class Annotation;
75  class Folder;
76  class Image;
77  class MicrobeamManipulation;
78  class OMEModel;
79 
83  class ROI : public detail::OMEModelObject
84  {
85  private:
86  class Impl;
88  std::shared_ptr<Impl> impl;
89 
90  public:
92  ROI();
93 
99  ROI (const ROI& copy);
100 
102  virtual
103  ~ROI ();
104 
119  static std::shared_ptr<ROI>
120  create(const common::xml::dom::Element& element,
122 
123  // Documented in superclass.
124  const std::string&
125  elementName() const;
126 
127  // Documented in superclass.
128  bool
129  validElementName(const std::string& name) const;
130 
131  private:
133  ROI&
134  operator= (const ROI&);
135 
136  public:
137  // -- OMEModelObject API methods --
138 
140  virtual void
141  update(const common::xml::dom::Element& element,
143 
144  public:
145  // -- ROI API methods --
146 
148  bool
149  link (std::shared_ptr<Reference>& reference,
150  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
151 
157  const std::string&
158  getID () const;
159 
165  void
166  setID (const std::string& id);
167 
173  std::shared_ptr<std::string>
174  getName ();
175 
181  const std::shared_ptr<std::string>
182  getName () const;
183 
189  void
190  setName (std::shared_ptr<std::string>& name);
191 
197  std::shared_ptr<ome::xml::model::Union>
198  getUnion ();
199 
205  const std::shared_ptr<ome::xml::model::Union>
206  getUnion () const;
207 
213  void
214  setUnion (std::shared_ptr<ome::xml::model::Union>& union_);
215 
223 
230  getLinkedAnnotationList () const;
231 
239  const std::weak_ptr<ome::xml::model::Annotation>&
241 
252  const std::weak_ptr<ome::xml::model::Annotation>&
254  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
255 
266  bool
267  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
268 
284  bool
285  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
286 
292  std::shared_ptr<std::string>
293  getDescription ();
294 
300  const std::shared_ptr<std::string>
301  getDescription () const;
302 
308  void
309  setDescription (std::shared_ptr<std::string>& description);
310 
317  sizeOfLinkedImageList () const;
318 
325  getLinkedImageList () const;
326 
334  const std::weak_ptr<ome::xml::model::Image>&
336 
347  const std::weak_ptr<ome::xml::model::Image>&
349  const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
350 
361  bool
362  linkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
363 
379  bool
380  unlinkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
381 
389 
397 
405  const std::weak_ptr<ome::xml::model::MicrobeamManipulation>&
407 
418  const std::weak_ptr<ome::xml::model::MicrobeamManipulation>&
420  const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
421 
432  bool
433  linkMicrobeamManipulation (const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
434 
450  bool
451  unlinkMicrobeamManipulation (const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
452 
459  sizeOfLinkedFolderList () const;
460 
467  getLinkedFolderList () const;
468 
476  const std::weak_ptr<ome::xml::model::Folder>&
478 
489  const std::weak_ptr<ome::xml::model::Folder>&
491  const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
492 
503  bool
504  linkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
505 
521  bool
522  unlinkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
523 
524  protected:
525  // Documented in base class.
526  virtual void
528  common::xml::dom::Element& element) const;
529 
530  public:
531  // Documented in superclass.
532  const std::string&
533  getXMLNamespace() const;
534  };
535 
536  }
537  }
538 }
539 
540 #endif // OME_XML_MODEL_ROI_H
541 
542 /*
543  * Local Variables:
544  * mode:C++
545  * End:
546  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
virtual ~ROI()
Destructor.
Definition: ROI.cpp:193
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: ROI.cpp:220
bool unlinkMicrobeamManipulation(const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Unlink MicrobeamManipulation.
Definition: ROI.cpp:565
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type getLinkedFolderList() const
Get the linked Folder list.
Definition: ROI.cpp:588
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: ROI.cpp:466
OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type getLinkedMicrobeamManipulationList() const
Get the linked MicrobeamManipulation list.
Definition: ROI.cpp:530
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type sizeOfLinkedFolderList() const
Get size of linked Folder list.
Definition: ROI.cpp:582
void setUnion(std::shared_ptr< ome::xml::model::Union > &union_)
Set the Union property.
Definition: ROI.cpp:378
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: ROI.cpp:413
ROI model object.
Definition: ROI.h:83
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: ROI.cpp:713
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: ROI.cpp:385
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 linkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Link Image.
Definition: ROI.cpp:494
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type::size_type sizeOfLinkedMicrobeamManipulationList() const
Get size of linked MicrobeamManipulation list.
Definition: ROI.cpp:524
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: ROI.cpp:357
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: ROI.cpp:484
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: ROI.cpp:459
bool linkMicrobeamManipulation(const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Link MicrobeamManipulation.
Definition: ROI.cpp:552
const std::weak_ptr< ome::xml::model::MicrobeamManipulation > & getLinkedMicrobeamManipulation(OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type::size_type index) const
Get linked MicrobeamManipulation.
Definition: ROI.cpp:536
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: ROI.cpp:427
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: ROI.cpp:397
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: ROI.cpp:298
void setID(const std::string &id)
Set the ID property.
Definition: ROI.cpp:336
const std::weak_ptr< ome::xml::model::MicrobeamManipulation > & setLinkedMicrobeamManipulation(OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Set linked MicrobeamManipulation.
Definition: ROI.cpp:542
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
std::shared_ptr< ome::xml::model::Union > getUnion()
Get the Union property.
Definition: ROI.cpp:364
Open Microscopy Environment C++ implementation.
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: ROI.cpp:639
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: ROI.cpp:214
const std::weak_ptr< ome::xml::model::Folder > & getLinkedFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type index) const
Get linked Folder.
Definition: ROI.cpp:594
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: ROI.cpp:472
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: ROI.cpp:391
Private implementation details of ROI model object.
Definition: ROI.cpp:90
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: ROI.cpp:478
const std::weak_ptr< ome::xml::model::Folder > & setLinkedFolder(OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Set linked Folder.
Definition: ROI.cpp:600
static std::shared_ptr< ROI > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a ROI model object from DOM element.
Definition: ROI.cpp:198
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: ROI.cpp:403
const std::string & elementName() const
Get the element name of this model object.
Definition: ROI.cpp:207
bool linkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Link Folder.
Definition: ROI.cpp:610
ROI()
Default constructor.
Definition: ROI.cpp:178
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: ROI.cpp:343
const std::string & getID() const
Get the ID property.
Definition: ROI.cpp:329
ROI & operator=(const ROI &)
Assignment operator (deleted).
std::shared_ptr< Impl > impl
Private implementation details.
Definition: ROI.h:86
bool unlinkImage(const std::shared_ptr< ome::xml::model::Image > &image_BackReference)
Unlink Image.
Definition: ROI.cpp:507
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: ROI.cpp:445
bool unlinkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Unlink Folder.
Definition: ROI.cpp:623