ome-xml  5.2.4
Reagent.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_REAGENT_H
47 #define OME_XML_MODEL_REAGENT_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 #include <ome/common/xml/dom/NodeList.h>
61 
62 #include <ome/xml/model/primitives/Quantity.h>
63 
64 #include <ome/xml/model/Screen.h>
65 #include <ome/xml/model/detail/OMEModelObject.h>
66 
67 namespace ome
68 {
69  namespace xml
70  {
71  namespace model
72  {
73 
74  // Forward declarations.
75  class Annotation;
76  class OMEModel;
77  class Well;
78 
83  {
84  private:
85  class Impl;
87  ome::compat::shared_ptr<Impl> impl;
88 
89  public:
91  Reagent();
92 
98  Reagent (const Reagent& copy);
99 
101  virtual
102  ~Reagent ();
103 
118  static ome::compat::shared_ptr< Reagent>
119  create(const common::xml::dom::Element& element,
121 
122  // Documented in superclass.
123  const std::string&
124  elementName() const;
125 
126  // Documented in superclass.
127  bool
128  validElementName(const std::string& name) const;
129 
130  private:
132  Reagent&
133  operator= (const Reagent&);
134 
135  public:
136  // -- OMEModelObject API methods --
137 
139  virtual void
140  update(const common::xml::dom::Element& element,
142 
143  public:
144  // -- Reagent API methods --
145 
147  bool
148  link (ome::compat::shared_ptr<Reference>& reference,
149  ome::compat::shared_ptr< ome::xml::model::OMEModelObject>& object);
150 
156  ome::compat::shared_ptr<std::string>
158 
164  const ome::compat::shared_ptr<std::string>
165  getReagentIdentifier () const;
166 
172  void
173  setReagentIdentifier (ome::compat::shared_ptr<std::string>& reagentIdentifier);
174 
180  const std::string&
181  getID () const;
182 
188  void
189  setID (const std::string& id);
190 
196  ome::compat::shared_ptr<std::string>
197  getName ();
198 
204  const ome::compat::shared_ptr<std::string>
205  getName () const;
206 
212  void
213  setName (ome::compat::shared_ptr<std::string>& name);
214 
220  ome::compat::shared_ptr<std::string>
221  getDescription ();
222 
228  const ome::compat::shared_ptr<std::string>
229  getDescription () const;
230 
236  void
237  setDescription (ome::compat::shared_ptr<std::string>& description);
238 
246 
253  getLinkedAnnotationList () const;
254 
262  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
264 
275  const ome::compat::weak_ptr<ome::xml::model::Annotation>&
277  const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
278 
289  bool
290  linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
291 
307  bool
308  unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
309 
315  ome::compat::weak_ptr<ome::xml::model::Screen>
316  getScreen ();
317 
323  const ome::compat::weak_ptr<ome::xml::model::Screen>
324  getScreen () const;
325 
331  void
332  setScreen (ome::compat::weak_ptr<ome::xml::model::Screen>& screen_BackReference);
333 
340  sizeOfLinkedWellList () const;
341 
348  getLinkedWellList () const;
349 
357  const ome::compat::weak_ptr<ome::xml::model::Well>&
359 
370  const ome::compat::weak_ptr<ome::xml::model::Well>&
372  const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
373 
384  bool
385  linkWell (const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
386 
402  bool
403  unlinkWell (const ome::compat::shared_ptr<ome::xml::model::Well>& well_BackReference);
404 
407  asXMLElement (common::xml::dom::Document& document) const;
408 
409 
410  protected:
411  // Documented in base class.
414  common::xml::dom::Element& element) const;
415 
416  public:
417  // Documented in superclass.
418  const std::string&
419  getXMLNamespace() const;
420  };
421 
422  }
423  }
424 }
425 
426 #endif // OME_XML_MODEL_REAGENT_H
427 
428 /*
429  * Local Variables:
430  * mode:C++
431  * End:
432  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
bool linkWell(const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Link Well.
Definition: Reagent.cpp:489
void setName(ome::compat::shared_ptr< std::string > &name)
Set the Name property.
Definition: Reagent.cpp:352
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Reagent.cpp:614
ome::compat::shared_ptr< std::string > getReagentIdentifier()
Get the ReagentIdentifier property.
Definition: Reagent.cpp:303
ome::compat::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Reagent.cpp:359
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Reagent.cpp:422
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: Reagent.cpp:398
ome::compat::weak_ptr< ome::xml::model::Screen > getScreen()
Get the Screen property.
Definition: Reagent.cpp:440
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
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
bool unlinkWell(const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Unlink Well.
Definition: Reagent.cpp:502
const ome::compat::weak_ptr< ome::xml::model::Well > & setLinkedWell(OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Well > &well_BackReference)
Set linked Well.
Definition: Reagent.cpp:479
void setReagentIdentifier(ome::compat::shared_ptr< std::string > &reagentIdentifier)
Set the ReagentIdentifier property.
Definition: Reagent.cpp:317
void setID(const std::string &id)
Set the ID property.
Definition: Reagent.cpp:331
void setScreen(ome::compat::weak_ptr< ome::xml::model::Screen > &screen_BackReference)
Set the Screen property.
Definition: Reagent.cpp:454
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: Reagent.cpp:392
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Reagent.cpp:191
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
const ome::compat::weak_ptr< ome::xml::model::Well > & getLinkedWell(OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type::size_type index) const
Get linked Well.
Definition: Reagent.cpp:473
Reagent model object.
Definition: Reagent.h:82
Open Microscopy Environment C++ implementation.
void setDescription(ome::compat::shared_ptr< std::string > &description)
Set the Description property.
Definition: Reagent.cpp:373
Reagent & operator=(const Reagent &)
Assignment operator (deleted).
const std::string & getID() const
Get the ID property.
Definition: Reagent.cpp:324
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Reagent.cpp:408
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Reagent.cpp:518
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Reagent.cpp:380
OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type::size_type sizeOfLinkedWellList() const
Get size of linked Well list.
Definition: Reagent.cpp:461
virtual ~Reagent()
Destructor.
Definition: Reagent.cpp:170
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: Reagent.cpp:199
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: Reagent.cpp:272
const std::string & elementName() const
Get the element name of this model object.
Definition: Reagent.cpp:184
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Reagent.cpp:386
static ome::compat::shared_ptr< Reagent > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Reagent model object from DOM element.
Definition: Reagent.cpp:175
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Reagent.h:85
OMEModelObject::indexed_container< ome::xml::model::Well, ome::compat::weak_ptr >::type getLinkedWellList() const
Get the linked Well list.
Definition: Reagent.cpp:467
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: Reagent.cpp:525
Private implementation details of Reagent model object.
Definition: Reagent.cpp:74
Reagent()
Default constructor.
Definition: Reagent.cpp:155
ome::compat::shared_ptr< std::string > getName()
Get the Name property.
Definition: Reagent.cpp:338