Wwise SDK 2021.1.14
_host_xml_8h_source
Version
menu_open
link
HostXml.h
Go to the documentation of this file.
52 };
80 };
93 };
106 };
117 };
126 * The XML plug-in persistence is useful when a plug-in provides custom data handling. Normally, plug-in data
127 * is stored through the property sets (see \ref wwiseplugin_propertyset "PropertySet" and \ref wwiseplugin_objectstore "ObjectStore").
128 * However, a plug-in might provide its own custom handling. For complex interfaces, it might be worthwhile to use the
129 * \ref wwiseplugin_complexproperty "CustomData" interface. Loading and saving can then be done through this XML interface.
131 * The XML interface represents a cursor pointing to a node (element), alongside methods to navigate through
135 * One unique XML interface is provided for both reading and writing XML. Depending on the instance being
163 * The string is available until the next Host operation. If storing is required, a copy should be made
182 AK::Wwise::Plugin::XmlNodeType::NodeType(*GetNodeType)(const struct ak_wwise_plugin_host_xml_reader_instance_v1* in_this);
195 * This returns the textual representation of the current node's value. What the XML parser considers
199 * For example, this \c Item node has three content elements: <tt><Item>1&number;3</Item></tt>
201 * For normal string retrieval, the \ref ReadElementString will actually return the value of an XML with
205 * The string is available until the next Host operation. If storing is required, a copy should be made
229 * This is useful in some cases, where an error message might be written, or for debugging purposes.
237 * \brief Retrieves the column in the line that contains the start of the current node being read.
239 * This is useful in some cases, where an error message might be written, or for debugging purposes.
249 * If the node is not a content node, the reader skips ahead to the next content entity until the
272 * content is available, it will return \ref AK::Wwise::Plugin::XmlNodeType::EndElement "EndElement"
279 AK::Wwise::Plugin::XmlNodeType::NodeType(*MoveToContent)(struct ak_wwise_plugin_host_xml_reader_instance_v1* in_this);
294 * Since strings can span multiple content elements, this method will read all the sequential string-like
295 * elements and append them, returning one simple string. This function also works with empty nodes and
298 * If no processing or incrementing is warranted, \ref Read, \ref MoveToContent and \ref GetValue
304 * The string is available until the next Host operation. If storing is required, a copy should be made
315 * \brief Reads all the contents of an Element or Attribute as a string, including markup. Increments the pointer.
317 * This returns the raw contents of the file except the enclosing elements. It can be considered the
323 * The string is available until the next Host operation. If storing is required, a copy should be made
331 void(*ReadInnerXml)(struct ak_wwise_plugin_host_xml_reader_instance_v1* in_this, const char ** out_csXml);
336 * This returns the raw contents of the file including the enclosing elements. It can be considered the
342 * The string is available until the next Host operation. If storing is required, a copy should be made
347 * \param[out] out_csXml All the XML content, including markup and enclosing tags, of the current node.
350 void(*ReadOuterXml)(struct ak_wwise_plugin_host_xml_reader_instance_v1* in_this, const char ** out_csXml);
396 AK::Wwise::Plugin::XmlWriteReady::WriteReady(*GetReadyState)(const struct ak_wwise_plugin_host_xml_writer_instance_v1* in_this);
408 bool(*Append)(struct ak_wwise_plugin_host_xml_writer_instance_v1* in_this, struct ak_wwise_plugin_host_xml_writer_instance_v1* in_pWriterToAppend);
419 AK::Wwise::Plugin::XmlWriteState::WriteState(*GetWriteState)(const struct ak_wwise_plugin_host_xml_writer_instance_v1* in_this);
544 };
554 };
560 * The string is available until the next Host operation. If storing is required, a copy should be made
577 inline AK::Wwise::Plugin::XmlNodeType::NodeType GetNodeType() const { return g_cinterface->GetNodeType(this); }
589 * This returns the textual representation of the current node's value. What the XML parser considers
593 * For example, this \c Item node has three content elements: <tt><Item>1&number;3</Item></tt>
595 * For normal string retrieval, the \ref ReadElementString will actually return the value of an XML with
599 * The string is available until the next Host operation. If storing is required, a copy should be made
621 * This is useful in some cases, where an error message might be written, or for debugging purposes.
628 * \brief Retrieves the column in the line that contains the start of the current node being read.
630 * This is useful in some cases, where an error message might be written, or for debugging purposes.
639 * If the node is not a content node, the reader skips ahead to the next content entity until the
662 * content is available, it will return \ref AK::Wwise::Plugin::XmlNodeType::EndElement "EndElement"
668 inline AK::Wwise::Plugin::XmlNodeType::NodeType MoveToContent() { return g_cinterface->MoveToContent(this); }
682 * Since strings can span multiple content elements, this method will read all the sequential string-like
683 * elements and append them, returning one simple string. This function also works with empty nodes and
686 * If no processing or incrementing is warranted, \ref Read, \ref MoveToContent and \ref GetValue
692 * The string is available until the next Host operation. If storing is required, a copy should be made
702 * \brief Reads all the contents of an Element or Attribute as a string, including markup. Increments the pointer.
704 * This returns the raw contents of the file except the enclosing elements. It can be considered the
710 * The string is available until the next Host operation. If storing is required, a copy should be made
717 inline void ReadInnerXml(const char *& out_csXml) { g_cinterface->ReadInnerXml(this, &out_csXml); }
722 * This returns the raw contents of the file including the enclosing elements. It can be considered the
728 * The string is available until the next Host operation. If storing is required, a copy should be made
732 * \param[out] out_csXml All the XML content, including markup and enclosing tags, of the current node.
735 inline void ReadOuterXml(const char *& out_csXml) { g_cinterface->ReadOuterXml(this, &out_csXml); }
752 inline bool GetAttribute(const char * in_rcsAttributeName, const char *& out_rcsValue) { return MKBOOL(g_cinterface->GetAttribute(this, in_rcsAttributeName, &out_rcsValue)); }
770 };
780 };
800 inline AK::Wwise::Plugin::XmlWriteReady::WriteReady GetReadyState() const { return g_cinterface->GetReadyState(this); }
811 inline bool Append(XmlWriter& in_writerToAppend) { return MKBOOL(g_cinterface->Append(this, &in_writerToAppend)); }
822 inline AK::Wwise::Plugin::XmlWriteState::WriteState GetWriteState() const { return g_cinterface->GetWriteState(this); }
845 * \param[in] in_rcsElementName Node name, as retrieved on the reader with \ref AK::Wwise::Plugin::XmlReader::GetName "GetName".
848 inline void WriteStartElement(const char * in_rcsElementName, AK::Wwise::Plugin::XmlElementType::ElementType in_eType) { g_cinterface->WriteStartElement(this, in_rcsElementName, in_eType); }
861 inline void WriteAttributeString(const char * in_rcsAttribute, const char * in_rcsValue) { g_cinterface->WriteAttributeString(this, in_rcsAttribute, in_rcsValue); }
868 inline void WriteString(const char * in_rcsValue) { g_cinterface->WriteString(this, in_rcsValue); }
877 inline void WriteCData(const char * in_rcsValue) { g_cinterface->WriteCData(this, in_rcsValue); }
888 /// Use this class to handle the WriteStartElement/WriteEndElement pair automatically in a C++ scope.
894 AutoStartEndElement( const char * in_rcsElementName, XmlWriter* in_pWriter, AK::Wwise::Plugin::XmlElementType::ElementType in_eType = AK::Wwise::Plugin::XmlElementType::Map )
900 AutoStartEndElement( const char * in_rcsElementName, XmlWriter& in_pWriter, AK::Wwise::Plugin::XmlElementType::ElementType in_eType = AK::Wwise::Plugin::XmlElementType::Map )
void(* WriteStartElement)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this, const char *in_rcsElementName, AK::Wwise::Plugin::XmlElementType::ElementType in_eType)
Creates a new inner node.
Definition: HostXml.h:450
RequestedHostInterface< XmlReader > RequestXml
Requests the XML processing interface.
Definition: HostXml.h:928
void(* ReadInnerXml)(struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this, const char **out_csXml)
Reads all the contents of an Element or Attribute as a string, including markup. Increments the point...
Definition: HostXml.h:331
void WriteRaw(const char *in_rcsValue)
Appends a raw string at this precise point of the XML file.
Definition: HostXml.h:886
int(* GetLinePosition)(const struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Retrieves the column in the line that contains the start of the current node being read.
Definition: HostXml.h:244
AK::Wwise::Plugin::XmlWriteState::WriteState(* GetWriteState)(const struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this)
Retrieves the state of the node the writer is currently populating.
Definition: HostXml.h:419
bool(* Read)(struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Sets the reading pointer to the next node, recursively.
Definition: HostXml.h:289
static GluedInterface * g_cinterface
The unique instance of the CInterface interface. Defined at nullptr first, overridden by the Host onc...
Definition: PluginInfoGenerator.h:90
void ReadInnerXml(const char *&out_csXml)
Reads all the contents of an Element or Attribute as a string, including markup. Increments the point...
Definition: HostXml.h:717
bool GetAttribute(const char *in_rcsAttributeName, const char *&out_rcsValue)
Reads the value of a particular attribute under the current node.
Definition: HostXml.h:752
AK::Wwise::Plugin::XmlNodeType::NodeType MoveToContent()
Makes sure the cursor points to a content-type entity while reading XML.
Definition: HostXml.h:668
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface.
Definition: PluginInfoGenerator.h:51
AK::Wwise::Plugin::XmlWriteReady::WriteReady(* GetReadyState)(const struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this)
Determines the state of readiness of the writer.
Definition: HostXml.h:396
bool(* IsReady)(const struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this)
Determines if the writer is ready to be used.
Definition: HostXml.h:385
AK::Wwise::Plugin::XmlWriteState::WriteState GetWriteState() const
Retrieves the state of the node the writer is currently populating.
Definition: HostXml.h:822
const char * GetName() const
Returns the name of the current node being read.
Definition: HostXml.h:567
int GetLineNumber() const
Retrieves the line number that contains the start of the current node being read.
Definition: HostXml.h:625
void(* WriteCData)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this, const char *in_rcsValue)
Appends a raw CDATA string as value to the current node.
Definition: HostXml.h:495
const char * GetValue() const
Returns the value of the current node being read.
Definition: HostXml.h:606
AutoStartEndElement(const char *in_rcsElementName, XmlWriter *in_pWriter, AK::Wwise::Plugin::XmlElementType::ElementType in_eType=AK::Wwise::Plugin::XmlElementType::Map)
Calls WriteStartElement automatically.
Definition: HostXml.h:894
bool(* IsEOF)(const struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Tests whether the end of file is reached while reading the XML.
Definition: HostXml.h:224
void WriteAttributeString(const char *in_rcsAttribute, const char *in_rcsValue)
Adds an attribute to the current node.
Definition: HostXml.h:861
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_XML
2021.1 XML reading and writing host services. ak_wwise_plugin_host_xml_v1
Definition: PluginBaseInterface.h:84
AK::Wwise::Plugin::XmlNodeType::NodeType(* MoveToContent)(struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Makes sure the cursor points to a content-type entity while reading XML.
Definition: HostXml.h:279
AK::Wwise::Plugin::XmlWriteReady::WriteReady GetReadyState() const
Determines the state of readiness of the writer.
Definition: HostXml.h:800
void(* WriteAttributeString)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this, const char *in_rcsAttribute, const char *in_rcsValue)
Adds an attribute to the current node.
Definition: HostXml.h:470
AK::Wwise::Plugin::XmlNodeType::NodeType GetNodeType() const
Returns the type of the current node being read.
Definition: HostXml.h:577
void ReadOuterXml(const char *&out_csXml)
Reads the Element or Attribute as a string, including markup. Increments the pointer.
Definition: HostXml.h:735
API interface for XML-based plug-in persistence.
Definition: HostXml.h:146
void(* WriteString)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this, const char *in_rcsValue)
Appends a string as value to the current node.
Definition: HostXml.h:482
Wwise Authoring Plug-ins - C++ class helper to automatically determine the plug-in interfaces used in...
bool IsEOF() const
Tests whether the end of file is reached while reading the XML.
Definition: HostXml.h:616
int GetLinePosition() const
Retrieves the column in the line that contains the start of the current node being read.
Definition: HostXml.h:634
PluginInfoGenerator: Associates an existing C Interface with a variable that can be used....
Definition: PluginInfoGenerator.h:105
void(* WriteEndElement)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this)
Closes the previous node.
Definition: HostXml.h:461
bool IsEmptyElement() const
Tests whether the current node being read is empty.
Definition: HostXml.h:584
void(* ReadOuterXml)(struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this, const char **out_csXml)
Reads the Element or Attribute as a string, including markup. Increments the pointer.
Definition: HostXml.h:350
bool(* IsEmptyElement)(const struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Tests whether the current node being read is empty.
Definition: HostXml.h:190
API interface for XML-based plug-in persistence.
Definition: HostXml.h:531
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface.
Definition: PluginInfoGenerator.h:50
void WriteCData(const char *in_rcsValue)
Appends a raw CDATA string as value to the current node.
Definition: HostXml.h:877
int(* GetLineNumber)(const struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Retrieves the line number that contains the start of the current node being read.
Definition: HostXml.h:234
void(* WriteRaw)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this, const char *in_rcsValue)
Appends a raw string at this precise point of the XML file.
Definition: HostXml.h:508
const char *(* GetName)(const struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Returns the name of the current node being read.
Definition: HostXml.h:171
void WriteString(const char *in_rcsValue)
Appends a string as value to the current node.
Definition: HostXml.h:868
void(* WriteStartDocument)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this)
Starts a new XML document.
Definition: HostXml.h:429
void WriteStartElement(const char *in_rcsElementName, AK::Wwise::Plugin::XmlElementType::ElementType in_eType)
Creates a new inner node.
Definition: HostXml.h:848
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
#define AK_WWISE_PLUGIN_SPECIALIZE_HOST_INTERFACE_NO_BASE_INSTANCE(in_name, in_varname)
PluginInfoGenerator: Creates a C++ host specialization for interface class specified in in_name.
Definition: PluginInfoGenerator.h:263
Use this class to handle the WriteStartElement/WriteEndElement pair automatically in a C++ scope.
Definition: HostXml.h:890
ElementType
These element types have an impact when outputting in alternate formats such as JSON.
Definition: HostXml.h:113
void(* WriteEndDocument)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this)
Ends a completed XML document.
Definition: HostXml.h:439
Interface description and base class for every Wwise Authoring plug-in interface.
Definition: PluginBaseInterface.h:117
Base host-provided instance type for reading XML files through ak_wwise_plugin_host_xml_v1.
Definition: PluginDef.h:662
bool(* GetAttribute)(struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this, const char *in_rcsAttributeName, const char **out_rcsValue)
Reads the value of a particular attribute under the current node.
Definition: HostXml.h:369
AutoStartEndElement(const char *in_rcsElementName, XmlWriter &in_pWriter, AK::Wwise::Plugin::XmlElementType::ElementType in_eType=AK::Wwise::Plugin::XmlElementType::Map)
Definition: HostXml.h:900
const char * ReadElementString()
Reads simple text-only elements, and increments the pointer.
Definition: HostXml.h:699
void Skip()
Sets the reading pointer past the current node, skipping any inner content.
Definition: HostXml.h:742
const char *(* ReadElementString)(struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Reads simple text-only elements, and increments the pointer.
Definition: HostXml.h:312
@ ProcessingInstruction
Definition: HostXml.h:75
const char *(* GetValue)(const struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Returns the value of the current node being read.
Definition: HostXml.h:213
bool(* Append)(struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_this, struct ak_wwise_plugin_host_xml_writer_instance_v1 *in_pWriterToAppend)
Appending a first XML writer to a second XML writer.
Definition: HostXml.h:408
void(* Skip)(struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Sets the reading pointer past the current node, skipping any inner content.
Definition: HostXml.h:358
API interface for XML-based plug-in persistence.
Definition: HostXml.h:757
@ SignificantWhitespace
Definition: HostXml.h:76
Base host-provided instance type for writing XML files through ak_wwise_plugin_host_xml_v1.
Definition: PluginDef.h:671
AK::Wwise::Plugin::XmlNodeType::NodeType(* GetNodeType)(const struct ak_wwise_plugin_host_xml_reader_instance_v1 *in_this)
Returns the type of the current node being read.
Definition: HostXml.h:182
bool Append(XmlWriter &in_writerToAppend)
Appending a first XML writer to a second XML writer.
Definition: HostXml.h:811
ak_wwise_plugin_host_xml_v1()
Definition: HostXml.h:152
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
Definition: AudioPlugin.h:112
Was this page helpful?
Need Support?
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageTell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise