ome-xml  5.6.0
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 
132  ROI&
133  operator= (const ROI&) = delete;
135 
136  // -- OMEModelObject API methods --
137 
139  virtual void
140  update(const common::xml::dom::Element& element,
142 
143  public:
144  // -- ROI API methods --
145 
147  bool
148  link (std::shared_ptr<Reference>& reference,
149  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
150 
156  const std::string&
157  getID () const;
158 
164  void
165  setID (const std::string& id);
166 
172  std::shared_ptr<std::string>
173  getName ();
174 
180  const std::shared_ptr<std::string>
181  getName () const;
182 
188  void
189  setName (std::shared_ptr<std::string>& name);
190 
196  std::shared_ptr<ome::xml::model::Union>
197  getUnion ();
198 
204  const std::shared_ptr<ome::xml::model::Union>
205  getUnion () const;
206 
212  void
213  setUnion (std::shared_ptr<ome::xml::model::Union>& union_);
214 
222 
229  getLinkedAnnotationList () const;
230 
238  const std::weak_ptr<ome::xml::model::Annotation>&
240 
251  const std::weak_ptr<ome::xml::model::Annotation>&
253  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
254 
265  bool
266  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
267 
283  bool
284  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
285 
291  std::shared_ptr<std::string>
292  getDescription ();
293 
299  const std::shared_ptr<std::string>
300  getDescription () const;
301 
307  void
308  setDescription (std::shared_ptr<std::string>& description);
309 
316  sizeOfLinkedImageList () const;
317 
324  getLinkedImageList () const;
325 
333  const std::weak_ptr<ome::xml::model::Image>&
335 
346  const std::weak_ptr<ome::xml::model::Image>&
348  const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
349 
360  bool
361  linkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
362 
378  bool
379  unlinkImage (const std::shared_ptr<ome::xml::model::Image>& image_BackReference);
380 
388 
396 
404  const std::weak_ptr<ome::xml::model::MicrobeamManipulation>&
406 
417  const std::weak_ptr<ome::xml::model::MicrobeamManipulation>&
419  const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
420 
431  bool
432  linkMicrobeamManipulation (const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
433 
449  bool
450  unlinkMicrobeamManipulation (const std::shared_ptr<ome::xml::model::MicrobeamManipulation>& microbeamManipulation_BackReference);
451 
458  sizeOfLinkedFolderList () const;
459 
466  getLinkedFolderList () const;
467 
475  const std::weak_ptr<ome::xml::model::Folder>&
477 
488  const std::weak_ptr<ome::xml::model::Folder>&
490  const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
491 
502  bool
503  linkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
504 
520  bool
521  unlinkFolder (const std::shared_ptr<ome::xml::model::Folder>& folder_BackReference);
522 
523  protected:
524  // Documented in base class.
525  virtual void
527  common::xml::dom::Element& element) const;
528 
529  public:
530  // Documented in superclass.
531  const std::string&
532  getXMLNamespace() const;
533  };
534 
535  }
536  }
537 }
538 
539 #endif // OME_XML_MODEL_ROI_H
540 
541 /*
542  * Local Variables:
543  * mode:C++
544  * End:
545  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
virtual ~ROI()
Destructor.
Definition: ROI.cpp:201
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: ROI.cpp:228
bool unlinkMicrobeamManipulation(const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Unlink MicrobeamManipulation.
Definition: ROI.cpp:573
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type getLinkedFolderList() const
Get the linked Folder list.
Definition: ROI.cpp:596
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type::size_type sizeOfLinkedImageList() const
Get size of linked Image list.
Definition: ROI.cpp:474
OMEModelObject::indexed_container< ome::xml::model::MicrobeamManipulation, std::weak_ptr >::type getLinkedMicrobeamManipulationList() const
Get the linked MicrobeamManipulation list.
Definition: ROI.cpp:538
OMEModelObject::indexed_container< ome::xml::model::Folder, std::weak_ptr >::type::size_type sizeOfLinkedFolderList() const
Get size of linked Folder list.
Definition: ROI.cpp:590
void setUnion(std::shared_ptr< ome::xml::model::Union > &union_)
Set the Union property.
Definition: ROI.cpp:386
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: ROI.cpp:421
ROI model object.
Definition: ROI.h:83
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: ROI.cpp:721
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: ROI.cpp:393
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:502
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:532
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: ROI.cpp:365
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:492
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: ROI.cpp:467
bool linkMicrobeamManipulation(const std::shared_ptr< ome::xml::model::MicrobeamManipulation > &microbeamManipulation_BackReference)
Link MicrobeamManipulation.
Definition: ROI.cpp:560
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:544
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: ROI.cpp:435
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:405
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:306
void setID(const std::string &id)
Set the ID property.
Definition: ROI.cpp:344
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:550
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:372
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:647
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: ROI.cpp:222
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:602
OMEModelObject::indexed_container< ome::xml::model::Image, std::weak_ptr >::type getLinkedImageList() const
Get the linked Image list.
Definition: ROI.cpp:480
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: ROI.cpp:399
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:486
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:608
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:206
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:411
const std::string & elementName() const
Get the element name of this model object.
Definition: ROI.cpp:215
bool linkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Link Folder.
Definition: ROI.cpp:618
ROI()
Default constructor.
Definition: ROI.cpp:182
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: ROI.cpp:351
const std::string & getID() const
Get the ID property.
Definition: ROI.cpp:337
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:515
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: ROI.cpp:453
bool unlinkFolder(const std::shared_ptr< ome::xml::model::Folder > &folder_BackReference)
Unlink Folder.
Definition: ROI.cpp:631