ome-xml 5.2.3

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 #include <ome/common/xml/dom/NodeList.h>
61
62 #include <ome/xml/model/primitives/Quantity.h>
63
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 OMEModel;
76 class Plate;
77 class Reagent;
78
82 class Screen : public detail::OMEModelObject
83 {
84 private:
85 class Impl;
87 ome::compat::shared_ptr<Impl> impl;
88
89 public:
91 Screen();
92
98 Screen (const Screen& copy);
99
101 virtual
102 ~Screen ();
103
118 static ome::compat::shared_ptr< Screen>
119 create(const common::xml::dom::Element& element,
120 ome::xml::model::OMEModel& model);
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 Screen&
133 operator= (const Screen&);
134
135 public:
136 // -- OMEModelObject API methods --
137
139 virtual void
140 update(const common::xml::dom::Element& element,
141 ome::xml::model::OMEModel& model);
142
143 public:
144 // -- Screen 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>
157 getName ();
158
164 const ome::compat::shared_ptr<std::string>
165 getName () const;
166
172 void
173 setName (ome::compat::shared_ptr<std::string>& name);
174
180 ome::compat::shared_ptr<std::string>
181 getProtocolDescription ();
182
188 const ome::compat::shared_ptr<std::string>
189 getProtocolDescription () const;
190
196 void
197 setProtocolDescription (ome::compat::shared_ptr<std::string>& protocolDescription);
198
204 ome::compat::shared_ptr<std::string>
205 getProtocolIdentifier ();
206
212 const ome::compat::shared_ptr<std::string>
213 getProtocolIdentifier () const;
214
220 void
221 setProtocolIdentifier (ome::compat::shared_ptr<std::string>& protocolIdentifier);
222
228 ome::compat::shared_ptr<std::string>
229 getReagentSetDescription ();
230
236 const ome::compat::shared_ptr<std::string>
237 getReagentSetDescription () const;
238
244 void
245 setReagentSetDescription (ome::compat::shared_ptr<std::string>& reagentSetDescription);
246
252 ome::compat::shared_ptr<std::string>
253 getType ();
254
260 const ome::compat::shared_ptr<std::string>
261 getType () const;
262
268 void
269 setType (ome::compat::shared_ptr<std::string>& type);
270
276 const std::string&
277 getID () const;
278
284 void
285 setID (const std::string& id);
286
292 ome::compat::shared_ptr<std::string>
293 getReagentSetIdentifier ();
294
300 const ome::compat::shared_ptr<std::string>
301 getReagentSetIdentifier () const;
302
308 void
309 setReagentSetIdentifier (ome::compat::shared_ptr<std::string>& reagentSetIdentifier);
310
316 ome::compat::shared_ptr<std::string>
317 getDescription ();
318
324 const ome::compat::shared_ptr<std::string>
325 getDescription () const;
326
332 void
333 setDescription (ome::compat::shared_ptr<std::string>& description);
334
340 std::vector<ome::compat::shared_ptr<ome::xml::model::Reagent> >::size_type
341 sizeOfReagentList () const;
342
349 std::vector<ome::compat::shared_ptr<ome::xml::model::Reagent> >&
350 getReagentList ();
351
358 const std::vector<ome::compat::shared_ptr<ome::xml::model::Reagent> >&
359 getReagentList () const;
360
368 ome::compat::shared_ptr<ome::xml::model::Reagent>&
369 getReagent (std::vector<ome::compat::shared_ptr<ome::xml::model::Reagent> >::size_type index);
370
378 const ome::compat::shared_ptr<ome::xml::model::Reagent>&
379 getReagent (std::vector<ome::compat::shared_ptr<ome::xml::model::Reagent> >::size_type index) const;
380
388 void
389 setReagent (std::vector<ome::compat::shared_ptr<ome::xml::model::Reagent> >::size_type index,
390 ome::compat::shared_ptr<ome::xml::model::Reagent>& reagent);
391
400 void
401 addReagent (ome::compat::shared_ptr<ome::xml::model::Reagent>& reagent);
402
412 void
413 removeReagent (ome::compat::shared_ptr<ome::xml::model::Reagent>& reagent);
414
420 OMEModelObject::indexed_container<ome::xml::model::Plate, ome::compat::weak_ptr>::type::size_type
421 sizeOfLinkedPlateList () const;
422
428 OMEModelObject::indexed_container<ome::xml::model::Plate, ome::compat::weak_ptr>::type
429 getLinkedPlateList () const;
430
438 const ome::compat::weak_ptr<ome::xml::model::Plate>&
439 getLinkedPlate (OMEModelObject::indexed_container<ome::xml::model::Plate, ome::compat::weak_ptr>::type::size_type index) const;
440
451 const ome::compat::weak_ptr<ome::xml::model::Plate>&
452 setLinkedPlate (OMEModelObject::indexed_container<ome::xml::model::Plate, ome::compat::weak_ptr>::type::size_type index,
453 const ome::compat::shared_ptr<ome::xml::model::Plate>& plate);
454
465 bool
466 linkPlate (const ome::compat::shared_ptr<ome::xml::model::Plate>& plate);
467
483 bool
484 unlinkPlate (const ome::compat::shared_ptr<ome::xml::model::Plate>& plate);
485
491 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type
492 sizeOfLinkedAnnotationList () const;
493
499 OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type
500 getLinkedAnnotationList () const;
501
509 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
510 getLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index) const;
511
522 const ome::compat::weak_ptr<ome::xml::model::Annotation>&
523 setLinkedAnnotation (OMEModelObject::indexed_container<ome::xml::model::Annotation, ome::compat::weak_ptr>::type::size_type index,
524 const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
525
536 bool
537 linkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
538
554 bool
555 unlinkAnnotation (const ome::compat::shared_ptr<ome::xml::model::Annotation>& annotation);
556
558 virtual common::xml::dom::Element
559 asXMLElement (common::xml::dom::Document& document) const;
560
561
562 protected:
563 // Documented in base class.
564 virtual common::xml::dom::Element
565 asXMLElementInternal (common::xml::dom::Document& document,
566 common::xml::dom::Element& element) const;
567
568 public:
569 // Documented in superclass.
570 const std::string&
571 getXMLNamespace() const;
572 };
573
574 }
575 }
576 }
577
578 #endif // OME_XML_MODEL_SCREEN_H
579
580 /*
581 * Local Variables:
582 * mode:C++
583 * End:
584 */
ome::xml::model::OMEModel
OME model interface (abstract top-level container)
Definition: OMEModel.h:62
ome::xml::model::Screen::getReagentList
std::vector< ome::compat::shared_ptr< ome::xml::model::Reagent > > & getReagentList()
Get the Reagent list.
Definition: Screen.cpp:576
ome::xml::model::Screen::getType
ome::compat::shared_ptr< std::string > getType()
Get the Type property.
Definition: Screen.cpp:493
ome::xml::model::Screen::getReagent
ome::compat::shared_ptr< ome::xml::model::Reagent > & getReagent(std::vector< ome::compat::shared_ptr< ome::xml::model::Reagent > >::size_type index)
Get Reagent.
Definition: Screen.cpp:588
ome::xml::model::Screen::setLinkedPlate
const ome::compat::weak_ptr< ome::xml::model::Plate > & setLinkedPlate(OMEModelObject::indexed_container< ome::xml::model::Plate, ome::compat::weak_ptr >::type::size_type index, const ome::compat::shared_ptr< ome::xml::model::Plate > &plate)
Set linked Plate.
Definition: Screen.cpp:646
ome::common::xml::dom::Document
ome::common::xml::dom::Element
ome::xml::model::Screen::getReagentSetDescription
ome::compat::shared_ptr< std::string > getReagentSetDescription()
Get the ReagentSetDescription property.
Definition: Screen.cpp:472
ome::xml::model::detail::OMEModelObject
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
ome::xml::model::Screen::asXMLElementInternal
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: Screen.cpp:754
ome::xml::model::Screen::Screen
Screen()
Default constructor.
Definition: Screen.cpp:185
ome::xml::model::OMEModelObject::indexed_container::type
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
ome::xml::model::Screen::validElementName
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
ome::xml::model::Screen::setDescription
void setDescription(ome::compat::shared_ptr< std::string > &description)
Set the Description property.
Definition: Screen.cpp:563
ome::xml::model::Screen::update
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:229
ome::xml::model::Screen::linkAnnotation
bool linkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Link Annotation.
Definition: Screen.cpp:716
ome::xml::model::Screen::setName
void setName(ome::compat::shared_ptr< std::string > &name)
Set the Name property.
Definition: Screen.cpp:423
ome::xml::model::Screen::link
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: Screen.cpp:362
ome::xml::model::Screen::sizeOfLinkedPlateList
OMEModelObject::indexed_container< ome::xml::model::Plate, ome::compat::weak_ptr >::type::size_type sizeOfLinkedPlateList() const
Get size of linked Plate list.
Definition: Screen.cpp:628
ome::xml::model::Screen::addReagent
void addReagent(ome::compat::shared_ptr< ome::xml::model::Reagent > &reagent)
Add Reagent.
Definition: Screen.cpp:609
ome::xml::model::Screen
Screen model object.
Definition: Screen.h:82
ome::xml::model::OMEModelObject::indexed_container
Multi-index container for efficient ordered insertion and deletion of model object references...
Definition: OMEModelObject.h:85
ome::xml::model::Screen::create
static ome::compat::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
ome
Open Microscopy Environment C++ implementation.
ome::xml::model::Screen::getName
ome::compat::shared_ptr< std::string > getName()
Get the Name property.
Definition: Screen.cpp:409
ome::xml::model::Screen::unlinkAnnotation
bool unlinkAnnotation(const ome::compat::shared_ptr< ome::xml::model::Annotation > &annotation)
Unlink Annotation.
Definition: Screen.cpp:730
ome::xml::model::Screen::setLinkedAnnotation
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: Screen.cpp:706
ome::xml::model::Screen::operator=
Screen & operator=(const Screen &)
Assignment operator (deleted).
ome::xml::model::Screen::getLinkedPlate
const ome::compat::weak_ptr< ome::xml::model::Plate > & getLinkedPlate(OMEModelObject::indexed_container< ome::xml::model::Plate, ome::compat::weak_ptr >::type::size_type index) const
Get linked Plate.
Definition: Screen.cpp:640
ome::xml::model::Screen::getLinkedAnnotation
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: Screen.cpp:700
ome::xml::model::Screen::getProtocolDescription
ome::compat::shared_ptr< std::string > getProtocolDescription()
Get the ProtocolDescription property.
Definition: Screen.cpp:430
ome::xml::model::Screen::setReagent
void setReagent(std::vector< ome::compat::shared_ptr< ome::xml::model::Reagent > >::size_type index, ome::compat::shared_ptr< ome::xml::model::Reagent > &reagent)
Set Reagent.
Definition: Screen.cpp:600
ome::xml::model::Screen::~Screen
virtual ~Screen()
Destructor.
Definition: Screen.cpp:200
ome::xml::model::Screen::setReagentSetIdentifier
void setReagentSetIdentifier(ome::compat::shared_ptr< std::string > &reagentSetIdentifier)
Set the ReagentSetIdentifier property.
Definition: Screen.cpp:542
ome::xml::model::Screen::removeReagent
void removeReagent(ome::compat::shared_ptr< ome::xml::model::Reagent > &reagent)
Remove Reagent.
Definition: Screen.cpp:617
ome::xml::model::Screen::setProtocolDescription
void setProtocolDescription(ome::compat::shared_ptr< std::string > &protocolDescription)
Set the ProtocolDescription property.
Definition: Screen.cpp:444
ome::xml::model::Screen::getLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type getLinkedAnnotationList() const
Get the linked Annotation list.
Definition: Screen.cpp:694
ome::xml::model::Screen::linkPlate
bool linkPlate(const ome::compat::shared_ptr< ome::xml::model::Plate > &plate)
Link Plate.
Definition: Screen.cpp:656
ome::xml::model::Screen::getReagentSetIdentifier
ome::compat::shared_ptr< std::string > getReagentSetIdentifier()
Get the ReagentSetIdentifier property.
Definition: Screen.cpp:528
ome::xml::model::Screen::getDescription
ome::compat::shared_ptr< std::string > getDescription()
Get the Description property.
Definition: Screen.cpp:549
ome::xml::model::Screen::getLinkedPlateList
OMEModelObject::indexed_container< ome::xml::model::Plate, ome::compat::weak_ptr >::type getLinkedPlateList() const
Get the linked Plate list.
Definition: Screen.cpp:634
ome::xml::model::Screen::setProtocolIdentifier
void setProtocolIdentifier(ome::compat::shared_ptr< std::string > &protocolIdentifier)
Set the ProtocolIdentifier property.
Definition: Screen.cpp:465
ome::xml::model::Screen::elementName
const std::string & elementName() const
Get the element name of this model object.
Definition: Screen.cpp:214
ome::xml::model::Screen::getID
const std::string & getID() const
Get the ID property.
Definition: Screen.cpp:514
ome::xml::model::Screen::Impl
Private implementation details of Screen model object.
Definition: Screen.cpp:76
ome::xml::model::Screen::setType
void setType(ome::compat::shared_ptr< std::string > &type)
Set the Type property.
Definition: Screen.cpp:507
ome::xml::model::Screen::getXMLNamespace
const std::string & getXMLNamespace() const
Get the XML namespace for this model object.
Definition: Screen.cpp:925
ome::xml::model::Screen::sizeOfReagentList
std::vector< ome::compat::shared_ptr< ome::xml::model::Reagent > >::size_type sizeOfReagentList() const
Get size of linked Reagent list.
Definition: Screen.cpp:570
ome::xml::model::Screen::getProtocolIdentifier
ome::compat::shared_ptr< std::string > getProtocolIdentifier()
Get the ProtocolIdentifier property.
Definition: Screen.cpp:451
ome::xml::model::Screen::unlinkPlate
bool unlinkPlate(const ome::compat::shared_ptr< ome::xml::model::Plate > &plate)
Unlink Plate.
Definition: Screen.cpp:670
log.h
ome::xml::model::Screen::impl
ome::compat::shared_ptr< Impl > impl
Private implementation details.
Definition: Screen.h:85
ome::xml::model::Screen::setReagentSetDescription
void setReagentSetDescription(ome::compat::shared_ptr< std::string > &reagentSetDescription)
Set the ReagentSetDescription property.
Definition: Screen.cpp:486
ome::xml::model::Screen::asXMLElement
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: Screen.cpp:747
ome::xml::model::Screen::setID
void setID(const std::string &id)
Set the ID property.
Definition: Screen.cpp:521
ome::xml::model::Screen::sizeOfLinkedAnnotationList
OMEModelObject::indexed_container< ome::xml::model::Annotation, ome::compat::weak_ptr >::type::size_type sizeOfLinkedAnnotationList() const
Get size of linked Annotation list.
Definition: Screen.cpp:688