bioformats  5.1.0
Public Types | Public Member Functions | List of all members
ome::common::xml::dom::Node Class Reference

DOM Node wrapper. More...

#include <ome/common/xml/dom/Node.h>

+ Inheritance diagram for ome::common::xml::dom::Node:
+ Collaboration diagram for ome::common::xml::dom::Node:

Public Types

typedef xercesc::DOMNode::NodeType node_type
 The derived object type of a node.
 
- Public Types inherited from ome::common::xml::dom::Wrapper< xercesc::DOMNode, Base< xercesc::DOMNode > >
typedef Base< xercesc::DOMNode > parent_type
 Parent type.
 
typedef parent_type::base_type base_type
 Base type.
 
typedef parent_type::base_element_type base_element_type
 Base element type.
 
typedef xercesc::DOMNode element_type
 Wrapped Xerces element type.
 
- Public Types inherited from ome::common::xml::dom::Base< xercesc::DOMNode >
typedef Base base_type
 Base type.
 
typedef xercesc::DOMNode base_element_type
 Base element type (root type of the wrapped type).
 

Public Member Functions

 Node ()
 Construct a NULL Node.
 
 Node (const Node &node)
 Copy construct a Node. More...
 
 Node (xercesc::DOMNode *node, bool managed)
 Construct a Node from a xercesc::DOMNode *. More...
 
 ~Node ()
 Destructor.
 
Node appendChild (Node &node)
 Append a child Node. More...
 
node_type getNodeType ()
 Get the object type of this node. More...
 
NodeList getChildNodes ()
 Get child nodes. More...
 
NamedNodeMap getAttributes ()
 Get node attributes. More...
 
std::string getNodeValue ()
 Get node value. More...
 
std::string getTextContent ()
 Get node text content. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMNode, Base< xercesc::DOMNode > >
 Wrapper ()
 Constructor.
 
 Wrapper (const base_type &base)
 Copy construct a Wrapper. More...
 
 Wrapper (typename parent_type::base_element_type *base, Deleter del)
 Construct a Wrapper from a base_element_type * (managed). More...
 
 Wrapper (typename parent_type::base_element_type *base)
 Construct a Wrapper from a base_element_type * (unmanaged). More...
 
 ~Wrapper ()
 Destructor.
 
element_typeget ()
 Get wrapped element_type *. More...
 
const element_typeget () const
 Get wrapped element_type *. More...
 
Wrapperoperator= (const Wrapper &wrapped)
 Assign a Wrapper. More...
 
element_typeoperator* () noexcept
 Dereference to element_type. More...
 
const element_typeoperator* () const noexcept
 Dereference to const element_type. More...
 
element_typeoperator-> () noexcept
 Dereference to element_type. More...
 
const element_typeoperator-> () const noexcept
 Dereference to const element_type. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Base< xercesc::DOMNode >
 Base ()
 Constructor.
 
 Base (base_element_type *wrapped, Deleter del)
 Construct with initial wrapped value (managed). More...
 
 Base (base_element_type *wrapped)
 Construct with initial wrapped value (unmanaged). More...
 
virtual ~Base ()
 Destructor.
 
base_element_typeget ()
 Get wrapped base_element_type *. More...
 
const base_element_typeget () const
 Get wrapped base_element_type *. More...
 
 operator bool () const
 Check if the wrapped type is NULL. More...
 
void reset ()
 Free the managed resource. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMNode, Base< xercesc::DOMNode > >
virtual void assign (const base_type &wrapped)
 Assign a new wrapped value. More...
 
virtual void assign (ome::compat::shared_ptr< base_element_type > &wrapped)
 Assign a new wrapped value. More...
 
- Protected Member Functions inherited from ome::common::xml::dom::Base< xercesc::DOMNode >
virtual void null_check () const
 Check if the wrapped type is NULL. More...
 
D * assign_check (base_element_type *newbase)
 Check that a new wrapped value is of the correct derived type. More...
 

Detailed Description

DOM Node wrapper.

The wrapper behaves as though is the wrapped DOMNode; it can be dereferenced using the "*" or "->" operators to obtain a reference or pointer to the wrapped object. It can also be cast to a pointer to the wrapped object, so can substitute for it directly.

Constructor & Destructor Documentation

