ome-common  5.5.0
Public Member Functions | List of all members
ome::common::xml::dom::Document Class Reference

DOM Document wrapper. More...

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

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

Public Member Functions

 Document ()
 Construct a NULL Document.
 
 Document (const Document &document)
 Copy construct a Document. More...
 
 Document (const Wrapper< xercesc::DOMDocument, Node >::base_type &base)
 Copy construct a Document. More...
 
 Document (Wrapper< xercesc::DOMDocument, Node >::element_type *document, bool managed)
 Construct a Document from a xercesc::DOMDocument *. More...
 
 Document (Wrapper< xercesc::DOMDocument, Node >::base_element_type *base, bool managed)
 Construct a Document from a xercesc::DOMNode *. More...
 
 ~Document ()
 Destructor.
 
Documentoperator= (const Document &wrapped)
 Assign a Document. More...
 
Element createElementNS (const std::string &ns, const std::string &name)
 Create Element with namespace. More...
 
Node createComment (const std::string &comment)
 Create Comment. More...
 
Element createElement (const std::string &name)
 Create Element without namespace. More...
 
Element getDocumentElement ()
 Get the root element of this document. More...
 
NodeList getElementsByTagName (const std::string &name)
 Get child elements with a given tag name. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >
 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* ()
 Dereference to element_type. More...
 
const element_typeoperator* () const
 Dereference to const element_type. More...
 
element_typeoperator-> ()
 Dereference to element_type. More...
 
const element_typeoperator-> () const
 Dereference to const element_type. More...
 
- Public Member Functions inherited from ome::common::xml::dom::Node
 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* ()
 Dereference to element_type. More...
 
const element_typeoperator* () const
 Dereference to const element_type. More...
 
element_typeoperator-> ()
 Dereference to element_type. More...
 
const element_typeoperator-> () const
 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 not null. More...
 
bool operator== (std::nullptr_t) const
 Check if the wrapped type is null. More...
 
bool operator!= (std::nullptr_t) const
 Check if the wrapped type is not null. More...
 
void reset ()
 Free the managed resource. More...
 

Additional Inherited Members

- Public Types inherited from ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >
typedef Node 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::DOMDocument element_type
 Wrapped Xerces element type.
 
- Public Types inherited from ome::common::xml::dom::Node
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).
 
- Protected Member Functions inherited from ome::common::xml::dom::Wrapper< xercesc::DOMDocument, Node >
virtual void assign (const base_type &wrapped)
 Assign a new wrapped value. More...
 
virtual void assign (std::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 Document wrapper.

The wrapper behaves as though is the wrapped DOMDocument; 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

◆ Document() [1/4]

ome::common::xml::dom::Document::Document ( const Document document)
inline

Copy construct a Document.

Parameters
documentthe Document to copy.

◆ Document() [2/4]

ome::common::xml::dom::Document::Document ( const Wrapper< xercesc::DOMDocument, Node >::base_type base)
inline

Copy construct a Document.

Parameters
basethe base type to copy (must be a Document).

◆ Document() [3/4]

ome::common::xml::dom::Document::Document ( Wrapper< xercesc::DOMDocument, Node >::element_type document,
bool  managed 
)
inline

Construct a Document from a xercesc::DOMDocument *.

Parameters
documentthe Document to wrap.
managedis the value to be managed?

◆ Document() [4/4]

ome::common::xml::dom::Document::Document ( Wrapper< xercesc::DOMDocument, Node >::base_element_type base,
bool  managed 
)
inline

Construct a Document from a xercesc::DOMNode *.

Parameters
basethe DOMNode to wrap.
managedis the value to be managed?

Member Function Documentation

◆ createComment()

Node ome::common::xml::dom::Document::createComment ( const std::string &  comment)
inline

Create Comment.

Parameters
commentthe comment text.
Returns
the created Node.

References ome::common::xml::dom::Node::Node().

◆ createElement()

Element ome::common::xml::dom::Document::createElement ( const std::string &  name)
inline

Create Element without namespace.

Parameters
namethe element name.
Returns
the created Element.

◆ createElementNS()

Element ome::common::xml::dom::Document::createElementNS ( const std::string &  ns,
const std::string &  name 
)
inline

Create Element with namespace.

Parameters
nsthe namespace.
namethe element name.
Returns
the created Element.

◆ getDocumentElement()

Element ome::common::xml::dom::Document::getDocumentElement ( )
inline

Get the root element of this document.

Returns
the root element.

Referenced by ome::common::xml::EntityResolver::registerCatalog().

+ Here is the caller graph for this function:

◆ getElementsByTagName()

NodeList ome::common::xml::dom::Document::getElementsByTagName ( const std::string &  name)
inline

Get child elements with a given tag name.

Parameters
namethe element name to use.
Returns
the child nodes (if any).

◆ operator=()

Document& ome::common::xml::dom::Document::operator= ( const Document wrapped)
inline

Assign a Document.

Parameters
wrappedthe Document to assign.
Returns
the Document.

References ome::common::xml::dom::Wrapper< WrappedType, Parent >::operator=().


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