39 #ifndef OME_XML_MODEL_DETAIL_OMEMODELOBJECT_H 40 #define OME_XML_MODEL_DETAIL_OMEMODELOBJECT_H 44 #include <ome/xml/model/OMEModelObject.h> 136 link (std::shared_ptr<Reference>& reference,
137 std::shared_ptr<::ome::xml::model::OMEModelObject>&
object);
148 static std::vector<common::xml::dom::Element>
150 const std::string& name);
177 const std::shared_ptr<const T>&
cmp;
199 return cmp && element && cmp == element;
211 return cmp && element && cmp == element;
223 std::shared_ptr<const T> shared_element(element);
224 return cmp && shared_element && cmp == shared_element;
236 std::shared_ptr<const T> shared_element(element);
237 return cmp && shared_element && cmp == shared_element;
251 template<
class C,
typename T>
254 const std::shared_ptr<T>& element)
256 return (std::find_if(container.begin(),
270 #endif // OME_XML_MODEL_DETAIL_OMEMODELOBJECT_H OME model interface (abstract top-level container)
Definition: OMEModel.h:61
logging::sources::severity_logger_mt< logging::trivial::severity_level > Logger
ome::common::Logger logger
Message logger.
Definition: OMEModelObject.h:262
compare_element(const std::shared_ptr< const T > &cmp)
Constructor.
Definition: OMEModelObject.h:185
OMEModelObject()
Constructor.
Definition: OMEModelObject.h:97
OME model object (concrete implementation).
Definition: OMEModelObject.h:64
OME model object interface.
Definition: OMEModelObject.h:76
static std::string stripNamespacePrefix(const std::string &value)
Strip the namespace prefix from a tag name.
Definition: OMEModelObject.cpp:148
virtual void asXMLElementInternal(common::xml::dom::Document &document, common::xml::dom::Element &element) const =0
Transform the object hierarchy rooted at this element to XML.
Definition: OMEModelObject.cpp:95
Open Microscopy Environment C++ implementation.
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: OMEModelObject.cpp:101
virtual 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: OMEModelObject.cpp:107
bool validElementName(const std::string &name) const =0
Check if a given element name is valid for processing by this model object.
Definition: OMEModelObject.cpp:70
Comparison functor.
Definition: OMEModelObject.h:173
const std::shared_ptr< const T > & cmp
The element to compare other elements with.
Definition: OMEModelObject.h:177
bool operator()(const std::shared_ptr< T > &element)
Compare element with another element.
Definition: OMEModelObject.h:197
virtual common::xml::dom::Element asXMLElement(common::xml::dom::Document &document) const
Transform the object hierarchy rooted at this element to XML.
Definition: OMEModelObject.cpp:76
static std::vector< common::xml::dom::Element > getChildrenByTagName(const common::xml::dom::Element &parent, const std::string &name)
Retrieve all the children of an element that have a given tag name.
Definition: OMEModelObject.cpp:114
virtual ~OMEModelObject()
Destructor.
Definition: OMEModelObject.cpp:58
bool contains(const C &container, const std::shared_ptr< T > &element)
Check if a container contains a particular element.
Definition: OMEModelObject.h:253