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

An overarching interface for a Text Document. More...

#include <DocumentContent.hpp>

Inheritance diagram for mlclient::ITextDocumentContent:
mlclient::IDocumentContent mlclient::GenericTextDocumentContent mlclient::utilities::CppRestJsonDocumentContent mlclient::utilities::PugiXmlDocumentContent

Public Member Functions

virtual MLCLIENT_API void setContent (std::string content)=0
 Sets the textual content for this document. More...
 
virtual MLCLIENT_API int getLength () const =0
 Returns the number of characters in the content string. More...
 
virtual MLCLIENT_API IDocumentNavigatornavigate (bool firstElementAsRoot=false) const =0
 Returns a way to navigate the document. More...
 
- Public Member Functions inherited from mlclient::IDocumentContent
MLCLIENT_API IDocumentContent ()
 
virtual MLCLIENT_API ~IDocumentContent ()=0
 
virtual MLCLIENT_API std::istream * getStream () const =0
 Returns the content of this IDocumentContent as an istream. More...
 
virtual MLCLIENT_API std::string getContent () const =0
 Returns the content of this IDocumentContent as a std::string. More...
 
virtual MLCLIENT_API std::string getMimeType () const =0
 Returns the MIME type of this content. More...
 
virtual MLCLIENT_API void setMimeType (const std::string &mt)=0
 Sets the MIME type of this content. More...
 

Additional Inherited Members

- Static Public Attributes inherited from mlclient::IDocumentContent
static MLCLIENT_API const std::string MIME_JSON
 
static MLCLIENT_API const std::string MIME_XML
 

Detailed Description

An overarching interface for a Text Document.

Since
8.0.0
Date
2016-05-12
Author
Adam Fowler adam..nosp@m.fowl.nosp@m.er@ma.nosp@m.rklo.nosp@m.gic.c.nosp@m.om

Member Function Documentation

virtual MLCLIENT_API int mlclient::ITextDocumentContent::getLength ( ) const
pure virtual

Returns the number of characters in the content string.

Note
This number does not include C null characters - just std::string length
Returns
The number of characters in the string. Does not include C null character.

Implemented in mlclient::GenericTextDocumentContent, mlclient::utilities::PugiXmlDocumentContent, and mlclient::utilities::CppRestJsonDocumentContent.

virtual MLCLIENT_API IDocumentNavigator* mlclient::ITextDocumentContent::navigate ( bool  firstElementAsRoot = false) const
pure virtual

Returns a way to navigate the document.

See IDocumentNavigator for details

Since
8.0.2
Date
2016-07-30

Implemented in mlclient::GenericTextDocumentContent, mlclient::utilities::PugiXmlDocumentContent, and mlclient::utilities::CppRestJsonDocumentContent.

virtual MLCLIENT_API void mlclient::ITextDocumentContent::setContent ( std::string  content)
pure virtual

Sets the textual content for this document.

Assumes content string is non null

Parameters
[in]Thestring content to copy in to this object.

Implemented in mlclient::GenericTextDocumentContent, mlclient::utilities::PugiXmlDocumentContent, and mlclient::utilities::CppRestJsonDocumentContent.


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