|
ActiveLib
|
#include <XMLTransport.h>


Public Types | |
| enum class | Status { nominal , unknownEscapeChar , badEncoding , badSource , unboundedTag , unknownSection , unknownInstruction , missingTagName , missingAttributes , attributeEqualMissing , attributeQuoteMissing , parsingError , closingTagMissing , badName , badValue , badElement , badDestination , missingInventory , unbalancedScope , inventoryBoundsExceeded , unknownTag } |
| Status of of the XML transport. More... | |
Public Types inherited from active::serialise::Transport | |
| using | TimeFormat = std::optional<xml::XMLDateTime::Format> |
| using | size_type = utility::Memory::size_type |
Public Member Functions | |
| virtual void | send (serialise::Cargo &&cargo, const serialise::Identity &identity, utility::BufferOut &&destination, bool isTabbed=false, bool isLineFeeds=false, bool isNameSpaces=true, bool isProlog=true) const override |
| virtual void | receive (serialise::Cargo &&cargo, const serialise::Identity &identity, utility::BufferIn &&source) const override |
| bool | isUnknownInstructionSkipped () const noexcept |
| void | setUnknownInstructionSkipped (bool state) noexcept |
| Transport (bool isUnknownNameSkipped=false, TimeFormat timeFormat=iso8601) noexcept | |
Public Member Functions inherited from active::serialise::Transport | |
| Transport (bool isUnknownNameSkipped=false, TimeFormat timeFormat=iso8601) noexcept | |
| virtual | ~Transport () noexcept |
| TimeFormat | getTimeFormat () const noexcept |
| size_type | getLastRow () const noexcept |
| size_type | getLastColumn () const noexcept |
| bool | isUnknownNameSkipped () const noexcept |
| void | setTimeFormat (TimeFormat format) noexcept |
| void | setUnknownNameSkipped (bool state) noexcept |
Additional Inherited Members | |
Protected Member Functions inherited from active::serialise::Transport | |
| void | setLastRow (size_type row) const noexcept |
| void | setLastColumn (size_type col) const noexcept |
A serialisation tool class to send/receive data serialised via XML
|
strong |
Status of of the XML transport.
|
inlinenoexcept |
Determine if unknown instructions are skipped
|
overridevirtual |
Receive cargo from a specified XML source
| cargo | The cargo to receive the XML data |
| identity | The cargo identity (name, optional namespace) |
| source | The XML source (can be a wrapper for file, memory, string) |
| std::system_error | Thrown on read errors, invalid encoding or parsing failure (e.g. ill-formed XML) |
Implements active::serialise::Transport.
|
overridevirtual |
Send cargo as XML to a specified destination
| cargo | The cargo to be sent as XML |
| identity | The cargo identity (name, optional namespace) |
| destination | The destination buffer for the exported XML (can target file, memory, string) |
| isTabbed | True to indent lines with tabs |
| isLineFeeds | True to add line-feeds |
| isNameSpaces | True to inclued namespaces (where specified) |
| isProlog | True if an serialisation prolog should be written |
| std::system_error | Thrown on write errors, serialisation failure (e.g. invalid XML names, missing inventory etc) |
Implements active::serialise::Transport.
|
inlinenoexcept |
Set whether unknown instructions are skipped
| state | True if unknown instructions are skipped |
|
inlinenoexcept |
Default constructor
| isUnknownNameSkipped | True if unknown tags should be skipped (false = stop parsing with an error) |
| timeFormat | The serialisation date/time format (nullopt = use the format specified in each outgoing item) |