ActiveLib
Loading...
Searching...
No Matches
XMLTransport.h
1
6#ifndef ACTIVE_SERIALISE_XML_XML_TRANSPORT
7#define ACTIVE_SERIALISE_XML_XML_TRANSPORT
8
9#include "Active/Serialise/Transport.h"
10#include "Active/Utility/String.h"
11
12namespace active::serialise::xml {
13
18 public:
19
20 // MARK: - Types
21
46
47 // MARK: - Constructors
48
50
51 // MARK: - Functions (const)
52
64 virtual void send(serialise::Cargo&& cargo, const serialise::Identity& identity, utility::BufferOut&& destination,
65 bool isTabbed = false, bool isLineFeeds = false, bool isNameSpaces = true, bool isProlog = true) const override;
73 virtual void receive(serialise::Cargo&& cargo, const serialise::Identity& identity, utility::BufferIn&& source) const override;
78 bool isUnknownInstructionSkipped() const noexcept { return m_isUnknownInstructionSkipped; }
79
80 // MARK: - Functions (mutating)
81
86 void setUnknownInstructionSkipped(bool state) noexcept { m_isUnknownInstructionSkipped = state; }
87
88 private:
89 //True if unknown instructions should be skipped over
90 bool m_isUnknownInstructionSkipped = true;
91};
92
93}
94
95#endif //ACTIVE_SERIALISE_XML_XML_TRANSPORT
Definition Cargo.h:17
Definition Transport.h:31
Transport(bool isUnknownNameSkipped=false, TimeFormat timeFormat=iso8601) noexcept
Definition Transport.h:47
Definition XMLTransport.h:17
Status
Status of of the XML transport.
Definition XMLTransport.h:23
@ unknownEscapeChar
The character following an escape is unknown, e.g. not , \r, \u etc.
@ unboundedTag
The closing brace for a tag is missing (>)
@ attributeQuoteMissing
The quote character is missing in an attribute.
@ parsingError
The XML source couldn't be parsed - likely corrupt or not well-formed.
@ unknownSection
The specified section type is unknown.
@ unknownInstruction
The specified instruction type is unknown.
@ unbalancedScope
The closing tag cannot be paired with the opening.
@ badSource
The XML source failed, e.g. corrupt file.
@ badValue
A value was found, but invalid.
@ inventoryBoundsExceeded
The source contains more items of a specific type than the inventory maximum permits.
@ badDestination
The XML destination failed, e.g. full storage, corrupt FS etc prevented writing.
@ missingInventory
An object has been provided to send/receive data, but it cannot provide an inventory for its content.
@ closingTagMissing
A closing tag is missing.
@ unknownTag
An unknown tag was found in the XML.
@ badEncoding
The encoding of an escaped character is invalid, e.g. \uXXXX.
@ attributeEqualMissing
The equals character is missing in an attribute.
@ badElement
Element content was rejected as invalid.
@ badName
A value was found, but invalid.
@ missingAttributes
The instruction attributes are missing.
virtual void receive(serialise::Cargo &&cargo, const serialise::Identity &identity, utility::BufferIn &&source) const override
Definition XMLTransport.cpp:1020
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
Definition XMLTransport.cpp:995
void setUnknownInstructionSkipped(bool state) noexcept
Definition XMLTransport.h:86
bool isUnknownInstructionSkipped() const noexcept
Definition XMLTransport.h:78
Definition BufferIn.h:27
Definition BufferOut.h:23
Definition XMLDateTime.h:12
Definition Identity.h:18