ome::common::xml::dom::Node::Node ( const Node node)
inline

Copy construct a Node.

Parameters
nodethe Node to copy.
ome::common::xml::dom::Node::Node ( xercesc::DOMNode *  node,
bool  managed 
)
inline

Construct a Node from a xercesc::DOMNode *.

Parameters
nodethe Node to wrap.
managedis the value to be managed?

Member Function Documentation

Node ome::common::xml::dom::Node::appendChild ( Node node)
inline

Append a child Node.

Parameters
nodethe child Node to append.
Returns
the appended Node.

References ome::common::xml::dom::Wrapper< WrappedType, Parent >::get(), and Node().

Referenced by ome::xml::model::MapPairs::asXMLElementInternal(), ome::xml::model::BooleanAnnotation::asXMLElementInternal(), ome::xml::model::LongAnnotation::asXMLElementInternal(), ome::xml::model::TagAnnotation::asXMLElementInternal(), ome::xml::model::TermAnnotation::asXMLElementInternal(), ome::xml::model::CommentAnnotation::asXMLElementInternal(), ome::xml::model::XMLAnnotation::asXMLElementInternal(), ome::xml::model::DoubleAnnotation::asXMLElementInternal(), ome::xml::model::TimestampAnnotation::asXMLElementInternal(), ome::xml::model::Rights::asXMLElementInternal(), ome::xml::model::FileAnnotation::asXMLElementInternal(), ome::xml::model::LightSource::asXMLElementInternal(), ome::xml::model::Union::asXMLElementInternal(), ome::xml::model::BinaryFile::asXMLElementInternal(), ome::xml::model::Mask::asXMLElementInternal(), ome::xml::model::TiffData::asXMLElementInternal(), ome::xml::model::LightPath::asXMLElementInternal(), ome::xml::model::Laser::asXMLElementInternal(), ome::xml::model::Experiment::asXMLElementInternal(), ome::xml::model::Reagent::asXMLElementInternal(), ome::xml::model::Project::asXMLElementInternal(), ome::xml::model::FilterSet::asXMLElementInternal(), ome::xml::model::Plane::asXMLElementInternal(), ome::xml::model::PlateAcquisition::asXMLElementInternal(), ome::xml::model::WellSample::asXMLElementInternal(), ome::xml::model::ROI::asXMLElementInternal(), ome::xml::model::MicrobeamManipulation::asXMLElementInternal(), ome::xml::model::Dataset::asXMLElementInternal(), ome::xml::model::Well::asXMLElementInternal(), ome::xml::model::Filter::asXMLElementInternal(), ome::xml::model::Screen::asXMLElementInternal(), ome::xml::model::Shape::asXMLElementInternal(), ome::xml::model::ExperimenterGroup::asXMLElementInternal(), ome::xml::model::Channel::asXMLElementInternal(), ome::xml::model::Instrument::asXMLElementInternal(), ome::xml::model::Plate::asXMLElementInternal(), ome::xml::model::Experimenter::asXMLElementInternal(), ome::xml::model::Image::asXMLElementInternal(), ome::xml::model::Pixels::asXMLElementInternal(), ome::xml::model::StructuredAnnotations::asXMLElementInternal(), ome::xml::model::OME::asXMLElementInternal(), ome::xml::model::Annotation::asXMLElementInternal(), and ome::xml::model::OriginalMetadataAnnotation::setMetadata().

+ Here is the caller graph for this function:

NamedNodeMap ome::common::xml::dom::Node::getAttributes ( )
inline

Get node attributes.

Returns
the attributes.
NodeList ome::common::xml::dom::Node::getChildNodes ( )
inline

Get child nodes.

Returns
the child nodes (if any).

Referenced by ome::xml::model::XMLAnnotation::asXMLElementInternal(), and ome::xml::model::detail::OMEModelObject::getChildrenByTagName().

+ Here is the caller graph for this function:

node_type ome::common::xml::dom::Node::getNodeType ( )
inline

Get the object type of this node.

Returns
the object type.
std::string ome::common::xml::dom::Node::getNodeValue ( )
inline

Get node value.

Returns
the node value.
std::string ome::common::xml::dom::Node::getTextContent ( )
inline

Get node text content.

Returns
the text content.

The documentation for this class was generated from the following file: