![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <generator.h>
Public Types | |
enum | ListType { Generic , Obsolete } |
enum | Addendum { Invokable , PrivateSignal , QmlSignalHandler , AssociatedProperties , BindableProperty , OverloadNote } |
enum class | AdmonitionPrefix : unsigned char { None , Note } |
Public Types inherited from QRandomGenerator | |
typedef quint32 | result_type |
A typedef to the type that operator() returns. |
Public Member Functions | |
qreal | snippets_4_to_11 (int z, quint32 *begin, quint32 *end, const quint32 *seedBuffer, size_t len) |
Generator (Moc *moc, ClassDef *classDef, const QList< QByteArray > &metaTypes, const QHash< QByteArray, QByteArray > &knownQObjectClasses, const QHash< QByteArray, QByteArray > &knownGadgets, FILE *outfile=nullptr, bool requireCompleteTypes=false) | |
void | generateCode () |
qsizetype | registeredStringsCount () |
Generator (FileResolver &file_resolver) | |
Constructs the generator base class. | |
virtual | ~Generator () |
Destroys the generator after removing it from the list of output generators. | |
virtual bool | canHandleFormat (const QString &format) |
virtual QString | format ()=0 |
virtual void | generateDocs () |
Traverses the database recursively to generate all the documentation. | |
virtual void | initializeGenerator () |
No-op base implementation. | |
virtual void | initializeFormat () |
Reads format-specific variables from config, sets output (sub)directories, creates them on the filesystem and copies the template-specific files. | |
virtual void | terminateGenerator () |
virtual QString | typeString (const Node *node) |
QString | fullDocumentLocation (const Node *node) |
Returns the full document location. | |
QString | linkForExampleFile (const QString &path, const QString &fileExt=QString()) |
Constructs an href link from an example file name, which is a path to the example file. | |
virtual QString | fileBase (const Node *node) const |
qreal | snippets_4_to_11 (int z, quint32 *begin, quint32 *end, const quint32 *seedBuffer, size_t len) |
Public Member Functions inherited from QRandomGenerator | |
QRandomGenerator (quint32 seedValue=1) | |
Initializes this QRandomGenerator object with the value seedValue as the seed. | |
template<qsizetype N> | |
QRandomGenerator (const quint32(&seedBuffer)[N]) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with the values found in the array seedBuffer as the seed. | |
QRandomGenerator (const quint32 *seedBuffer, qsizetype len) | |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with len values found in the array seedBuffer as the seed. | |
Q_CORE_EXPORT | QRandomGenerator (std::seed_seq &sseq) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with the seed sequence sseq as the seed. | |
Q_CORE_EXPORT | QRandomGenerator (const quint32 *begin, const quint32 *end) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Initializes this QRandomGenerator object with the values found in the range from begin to end as the seed. | |
Q_CORE_EXPORT | QRandomGenerator (const QRandomGenerator &other) |
Creates a copy of the generator state in the other object. | |
Q_CORE_EXPORT QRandomGenerator & | operator= (const QRandomGenerator &other) |
~QRandomGenerator ()=default | |
quint32 | generate () |
Generates a 32-bit random quantity and returns it. | |
quint64 | generate64 () |
Generates a 64-bit random quantity and returns it. | |
double | generateDouble () |
Generates one random qreal in the canonical range [0, 1) (that is, inclusive of zero and exclusive of 1). | |
double | bounded (double highest) |
Generates one random double in the range between 0 (inclusive) and highest (exclusive). | |
quint32 | bounded (quint32 highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between 0 (inclusive) and highest (exclusive). | |
quint32 | bounded (quint32 lowest, quint32 highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between lowest (inclusive) and highest (exclusive). | |
int | bounded (int highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between 0 (inclusive) and highest (exclusive). | |
int | bounded (int lowest, int highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 32-bit quantity in the range between lowest (inclusive) and highest (exclusive), both of which may be negative, but highest must be greater than lowest. | |
quint64 | bounded (quint64 highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between 0 (inclusive) and highest (exclusive). | |
quint64 | bounded (quint64 lowest, quint64 highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between lowest (inclusive) and highest (exclusive). | |
qint64 | bounded (qint64 highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between 0 (inclusive) and highest (exclusive). | |
qint64 | bounded (qint64 lowest, qint64 highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Generates one random 64-bit quantity in the range between lowest (inclusive) and highest (exclusive), both of which may be negative, but highest must be greater than lowest. | |
qint64 | bounded (int lowest, qint64 highest) |
qint64 | bounded (qint64 lowest, int highest) |
quint64 | bounded (unsigned lowest, quint64 highest) |
quint64 | bounded (quint64 lowest, unsigned highest) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This function exists to help with overload resolution when the types of the parameters don't exactly match. | |
template<typename UInt, IfValidUInt< UInt > = true> | |
void | fillRange (UInt *buffer, qsizetype count) |
Generates count 32- or 64-bit quantities (depending on the type UInt ) and stores them in the buffer pointed by buffer. | |
template<typename UInt, size_t N, IfValidUInt< UInt > = true> | |
void | fillRange (UInt(&buffer)[N]) |
Generates N 32- or 64-bit quantities (depending on the type UInt ) and stores them in the buffer array. | |
template<typename ForwardIterator> | |
void | generate (ForwardIterator begin, ForwardIterator end) |
Generates 32-bit quantities and stores them in the range between begin and end. | |
void | generate (quint32 *begin, quint32 *end) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. | |
result_type | operator() () |
Generates a 32-bit random quantity and returns it. | |
void | seed (quint32 s=1) |
Reseeds this object using the value seed as the seed. | |
void | seed (std::seed_seq &sseq) noexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Reseeds this object using the seed sequence seed as the seed. | |
Q_CORE_EXPORT void | discard (unsigned long long z) |
Discards the next z entries from the sequence. |
Static Public Member Functions | |
static QString | exampleFileTitle (const ExampleNode *relative, const QString &fileName) |
Helper function to construct a title for a file or image page included in an example. | |
static Generator * | currentGenerator () |
static Generator * | generatorForFormat (const QString &format) |
static void | initialize () |
static const QString & | outputDir () |
static const QString & | outputSubdir () |
static void | terminate () |
static const QStringList & | outputFileNames () |
static bool | noLinkErrors () |
static bool | autolinkErrors () |
static QString | defaultModuleName () |
static void | resetUseOutputSubdirs () |
static bool | useOutputSubdirs () |
static void | setQmlTypeContext (QmlTypeNode *t) |
static QmlTypeNode * | qmlTypeContext () |
static QString | cleanRef (const QString &ref, bool xmlCompliant=false) |
Clean the given ref to be used as an HTML anchor or an xml:id . | |
static QString | plainCode (const QString &markedCode) |
static Qt::SortOrder | sortOrder (const QString &str) |
static void | addNodeLink (Text &text, const QString &nodeRef, const QString &linkText) |
Adds a formatted link to the specified text stream. | |
static void | addNodeLink (Text &text, const INode *node, const QString &linkText=QString()) |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This convenience overload automatically obtains the node reference string using stringForNode(). | |
Static Public Member Functions inherited from QRandomGenerator | |
static constexpr result_type | min () |
Returns the minimum value that QRandomGenerator may ever generate. | |
static constexpr result_type | max () |
Returns the maximum value that QRandomGenerator may ever generate. | |
static Q_DECL_CONST_FUNCTION QRandomGenerator * | system () |
\threadsafe | |
static Q_DECL_CONST_FUNCTION QRandomGenerator * | global () |
\threadsafe | |
static QRandomGenerator | securelySeeded () |
Returns a new QRandomGenerator object that was securely seeded with QRandomGenerator::system(). |
Protected Member Functions | |
void | beginSubPage (const Node *node, const QString &fileName) |
Creates the file named fileName in the output directory. | |
void | endSubPage () |
Flush the text stream associated with the subpage, and then pop it off the text stream stack and delete it. | |
virtual QString | fileExtension () const =0 |
virtual void | generateExampleFilePage (const Node *, ResolvedFile, CodeMarker *=nullptr) |
virtual void | generateAlsoList (const Node *node, CodeMarker *marker) |
virtual void | generateAlsoList (const Node *node) |
virtual qsizetype | generateAtom (const Atom *, const Node *, CodeMarker *) |
virtual void | generateBody (const Node *node, CodeMarker *marker) |
Generate the body of the documentation from the qdoc comment found with the entity represented by the node. | |
virtual void | generateCppReferencePage (Aggregate *, CodeMarker *) |
virtual void | generateProxyPage (Aggregate *, CodeMarker *) |
virtual void | generateQmlTypePage (QmlTypeNode *, CodeMarker *) |
virtual void | generatePageNode (PageNode *, CodeMarker *) |
virtual void | generateCollectionNode (CollectionNode *, CodeMarker *) |
virtual void | generateGenericCollectionPage (CollectionNode *, CodeMarker *) |
virtual void | generateDocumentation (Node *node) |
Recursive writing of HTML files from the root node. | |
virtual bool | generateText (const Text &text, const Node *relative, CodeMarker *marker) |
Generate the documentation for relative. | |
virtual bool | generateText (const Text &text, const Node *relative) |
virtual int | skipAtoms (const Atom *atom, Atom::AtomType type) const |
void | initializeTextOutput () |
Resets the variables used during text output. | |
QString | fileName (const Node *node, const QString &extension=QString()) const |
If the node has a URL, return the URL as the file name. | |
QMap< QString, QString > & | formattingLeftMap () |
QMap< QString, QString > & | formattingRightMap () |
const Atom * | generateAtomList (const Atom *atom, const Node *relative, CodeMarker *marker, bool generate, int &numGeneratedAtoms) |
void | generateEnumValuesForQmlReference (const Node *node, CodeMarker *marker) |
void | generateRequiredLinks (const Node *node, CodeMarker *marker) |
Generates either a link to the project folder for example node, or a list of links files/images if 'url.examples config' variable is not defined. | |
void | generateLinkToExample (const ExampleNode *en, CodeMarker *marker, const QString &exampleUrl) |
Generates an external link to the project folder for example node. | |
virtual void | generateFileList (const ExampleNode *en, CodeMarker *marker, bool images) |
This function is called when the documentation for an example is being formatted. | |
void | generateSince (const Node *node, CodeMarker *marker) |
void | generateNoexceptNote (const Node *node, CodeMarker *marker) |
void | generateStatus (const Node *node, CodeMarker *marker) |
virtual void | generateAddendum (const Node *node, Addendum type, CodeMarker *marker, AdmonitionPrefix prefix) |
Generates an addendum note of type type for node, using marker as the code marker. | |
virtual void | generateAddendum (const Node *node, Addendum type, CodeMarker *marker) |
void | generateThreadSafeness (const Node *node, CodeMarker *marker) |
Generates text that explains how threadsafe and/or reentrant node is. | |
bool | generateComparisonCategory (const Node *node, CodeMarker *marker=nullptr) |
bool | generateComparisonList (const Node *node) |
Generates a list of types that compare to node with the comparison category that applies for the relationship, followed by (an optional) descriptive text. | |
QString | generateOverloadSnippet (const FunctionNode *func) |
Generates a contextual code snippet for connecting to an overloaded signal or slot. | |
QString | generateObjectName (const QString &className) |
Generates an appropriate object name for code snippets based on the class name. | |
QString | indent (int level, const QString &markedCode) |
QTextStream & | out () |
QString | outFileName () |
bool | parseArg (const QString &src, const QString &tag, int *pos, int n, QStringView *contents, QStringView *par1=nullptr) |
void | unknownAtom (const Atom *atom) |
int | appendSortedQmlNames (Text &text, const Node *base, const QStringList &knownTypes, const QList< Node * > &subs) |
void | appendFullName (Text &text, const Node *apparentNode, const Node *relative, const Node *actualNode=nullptr) |
void | appendFullName (Text &text, const Node *apparentNode, const QString &fullName, const Node *actualNode) |
int | appendSortedNames (Text &text, const ClassNode *classe, const QList< RelatedClass > &classes) |
void | appendSignature (Text &text, const Node *node) |
Append the signature for the function named in node to text, so that is a link to the documentation for that function. | |
void | signatureList (const QList< Node * > &nodes, const Node *relative, CodeMarker *marker) |
Generate a bullet list of function signatures. | |
void | addImageToCopy (const ExampleNode *en, const ResolvedFile &resolved_file) |
Protected Member Functions inherited from QRandomGenerator | |
QRandomGenerator (System) |
Static Protected Member Functions | |
static QFile * | openSubPageFile (const PageNode *node, const QString &fileName) |
Creates the file named fileName in the output directory and returns a QFile pointing to this file. | |
static bool | matchAhead (const Atom *atom, Atom::AtomType expectedAtomType) |
static QString | outputPrefix (const Node *node) |
static QString | outputSuffix (const Node *node) |
static void | supplementAlsoList (const Node *node, QList< Text > &alsoList) |
static QString | trimmedTrailing (const QString &string, const QString &prefix, const QString &suffix) |
Trims trailing whitespace off the string and returns the trimmed string. | |
static QString | formatSince (const Node *node) |
static bool | hasExceptions (const Node *node, QList< Node * > &reentrant, QList< Node * > &threadsafe, QList< Node * > &nonreentrant) |
static bool | comparePaths (const QString &a, const QString &b) |
static bool | appendTrademark (const Atom *atom) |
Returns true if a trademark symbol should be appended to the output as determined by atom. | |
static std::optional< std::pair< QString, QString > > | cmakeRequisite (const CollectionNode *cn) |
Generate the CMake requisite for the node cn, i.e. |
Protected Attributes | |
QString | naturalLanguage |
QString | tagFile_ |
QStack< QTextStream * > | outStreamStack |
FileResolver & | file_resolver |
QDocDatabase * | m_qdb { nullptr } |
bool | m_inLink { false } |
bool | m_inContents { false } |
bool | m_inSectionHeading { false } |
bool | m_inTableHeader { false } |
bool | m_threeColumnEnumValueTable { true } |
bool | m_quoting { false } |
int | m_numTableRows { 0 } |
QString | m_link {} |
QString | m_sectionNumber {} |
Additional Inherited Members | |
Protected Types inherited from QRandomGenerator | |
enum | System |
Definition at line 32 of file src_corelib_global_qrandom.cpp.
enum Generator::Addendum |
Enumerator | |
---|---|
Invokable | |
PrivateSignal | |
QmlSignalHandler | |
AssociatedProperties | |
BindableProperty | |
OverloadNote |
Definition at line 42 of file generator.h.
|
strong |
Enumerator | |
---|---|
None | |
Note |
Definition at line 51 of file generator.h.
enum Generator::ListType |
Enumerator | |
---|---|
Generic | |
Obsolete |
Definition at line 40 of file generator.h.
Generator::Generator | ( | Moc * | moc, |
ClassDef * | classDef, | ||
const QList< QByteArray > & | metaTypes, | ||
const QHash< QByteArray, QByteArray > & | knownQObjectClasses, | ||
const QHash< QByteArray, QByteArray > & | knownGadgets, | ||
FILE * | outfile = nullptr, | ||
bool | requireCompleteTypes = false ) |
Definition at line 81 of file generator.cpp.
References Generator().
Referenced by Generator().
Generator::Generator | ( | FileResolver & | file_resolver | ) |
Constructs the generator base class.
Prepends the newly constructed generator to the list of output generators. Sets a pointer to the QDoc database singleton, which is available to the generator subclasses.
Definition at line 80 of file generator.cpp.
References file_resolver.
|
virtual |
Destroys the generator after removing it from the list of output generators.
Definition at line 91 of file generator.cpp.
|
protected |
Definition at line 914 of file generator.cpp.
References Node< _Tp >::location().
|
static |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.This convenience overload automatically obtains the node reference string using stringForNode().
If linkText is empty, the node's name is used as the link text; otherwise, the specified linkText is used.
Definition at line 2402 of file generator.cpp.
|
static |
Adds a formatted link to the specified text stream.
This function creates a sequence of Atom objects that together form a link and appends them to the text. The nodeRef parameter specifies the target of the link (typically obtained via stringForNode()), and linkText specifies the visible text for the link.
Definition at line 2386 of file generator.cpp.
References Atom::FormattingLeft, Atom::FormattingRight, Atom::LinkNode, and Atom::String.
|
protected |
Definition at line 96 of file generator.cpp.
|
protected |
Definition at line 105 of file generator.cpp.
Append the signature for the function named in node to text, so that is a link to the documentation for that function.
Definition at line 119 of file generator.cpp.
References Node< _Tp >::SignaturePlain.
|
protected |
Definition at line 144 of file generator.cpp.
|
protected |
Definition at line 165 of file generator.cpp.
|
staticprotected |
Returns true
if a trademark symbol should be appended to the output as determined by atom.
Trademarks are tracked via the use of the \tm formatting command.
Returns true if:
\list
Definition at line 1558 of file generator.cpp.
References Atom::FormattingRight, and Atom::type().
Referenced by WebXMLGenerator::addAtomElements(), and HtmlGenerator::generateAtom().
|
inlinestatic |
Definition at line 79 of file generator.h.
Referenced by HtmlGenerator::generateAtom().
Creates the file named fileName in the output directory.
Attaches a QTextStream to the created file, which is written to all over the place using out().
Definition at line 237 of file generator.cpp.
References Node< _Tp >::isPageNode().
|
inlinevirtual |
Definition at line 60 of file generator.h.
References format().
Clean the given ref to be used as an HTML anchor or an xml:id
.
If xmlCompliant is set to true
, a stricter process is used, as XML is more rigorous in what it accepts. Otherwise, if xmlCompliant is set to false
, the basic HTML transformations are applied.
More specifically, only XML NCNames are allowed (https://www.w3.org/TR/REC-xml-names/#NT-NCName).
Definition at line 398 of file generator.cpp.
|
staticprotected |
Generate the CMake requisite for the node cn, i.e.
the the find_package and target_link_libraries calls to use it.
If only cmakepackage is set it will look like
\badcode find_package(Foo REQUIRED) target_link_libraries(mytarget PRIVATE Foo:Foo)
If no cmakepackage is set Qt6 is assumed.
If cmakecomponent is set it will look like
\badcode find_package(Qt6 REQUIRED COMPONENTS Bar) target_link_libraries(mytarget PRIVATE Qt6::Bar)
If cmaketargetitem is set the item in target_link_libraries will be set accordingly
\badcode find_package(Qt6 REQUIRED COMPONENTS Bar) target_link_libraries(mytarget PRIVATE My::Target)
Returns a pair consisting of the find package line and link libraries line.
If no sensible requisite can be created (i.e. both cmakecomponent and cmakepackage are unset) std::nullopt
is returned.
Definition at line 2343 of file generator.cpp.
Definition at line 178 of file generator.h.
|
inlinestatic |
Definition at line 71 of file generator.h.
Referenced by fullDocumentLocation().
|
inlinestatic |
Definition at line 80 of file generator.h.
|
protected |
Flush the text stream associated with the subpage, and then pop it off the text stream stack and delete it.
This terminates output of the subpage.
Definition at line 250 of file generator.cpp.
Referenced by WebXMLGenerator::generateCppReferencePage(), generateDocumentation(), HtmlGenerator::generateExampleFilePage(), WebXMLGenerator::generateExampleFilePage(), and WebXMLGenerator::generatePageNode().
|
static |
Helper function to construct a title for a file or image page included in an example.
Definition at line 348 of file generator.cpp.
Reimplemented in HtmlGenerator, and WebXMLGenerator.
Definition at line 257 of file generator.cpp.
References Node< _Tp >::createContext(), Node< _Tp >::hasFileNameBase(), Node< _Tp >::isCollectionNode(), Node< _Tp >::isExample(), Node< _Tp >::isModule(), Node< _Tp >::isPageNode(), Node< _Tp >::isProxyNode(), Node< _Tp >::isQmlBasicType(), Node< _Tp >::isQmlModule(), Node< _Tp >::isQmlType(), Node< _Tp >::isTextPageNode(), Node< _Tp >::logicalModule(), and Node< _Tp >::parent().
|
nodiscardprotectedpure virtual |
Implemented in DocBookGenerator, HtmlGenerator, and WebXMLGenerator.
|
protected |
If the node has a URL, return the URL as the file name.
Otherwise, construct the file name from the fileBase() and either the provided extension or fileExtension(), and return the constructed name.
Definition at line 367 of file generator.cpp.
References Node< _Tp >::isCollectionNode(), and Node< _Tp >::isTextPageNode().
|
pure virtual |
Implemented in DocBookGenerator, HtmlGenerator, and WebXMLGenerator.
Referenced by canHandleFormat().
Definition at line 1159 of file generator.cpp.
Definition at line 453 of file generator.cpp.
Definition at line 458 of file generator.cpp.
Returns the full document location.
Definition at line 466 of file generator.cpp.
References currentGenerator(), Enum, Function, Group, HeaderFile, Node< _Tp >::isAttached(), Node< _Tp >::isClassNode(), Node< _Tp >::isCollectionNode(), Node< _Tp >::isDeprecated(), FunctionNode::isDtor(), Node< _Tp >::isNamespace(), Node< _Tp >::isPropertyGroup(), Node< _Tp >::isQmlType(), Node< _Tp >::isTextPageNode(), FunctionNode::metaness(), Module, Node< _Tp >::nodeType(), Page, Node< _Tp >::parent(), Property, QmlEnum, FunctionNode::QmlMethod, QmlModule, QmlProperty, FunctionNode::QmlSignal, FunctionNode::QmlSignalHandler, QmlType, SharedComment, TypeAlias, Typedef, and Variable.
|
inlineprotectedvirtual |
Definition at line 136 of file generator.h.
References generateAddendum(), and Note.
Referenced by generateBody().
|
protectedvirtual |
Generates an addendum note of type type for node, using marker as the code marker.
Reimplemented in DocBookGenerator.
Definition at line 1308 of file generator.cpp.
References AssociatedProperties, Atom::AutoLink, PropertyNode::Bindable, BindableProperty, Atom::Code, Atom::DivRight, Node< _Tp >::doc(), Atom::FormattingLeft, Atom::FormattingRight, generateText(), PropertyNode::Getter, Invokable, Node< _Tp >::isClassNode(), Node< _Tp >::isFunction(), Node< _Tp >::isNamespace(), FunctionNode::isSignal(), FunctionNode::isSlot(), Atom::Link, Node< _Tp >::nodeNameLessThan(), None, Note, PropertyNode::Notifier, OverloadNote, Atom::ParaLeft, Atom::ParaRight, Node< _Tp >::parent(), PrivateSignal, QmlSignalHandler, PropertyNode::Resetter, and PropertyNode::Setter.
Referenced by generateAddendum(), and generateBody().
Reimplemented in DocBookGenerator.
Definition at line 96 of file generator.h.
References generateAlsoList().
|
protectedvirtual |
Definition at line 591 of file generator.cpp.
References Node< _Tp >::doc(), Atom::FormattingLeft, Atom::FormattingRight, generateText(), Atom::ParaLeft, and Atom::ParaRight.
Referenced by generateAlsoList().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, HtmlGenerator, and WebXMLGenerator.
Definition at line 97 of file generator.h.
|
protected |
Definition at line 621 of file generator.cpp.
References Atom::FormatElse, Atom::FormatEndif, Atom::FormatIf, generateAtomList(), Atom::next(), and Atom::type().
Referenced by generateAtomList(), DocBookGenerator::generateText(), and generateText().
|
protectedvirtual |
Generate the body of the documentation from the qdoc comment found with the entity represented by the node.
Reimplemented in DocBookGenerator.
Definition at line 670 of file generator.cpp.
References AssociatedProperties, BindableProperty, Doc::body(), Node< _Tp >::createContext(), Node< _Tp >::doc(), generateAddendum(), generateAddendum(), generateEnumValuesForQmlReference(), generateRequiredLinks(), generateText(), FunctionNode::hasAssociatedProperties(), Node< _Tp >::hasDoc(), FunctionNode::hasOverloads(), Invokable, FunctionNode::isCAssign(), FunctionNode::isCCtor(), FunctionNode::isCtor(), FunctionNode::isDeprecated(), FunctionNode::isDtor(), Node< _Tp >::isEnumType(), Node< _Tp >::isFunction(), FunctionNode::isIgnored(), FunctionNode::isInvokable(), FunctionNode::isMarkedReimp(), Node< _Tp >::isMarkedReimp(), FunctionNode::isMAssign(), FunctionNode::isMCtor(), FunctionNode::isOverload(), FunctionNode::isPrivateSignal(), Node< _Tp >::isProperty(), Node< _Tp >::isQmlProperty(), FunctionNode::isQmlSignal(), Node< _Tp >::isSharingComment(), FunctionNode::isVirtual(), Node< _Tp >::isWrapper(), Doc::location(), Node< _Tp >::location(), None, out(), OverloadNote, FunctionNode::overridesThis(), FunctionNode::parameters(), Node< _Tp >::parent(), PrivateSignal, PropertyNode::propertyType(), QmlSignalHandler, InclusionFilter::requiresDocumentation(), FunctionNode::returnsBool(), and PropertyNode::StandardProperty.
Referenced by HtmlGenerator::generateCollectionNode(), HtmlGenerator::generateCppReferencePage(), HtmlGenerator::generatePageNode(), HtmlGenerator::generateProxyPage(), and HtmlGenerator::generateQmlTypePage().
void Generator::generateCode | ( | ) |
Definition at line 226 of file generator.cpp.
References ClassDef::hasQGadget, ClassDef::hasQNamespace, ClassDef::hasQObject, FunctionDef::Private, and ClassDef::requireCompleteMethodTypes.
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, and HtmlGenerator.
Definition at line 103 of file generator.h.
Referenced by generateDocumentation().
|
protected |
Generates text that describes the comparison category of node. The CodeMarker marker is passed along to generateText().
Definition at line 1674 of file generator.cpp.
References Node< _Tp >::comparisonCategory(), and generateText().
Referenced by HtmlGenerator::generateCppReferencePage(), and DocBookGenerator::generateHeader().
|
protected |
Generates a list of types that compare to node with the comparison category that applies for the relationship, followed by (an optional) descriptive text.
Returns true
if text was generated, false
otherwise.
Definition at line 1699 of file generator.cpp.
References Node< _Tp >::doc(), generateText(), and Text::isEmpty().
Referenced by HtmlGenerator::generateCppReferencePage(), and DocBookGenerator::generateHeader().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, HtmlGenerator, and WebXMLGenerator.
Definition at line 99 of file generator.h.
Referenced by generateDocumentation().
|
virtual |
Traverses the database recursively to generate all the documentation.
Reimplemented in HtmlGenerator.
Definition at line 1731 of file generator.cpp.
References generateDocumentation(), m_qdb, and QDocDatabase::primaryTreeRoot().
Referenced by HtmlGenerator::generateDocs().
Recursive writing of HTML files from the root node.
Reimplemented in DocBookGenerator, and WebXMLGenerator.
Definition at line 1011 of file generator.cpp.
References Aggregate::childNodes(), Node< _Tp >::createContext(), Node< _Tp >::docMustBeGenerated(), endSubPage(), generateCollectionNode(), generateCppReferencePage(), generateGenericCollectionPage(), generatePageNode(), generateProxyPage(), generateQmlTypePage(), Node< _Tp >::isAggregate(), Node< _Tp >::isClassNode(), Node< _Tp >::isCollectionNode(), Node< _Tp >::isExternalPage(), Node< _Tp >::isGenericCollection(), Node< _Tp >::isHeader(), InclusionFilter::isIncluded(), Node< _Tp >::isIndexNode(), Node< _Tp >::isNamespace(), Node< _Tp >::isProxyNode(), Node< _Tp >::isQmlType(), Node< _Tp >::isTextPageNode(), Node< _Tp >::location(), m_qdb, QDocDatabase::mergeCollections(), Node< _Tp >::parent(), and CollectionNode::wasSeen().
Referenced by generateDocs().
|
protected |
Definition at line 2165 of file generator.cpp.
References Node< _Tp >::doc(), NativeEnum::enumNode(), generateText(), generateText(), Text::isEmpty(), Atom::ListLeft, Atom::ListRight, and NativeEnumInterface::nativeEnum().
Referenced by DocBookGenerator::generateBody(), and generateBody().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, HtmlGenerator, and WebXMLGenerator.
Definition at line 94 of file generator.h.
|
protectedvirtual |
This function is called when the documentation for an example is being formatted.
It outputs a list of files for the example, which can be the example's source files or the list of images used by the example. The images are copied into a subtree of {...doc/html/images/used-in-examples/...}
Definition at line 952 of file generator.cpp.
References OpenedList::OpenedList(), OpenedList::Bullet, Atom::ExampleFileLink, Atom::ExampleImageLink, Atom::ListLeft, Atom::ListRight, Atom::ParaLeft, Atom::ParaRight, and OpenedList::styleString().
Referenced by generateRequiredLinks().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, and HtmlGenerator.
Definition at line 104 of file generator.h.
Referenced by generateDocumentation().
|
protected |
Generates an external link to the project folder for example node.
The path to the example replaces a placeholder '\1' character if one is found in the baseUrl string. If no such placeholder is found, the path is appended to baseUrl, after a '/' character if baseUrl did not already end in one.
Definition at line 875 of file generator.cpp.
References Node< _Tp >::doc(), Atom::FormattingLeft, Atom::FormattingRight, generateText(), Atom::Link, Atom::ParaLeft, Atom::ParaRight, and Atom::String.
|
protected |
Definition at line 1225 of file generator.cpp.
References Node< _Tp >::isSharedCommentNode().
Generates an appropriate object name for code snippets based on the class name.
Converts class names like "QComboBox" to "comboBox".
Definition at line 2442 of file generator.cpp.
|
protected |
Generates a contextual code snippet for connecting to an overloaded signal or slot.
Returns an empty string if the function is not a signal or slot.
Definition at line 2414 of file generator.cpp.
References FunctionNode::isSignal(), and FunctionNode::isSlot().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, HtmlGenerator, and WebXMLGenerator.
Definition at line 102 of file generator.h.
Referenced by generateDocumentation().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, and HtmlGenerator.
Definition at line 100 of file generator.h.
Referenced by generateDocumentation().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator, and HtmlGenerator.
Definition at line 101 of file generator.h.
Referenced by generateDocumentation().
|
protected |
Generates either a link to the project folder for example node, or a list of links files/images if 'url.examples config' variable is not defined.
Does nothing for non-example nodes.
Definition at line 850 of file generator.cpp.
References generateFileList(), Node< _Tp >::isExample(), and PageNode::noAutoList().
Referenced by WebXMLGenerator::append(), and generateBody().
|
protected |
Definition at line 1215 of file generator.cpp.
References generateText().
Referenced by HtmlGenerator::generateCollectionNode(), and HtmlGenerator::generateCppReferencePage().
|
protected |
Definition at line 1252 of file generator.cpp.
References Node< _Tp >::Active, Node< _Tp >::Deprecated, Atom::FormattingLeft, Atom::FormattingRight, generateText(), Node< _Tp >::Internal, Node< _Tp >::isAggregate(), Node< _Tp >::isModule(), Node< _Tp >::isQmlModule(), Node< _Tp >::isQmlNode(), Atom::ParaLeft, Atom::ParaRight, and Node< _Tp >::status().
Referenced by HtmlGenerator::generateCollectionNode(), HtmlGenerator::generateCppReferencePage(), and HtmlGenerator::generateQmlTypePage().
|
inlineprotectedvirtual |
Reimplemented in DocBookGenerator.
Definition at line 107 of file generator.h.
References generateText().
Referenced by generateEnumValuesForQmlReference().
|
protectedvirtual |
Generate the documentation for relative.
i.e. relative is the node that represents the entity where a qdoc comment was found, and text represents the qdoc comment.
Definition at line 1492 of file generator.cpp.
References Text::firstAtom(), generateAtomList(), and initializeTextOutput().
Referenced by generateAddendum(), generateAlsoList(), generateBody(), generateComparisonCategory(), generateComparisonList(), generateEnumValuesForQmlReference(), generateLinkToExample(), generateSince(), generateStatus(), generateText(), generateThreadSafeness(), and signatureList().
|
protected |
Generates text that explains how threadsafe and/or reentrant node is.
Definition at line 1584 of file generator.cpp.
References Text::clear(), Atom::FormattingLeft, Atom::FormattingRight, generateText(), Node< _Tp >::isAggregate(), Atom::Link, Atom::ParaRight, Node< _Tp >::Reentrant, startNote(), Node< _Tp >::ThreadSafe, Node< _Tp >::threadSafeness(), and Node< _Tp >::UnspecifiedSafeness.
Referenced by HtmlGenerator::generateCppReferencePage().
Definition at line 1737 of file generator.cpp.
|
staticprotected |
Definition at line 1513 of file generator.cpp.
References Aggregate::childNodes(), and Node< _Tp >::threadSafeness().
Definition at line 1746 of file generator.cpp.
|
static |
Definition at line 1770 of file generator.cpp.
References ConfigVar::asBool().
Referenced by processQdocconfFile().
|
virtual |
Reads format-specific variables from config, sets output (sub)directories, creates them on the filesystem and copies the template-specific files.
Definition at line 1891 of file generator.cpp.
References Location::Location(), ConfigVar::asBool(), Config::generating(), m_quoting, Config::preparing(), resetUseOutputSubdirs(), and useOutputSubdirs().
|
virtual |
No-op base implementation.
Subclasses may override to perform generator-specific initialization.
Reimplemented in DocBookGenerator, HtmlGenerator, and WebXMLGenerator.
Definition at line 1944 of file generator.cpp.
Referenced by DocBookGenerator::initializeGenerator(), and HtmlGenerator::initializeGenerator().
|
protected |
Resets the variables used during text output.
Definition at line 2102 of file generator.cpp.
References m_inContents, m_inLink, m_inSectionHeading, m_inTableHeader, m_numTableRows, and m_threeColumnEnumValueTable.
Referenced by DocBookGenerator::generateText(), and generateText().
Constructs an href link from an example file name, which is a path to the example file.
If fileExt is empty (default value), retrieve the file extension from the generator.
Definition at line 333 of file generator.cpp.
|
staticprotected |
Definition at line 1949 of file generator.cpp.
References Atom::next(), and Atom::type().
Referenced by DocBookGenerator::generateAtom(), and HtmlGenerator::generateAtom().
|
inlinestatic |
Definition at line 78 of file generator.h.
Referenced by HtmlGenerator::generateAtom().
|
staticprotected |
Creates the file named fileName in the output directory and returns a QFile pointing to this file.
In particular, this method deals with errors when opening the file: the returned QFile is always valid and can be written to.
Definition at line 198 of file generator.cpp.
References Node< _Tp >::location().
|
protected |
Referenced by HtmlGenerator::generateAtom(), generateBody(), HtmlGenerator::generateCollectionNode(), HtmlGenerator::generateCppReferencePage(), WebXMLGenerator::generateCppReferencePage(), WebXMLGenerator::generateExampleFilePage(), HtmlGenerator::generateGenericCollectionPage(), HtmlGenerator::generatePageNode(), WebXMLGenerator::generatePageNode(), HtmlGenerator::generateProxyPage(), HtmlGenerator::generateQmlTypePage(), and outFileName().
|
protected |
Definition at line 1964 of file generator.cpp.
References out().
|
inlinestatic |
Definition at line 74 of file generator.h.
|
inlinestatic |
Definition at line 77 of file generator.h.
Definition at line 1969 of file generator.cpp.
References Node< _Tp >::genus(), Node< _Tp >::isCollectionNode(), and Node< _Tp >::isPageNode().
|
inlinestatic |
Definition at line 75 of file generator.h.
Definition at line 1985 of file generator.cpp.
References Node< _Tp >::genus(), and Node< _Tp >::isPageNode().
|
protected |
Definition at line 2001 of file generator.cpp.
Definition at line 2077 of file generator.cpp.
|
inlinestatic |
Definition at line 84 of file generator.h.
|
inline |
Definition at line 24 of file generator.h.
|
inlinestatic |
Definition at line 81 of file generator.h.
Referenced by initializeFormat().
|
inlinestatic |
Definition at line 83 of file generator.h.
Referenced by DocBookGenerator::generateQmlTypePage(), and HtmlGenerator::generateQmlTypePage().
|
protected |
Generate a bullet list of function signatures.
The function nodes are in nodes. It uses the relative node and the marker for the generation.
Definition at line 129 of file generator.cpp.
References generateText(), Atom::ListLeft, and Atom::ListRight.
|
protectedvirtual |
Definition at line 2088 of file generator.cpp.
References Atom::next(), and Atom::type().
Referenced by DocBookGenerator::generateAtom().
qreal Generator::snippets_4_to_11 | ( | int | z, |
quint32 * | begin, | ||
quint32 * | end, | ||
const quint32 * | seedBuffer, | ||
size_t | len ) |
[4]
[4]
[5]
[5]
[6]
[6]
[7]
[7]
[8]
[8]
[9]
[9]
[10]
[10]
[11]
[11]
Definition at line 38 of file src_corelib_global_qrandom.cpp.
qreal Generator::snippets_4_to_11 | ( | int | z, |
quint32 * | begin, | ||
quint32 * | end, | ||
const quint32 * | seedBuffer, | ||
size_t | len ) |
|
inlinestatic |
Definition at line 183 of file generator.h.
Definition at line 2114 of file generator.cpp.
References Node< _Tp >::access(), Atom::FormattingLeft, Atom::FormattingRight, FunctionNode::isDeprecated(), Node< _Tp >::isFunction(), Node< _Tp >::isMacro(), Atom::Link, FunctionNode::overloadNumber(), Node< _Tp >::parent(), and Private.
|
static |
Definition at line 2197 of file generator.cpp.
Referenced by processQdocconfFile().
|
virtual |
Reimplemented in HtmlGenerator, and WebXMLGenerator.
Definition at line 2234 of file generator.cpp.
Referenced by HtmlGenerator::terminateGenerator().
|
staticprotected |
Trims trailing whitespace off the string and returns the trimmed string.
Definition at line 2240 of file generator.cpp.
Definition at line 2252 of file generator.cpp.
References Class, Enum, Function, FunctionNode::MacroWithoutParams, FunctionNode::MacroWithParams, FunctionNode::metaness(), Module, Namespace, Node< _Tp >::nodeType(), Page, Property, FunctionNode::QmlMethod, QmlModule, QmlProperty, FunctionNode::QmlSignal, FunctionNode::QmlSignalHandler, QmlType, QmlValueType, SharedComment, Struct, TypeAlias, Typedef, and Union.
Definition at line 2305 of file generator.cpp.
Referenced by DocBookGenerator::generateAtom(), and HtmlGenerator::generateAtom().
|
inlinestatic |
Definition at line 82 of file generator.h.
Referenced by initializeFormat().
|
protected |
Definition at line 215 of file generator.h.
Referenced by Generator(), WebXMLGenerator::addAtomElements(), DocBookGenerator::generateAtom(), and HtmlGenerator::generateAtom().
|
protected |
Definition at line 219 of file generator.h.
Referenced by DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), and initializeTextOutput().
|
protected |
Definition at line 218 of file generator.h.
Referenced by WebXMLGenerator::addAtomElements(), WebXMLGenerator::append(), DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), and initializeTextOutput().
|
protected |
Definition at line 220 of file generator.h.
Referenced by WebXMLGenerator::addAtomElements(), WebXMLGenerator::append(), DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), and initializeTextOutput().
|
protected |
Definition at line 221 of file generator.h.
Referenced by DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), and initializeTextOutput().
|
protected |
Definition at line 225 of file generator.h.
|
protected |
Definition at line 224 of file generator.h.
Referenced by HtmlGenerator::generateAtom(), and initializeTextOutput().
|
protected |
Definition at line 217 of file generator.h.
Referenced by WebXMLGenerator::addAtomElements(), DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), DocBookGenerator::generateDocBookSynopsis(), generateDocs(), DocBookGenerator::generateDocumentation(), generateDocumentation(), WebXMLGenerator::generateDocumentation(), DocBookGenerator::generateGroupReferenceText(), DocBookGenerator::generateHeader(), DocBookGenerator::generateList(), and DocBookGenerator::generateRequisites().
|
protected |
Definition at line 223 of file generator.h.
Referenced by WebXMLGenerator::addAtomElements(), and initializeFormat().
|
protected |
Definition at line 226 of file generator.h.
|
protected |
Definition at line 222 of file generator.h.
Referenced by DocBookGenerator::generateAtom(), HtmlGenerator::generateAtom(), and initializeTextOutput().
|
protected |
Definition at line 159 of file generator.h.
|
protected |
Definition at line 161 of file generator.h.
|
protected |
Definition at line 160 of file generator.h.