ome-xml  5.5.0
Screen.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_SCREEN_H
47 #define OME_XML_MODEL_SCREEN_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/detail/OMEModelObject.h>
64 
65 namespace ome
66 {
67  namespace xml
68  {
69  namespace model
70  {
71 
72  // Forward declarations.
73  class Annotation;
74  class OMEModel;
75  class Plate;
76  class Reagent;
77 
82  {
83  private:
84  class Impl;
86  std::shared_ptr<Impl> impl;
87 
88  public:
90  Screen();
91 
97  Screen (const Screen& copy);
98 
100  virtual
101  ~Screen ();
102 
117  static std::shared_ptr<Screen>
118  create(const common::xml::dom::Element& element,
120 
121  // Documented in superclass.
122  const std::string&
123  elementName() const;
124 
125  // Documented in superclass.
126  bool
127  validElementName(const std::string& name) const;
128 
129  private:
131  Screen&
132  operator= (const Screen&);
133 
134  public:
135  // -- OMEModelObject API methods --
136 
138  virtual void
139  update(const common::xml::dom::Element& element,
141 
142  public:
143  // -- Screen API methods --
144 
146  bool
147  link (std::shared_ptr<Reference>& reference,
148  std::shared_ptr<ome::xml::model::OMEModelObject>& object);
149 
155  std::shared_ptr<std::string>
156  getName ();
157 
163  const std::shared_ptr<std::string>
164  getName () const;
165 
171  void
172  setName (std::shared_ptr<std::string>& name);
173 
179  std::shared_ptr<std::string>
181 
187  const std::shared_ptr<std::string>
188  getProtocolDescription () const;
189 
195  void
196  setProtocolDescription (std::shared_ptr<std::string>& protocolDescription);
197 
203  std::shared_ptr<std::string>
205 
211  const std::shared_ptr<std::string>
212  getProtocolIdentifier () const;
213 
219  void
220  setProtocolIdentifier (std::shared_ptr<std::string>& protocolIdentifier);
221 
227  std::shared_ptr<std::string>
229 
235  const std::shared_ptr<std::string>
236  getReagentSetDescription () const;
237 
243  void
244  setReagentSetDescription (std::shared_ptr<std::string>& reagentSetDescription);
245 
251  std::shared_ptr<std::string>
252  getType ();
253 
259  const std::shared_ptr<std::string>
260  getType () const;
261 
267  void
268  setType (std::shared_ptr<std::string>& type);
269 
275  const std::string&
276  getID () const;
277 
283  void
284  setID (const std::string& id);
285 
291  std::shared_ptr<std::string>
293 
299  const std::shared_ptr<std::string>
300  getReagentSetIdentifier () const;
301 
307  void
308  setReagentSetIdentifier (std::shared_ptr<std::string>& reagentSetIdentifier);
309 
315  std::shared_ptr<std::string>
316  getDescription ();
317 
323  const std::shared_ptr<std::string>
324  getDescription () const;
325 
331  void
332  setDescription (std::shared_ptr<std::string>& description);
333 
339  std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type
340  sizeOfReagentList () const;
341 
348  std::vector<std::shared_ptr<ome::xml::model::Reagent>>&
349  getReagentList ();
350 
357  const std::vector<std::shared_ptr<ome::xml::model::Reagent>>&
358  getReagentList () const;
359 
367  std::shared_ptr<ome::xml::model::Reagent>&
368  getReagent (std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type index);
369 
377  const std::shared_ptr<ome::xml::model::Reagent>&
378  getReagent (std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type index) const;
379 
387  void
388  setReagent (std::vector<std::shared_ptr<ome::xml::model::Reagent>>::size_type index,
389  std::shared_ptr<ome::xml::model::Reagent>& reagent);
390 
399  void
400  addReagent (std::shared_ptr<ome::xml::model::Reagent>& reagent);
401 
411  void
412  removeReagent (std::shared_ptr<ome::xml::model::Reagent>& reagent);
413 
420  sizeOfLinkedPlateList () const;
421 
428  getLinkedPlateList () const;
429 
437  const std::weak_ptr<ome::xml::model::Plate>&
439 
450  const std::weak_ptr<ome::xml::model::Plate>&
452  const std::shared_ptr<ome::xml::model::Plate>& plate);
453 
464  bool
465  linkPlate (const std::shared_ptr<ome::xml::model::Plate>& plate);
466 
482  bool
483  unlinkPlate (const std::shared_ptr<ome::xml::model::Plate>& plate);
484 
492 
499  getLinkedAnnotationList () const;
500 
508  const std::weak_ptr<ome::xml::model::Annotation>&
510 
521  const std::weak_ptr<ome::xml::model::Annotation>&
523  const std::shared_ptr<ome::xml::model::Annotation>& annotation);
524 
535  bool
536  linkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
537 
553  bool
554  unlinkAnnotation (const std::shared_ptr<ome::xml::model::Annotation>& annotation);
555 
556  protected:
557  // Documented in base class.
558  virtual void
560  common::xml::dom::Element& element) const;
561 
562  public:
563  // Documented in superclass.
564  const std::string&
565  getXMLNamespace() const;
566  };
567 
568  }
569  }
570 }
571 
572 #endif // OME_XML_MODEL_SCREEN_H
573 
574 /*
575  * Local Variables:
576  * mode:C++
577  * End:
578  */
OME model interface (abstract top-level container)
Definition: OMEModel.h:61
bool unlinkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Screen.cpp:722
static std::shared_ptr< Screen > create(const common::xml::dom::Element &element, ome::xml::model::OMEModel &model)
Create a Screen model object from DOM element.
Definition: Screen.cpp:205
std::shared_ptr< std::string > getName()
Get the Name property.
Definition: Screen.cpp:401
bool unlinkPlate(const std::shared_ptr< ome::xml::model::Plate > &plate)
Unlink Plate.
Definition: Screen.cpp:662
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: Screen.cpp:698
OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type::size_type sizeOfLinkedPlateList() const
Get size of linked Plate list.
Definition: Screen.cpp:620
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
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Screen.cpp:686
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
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: Screen.cpp:692
Screen()
Default constructor.
Definition: Screen.cpp:185
bool validElementName(const std::string &name) const
Check if a given element name is valid for processing by this model object.
Definition: Screen.cpp:221
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: Screen.cpp:227
std::shared_ptr< Impl > impl
Private implementation details.
Definition: Screen.h:84
void setName(std::shared_ptr< std::string > &name)
Set the Name property.
Definition: Screen.cpp:415
void setReagent(std::vector< std::shared_ptr< ome::xml::model::Reagent >>::size_type index, std::shared_ptr< ome::xml::model::Reagent > &reagent)
Set Reagent.
Definition: Screen.cpp:592
std::shared_ptr< std::string > getProtocolDescription()
Get the ProtocolDescription property.
Definition: Screen.cpp:422
bool linkPlate(const std::shared_ptr< ome::xml::model::Plate > &plate)
Link Plate.
Definition: Screen.cpp:648
const std::weak_ptr< ome::xml::model::Plate > & getLinkedPlate(OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type::size_type index) const
Get linked Plate.
Definition: Screen.cpp:632
bool linkAnnotation(const std::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Screen.cpp:708
void addReagent(std::shared_ptr< ome::xml::model::Reagent > &reagent)
Add Reagent.
Definition: Screen.cpp:601
std::shared_ptr< std::string > getType()
Get the Type property.
Definition: Screen.cpp:485
void setType(std::shared_ptr< std::string > &type)
Set the Type property.
Definition: Screen.cpp:499
Screen model object.
Definition: Screen.h:81
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:84
std::shared_ptr< ome::xml::model::Reagent > & getReagent(std::vector< std::shared_ptr< ome::xml::model::Reagent >>::size_type index)
Get Reagent.
Definition: Screen.cpp:580
Open Microscopy Environment C++ implementation.
void setReagentSetIdentifier(std::shared_ptr< std::string > &reagentSetIdentifier)
Set the ReagentSetIdentifier property.
Definition: Screen.cpp:534
Screen & operator=(const Screen &)
Assignment operator (deleted).
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: Screen.cpp:739
std::shared_ptr< std::string > getReagentSetDescription()
Get the ReagentSetDescription property.
Definition: Screen.cpp:464
std::vector< std::shared_ptr< ome::xml::model::Reagent > >::size_type sizeOfReagentList() const
Get size of linked Reagent list.
Definition: Screen.cpp:562
void removeReagent(std::shared_ptr< ome::xml::model::Reagent > &reagent)
Remove Reagent.
Definition: Screen.cpp:609
void setProtocolDescription(std::shared_ptr< std::string > &protocolDescription)
Set the ProtocolDescription property.
Definition: Screen.cpp:436
OMEModelObject::indexed_container< ome::xml::model::Annotation, std::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Screen.cpp:680
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: Screen.cpp:354
virtual ~Screen()
Destructor.
Definition: Screen.cpp:200
void setProtocolIdentifier(std::shared_ptr< std::string > &protocolIdentifier)
Set the ProtocolIdentifier property.
Definition: Screen.cpp:457
void setDescription(std::shared_ptr< std::string > &description)
Set the Description property.
Definition: Screen.cpp:555
void setReagentSetDescription(std::shared_ptr< std::string > &reagentSetDescription)
Set the ReagentSetDescription property.
Definition: Screen.cpp:478
const std::string & elementName() const
Get the element name of this model object.
Definition: Screen.cpp:214
const std::string & getID() const
Get the ID property.
Definition: Screen.cpp:506
Private implementation details of Screen model object.
Definition: Screen.cpp:76
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Screen.cpp:887
std::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Screen.cpp:541
const std::weak_ptr< ome::xml::model::Plate > & setLinkedPlate(OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type::size_type index, const std::shared_ptr< ome::xml::model::Plate > &plate)
Set linked Plate.
Definition: Screen.cpp:638
OMEModelObject::indexed_container< ome::xml::model::Plate, std::weak_ptr >::type getLinkedPlateList() const
Get the linked Plate list.
Definition: Screen.cpp:626
std::vector< std::shared_ptr< ome::xml::model::Reagent > > & getReagentList()
Get the Reagent list.
Definition: Screen.cpp:568
std::shared_ptr< std::string > getProtocolIdentifier()
Get the ProtocolIdentifier property.
Definition: Screen.cpp:443
std::shared_ptr< std::string > getReagentSetIdentifier()
Get the ReagentSetIdentifier property.
Definition: Screen.cpp:520
void setID(const std::string &id)
Set the ID property.
Definition: Screen.cpp:513