MarkLogic Connect
MarkLogic Connect Client API Collection
Public Member Functions | List of all members
mlclient::IDocumentNode Class Referenceabstract

Acts as a generic lightweight document element interface. More...

#include <DocumentContent.hpp>

Inheritance diagram for mlclient::IDocumentNode:
mlclient::utilities::CppRestJsonContainerNode mlclient::utilities::CppRestJsonDocumentNode mlclient::utilities::PugiXmlContainerNode mlclient::utilities::PugiXmlDocumentNode mlclient::utilities::CppRestJsonArrayNode mlclient::utilities::CppRestJsonObjectNode mlclient::utilities::PugiXmlArrayNode mlclient::utilities::PugiXmlObjectNode

Public Member Functions

virtual MLCLIENT_API bool isNull () const =0
 Does this document element have a blank value? More...
 
virtual MLCLIENT_API bool isBoolean () const =0
 Whether this element or property is a boolean type. More...
 
virtual MLCLIENT_API bool isInteger () const =0
 Whether this element or property is a integer type. More...
 
virtual MLCLIENT_API bool isDouble () const =0
 Whether this element or property is a double type. More...
 
virtual MLCLIENT_API bool isString () const =0
 Whether this element or property is a string type. More...
 
virtual MLCLIENT_API bool isArray () const =0
 Whether this element or property is an array type. More...
 
virtual MLCLIENT_API bool isObject () const =0
 Whether this element or property is an object type (i.e. a JSON object or an XML element with element content) More...
 
virtual MLCLIENT_API bool asBoolean () const =0
 Returns the boolean value of this element or property. More...
 
virtual MLCLIENT_API int32_t asInteger () const =0
 Returns the integer value of this element or property. More...
 
virtual MLCLIENT_API double asDouble () const =0
 Returns the double value of this element or property. More...
 
virtual MLCLIENT_API std::string asString () const =0
 Returns the string value of this element or property. More...
 
virtual MLCLIENT_API IDocumentNodeasArray () const =0
 Returns the array value of this element or property (i.e. the child objects) More...
 
virtual MLCLIENT_API IDocumentNodeasObject () const =0
 Returns the Object value of this element or property (i.e. the child object) More...
 
virtual MLCLIENT_API IDocumentNodeat (const std::string &key) const =0
 
virtual MLCLIENT_API IDocumentNodeat (const int32_t idx) const =0
 

Detailed Description

Acts as a generic lightweight document element interface.

This is the base class for any Document Node within the Document Traversal API.

Author
Adam Fowler adam..nosp@m.fowl.nosp@m.er@ma.nosp@m.rklo.nosp@m.gic.c.nosp@m.om
Since
8.0.2
Date
2016-07-30

Member Function Documentation

virtual MLCLIENT_API IDocumentNode* mlclient::IDocumentNode::asArray ( ) const
pure virtual
virtual MLCLIENT_API bool mlclient::IDocumentNode::asBoolean ( ) const
pure virtual

Returns the boolean value of this element or property.

Exceptions
InvalidFormatExceptionif not of the right type
Returns
The boolean value

Implemented in mlclient::utilities::CppRestJsonDocumentNode, mlclient::utilities::PugiXmlDocumentNode, mlclient::utilities::CppRestJsonContainerNode, and mlclient::utilities::PugiXmlContainerNode.

virtual MLCLIENT_API double mlclient::IDocumentNode::asDouble ( ) const
pure virtual

Returns the double value of this element or property.

Exceptions
InvalidFormatExceptionif not of the right type
Returns
The double value

Implemented in mlclient::utilities::CppRestJsonDocumentNode, mlclient::utilities::PugiXmlDocumentNode, mlclient::utilities::CppRestJsonContainerNode, and mlclient::utilities::PugiXmlContainerNode.

virtual MLCLIENT_API int32_t mlclient::IDocumentNode::asInteger ( ) const
pure virtual

Returns the integer value of this element or property.

Exceptions
InvalidFormatExceptionif not of the right type
Returns
The integer value

Implemented in mlclient::utilities::CppRestJsonDocumentNode, mlclient::utilities::PugiXmlDocumentNode, mlclient::utilities::CppRestJsonContainerNode, and mlclient::utilities::PugiXmlContainerNode.

virtual MLCLIENT_API IDocumentNode* mlclient::IDocumentNode::asObject ( ) const
pure virtual
virtual MLCLIENT_API std::string mlclient::IDocumentNode::asString ( ) const
pure virtual

Returns the string value of this element or property.

Exceptions
InvalidFormatExceptionif not of the right type
Returns
The string value

Implemented in mlclient::utilities::CppRestJsonDocumentNode, mlclient::utilities::PugiXmlDocumentNode, mlclient::utilities::CppRestJsonContainerNode, and mlclient::utilities::PugiXmlContainerNode.

virtual MLCLIENT_API bool mlclient::IDocumentNode::isArray ( ) const
pure virtual
virtual MLCLIENT_API bool mlclient::IDocumentNode::isBoolean ( ) const
pure virtual
virtual MLCLIENT_API bool mlclient::IDocumentNode::isDouble ( ) const
pure virtual
virtual MLCLIENT_API bool mlclient::IDocumentNode::isInteger ( ) const
pure virtual
virtual MLCLIENT_API bool mlclient::IDocumentNode::isNull ( ) const
pure virtual

Does this document element have a blank value?

Returns
True if the value is blank. E.g. {"data":""} or <data>

Implemented in mlclient::utilities::CppRestJsonDocumentNode, mlclient::utilities::PugiXmlDocumentNode, mlclient::utilities::CppRestJsonContainerNode, and mlclient::utilities::PugiXmlContainerNode.

virtual MLCLIENT_API bool mlclient::IDocumentNode::isObject ( ) const
pure virtual

Whether this element or property is an object type (i.e. a JSON object or an XML element with element content)

Returns
True if of type Object

Implemented in mlclient::utilities::CppRestJsonDocumentNode, mlclient::utilities::PugiXmlDocumentNode, mlclient::utilities::CppRestJsonObjectNode, mlclient::utilities::PugiXmlObjectNode, mlclient::utilities::CppRestJsonArrayNode, and mlclient::utilities::PugiXmlArrayNode.

virtual MLCLIENT_API bool mlclient::IDocumentNode::isString ( ) const
pure virtual

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