Cyclone 3DR Script
from Technodigit, part of Hexagon. Copyright 1997-2022.
 
Loading...
Searching...
No Matches
SXmlWriter.h
1
2
3
5
6#pragma once
7
8#include "RshPluginScript/RshPluginScriptDefines.h"
9#include "RshPluginScript/SClass/SObject.h"
10#include <QtCore/SFile>
11#include <QtCore/SXmlWriter>
12
13#ifndef FCT_DOC
14namespace rsh::ScriptBinding
15{
16#endif // !FCT_DOC
17
41class SXmlWriter : public SObject
42{
43 //======================================================================================================================
44 // INTERNAL FUNCTION
45 //======================================================================================================================
46
47 //======================================================================================================================
48 // DOCUMENTED FUNCTION
49 //======================================================================================================================
50
51public slots: // these functions (slots) will be available in QtScript
64 WriteStartElement( String qualifiedName);
71 WriteAttribute( String qualifiedName, String value);
72
75 String toString() ;
76};
77
78// @brief
79// This class allows to wrap static functions to SXmlWriter easily.
80// This allow to wrap constructor more easily : the constructor will be declared with the function New(...)
81class SXmlWriter
82#ifndef FCT_DOC
83 : public SObjectStatic
84#endif // FCT_DOC
85{
86 //======================================================================================================================
87 // INTERNAL FUNCTION
88 //======================================================================================================================
89
90 //======================================================================================================================
91 // DOCUMENTED FUNCTION
92 //======================================================================================================================
93public slots:
96 // TESTED
97 static SXmlWriter New();
98
101 static String toString();
102};
103Q_DECLARE_METATYPE(SXmlWriter::_SXmlWriterDummy);
104Q_DECLARE_METATYPE(SXmlWriter);
105
106#ifndef FCT_DOC
107} // namespace rsh::ScriptBinding
108#endif // !FCT_DOC
109
110Q_DECLARE_METATYPE(SXmlWriter);
111Q_DECLARE_METATYPE(SXmlWriter);
The Sfile class provides an interface for reading from and writing to files.
Definition: SFile.h:20
This class is an abstract class, you can use these function in its derived classes.
Definition: SObject.h:35
Class to write xml files Sample on how you can write an xml file.
Definition: SXmlWriter.h:42
WriteStartElement(String qualifiedName)
Writes a start element with qualifiedName. Subsequent calls to WriteAttribute() will add attributes t...
WriteStartDocument()
Writes a document start with XML version number "1.0". This also writes the encoding information.
String toString()
Get the type of the variable.
SetFile(SFile File)
Sets the current file to device. Setting the device resets reader.
WriteEndDocument()
Closes all remaining open start elements and writes a newline.
static String toString()
Get the type of the variable.
static SXmlWriter New()
Default constructor to instantiate a XmlWriter.
WriteEndElement()
Closes the previous start element.
WriteAttribute(String qualifiedName, String value)
Writes an attribute with qualifiedName and value. This function can only be called after writeStartEl...