QDomCharacterData(3qt)

πŸ“¦ version 3.3.8b, in fedora 43, fedora 44

πŸ’– QDomCharacterData πŸ’–

okay bestie, we're diving into QDomCharacterData(3qt) β€” yes that's the manual page name, it's giving very "3qt era Qt" and honestly? iconic. this is the Qt 3.3.8 manual, page qdomcharacterdata.3qt, brought to you by Trolltech AS, dated 2 February 2007. let's get into it 🫢


✨ NAME ✨

QDomCharacterData β€” the class that represents a generic string in the DOM. that's it. that's the whole job. and it does it gorgeously πŸ’…


🌸 SYNOPSIS 🌸

heads up before anything else: all the functions in this class are reentrant when Qt is built with thread support. so if you've got threads on, you're safe to vibe. πŸ”₯
#include <qdom.h>
  • Inherits: QDomNode
  • Inherited by: QDomText and QDomComment

πŸŽ€ Public Members πŸŽ€

QDomCharacterData ()
QDomCharacterData ( const QDomCharacterData & x )
QDomCharacterData & operator= ( const QDomCharacterData & x )
~QDomCharacterData ()
virtual QString substringData ( unsigned long offset, unsigned long count )
virtual void appendData ( const QString & arg )
virtual void insertData ( unsigned long offset, const QString & arg )
virtual void deleteData ( unsigned long offset, unsigned long count )
virtual void replaceData ( unsigned long offset, unsigned long count,
                           const QString & arg )
virtual uint length () const
virtual QString data () const
virtual void setData ( const QString & v )
virtual QDomNode::NodeType nodeType () const
virtual bool isCharacterData () const

πŸ¦‹ DESCRIPTION πŸ¦‹

The QDomCharacterData class represents a generic string in the DOM. lowkey the whole point of this class is "string, but make it DOM". ✨

character data as used in XML specifies a generic data string. the more specialized versions of this class are QDomText, QDomComment and QDomCDATASection β€” so this one is like, the mother of those. main character energy fr fr πŸ‘‘

here's the rundown of how you actually use it:

  • the data string gets set with setData() and retrieved with data()
  • you can grab a portion of the data string using substringData()
  • extra data can be appended with appendData(), or inserted with insertData()
  • portions of the data string can be deleted with deleteData() or replaced with replaceData()
  • the length of the data string comes back from length()

the node type of the node containing this character data is returned by nodeType().

See also: QDomText, QDomComment, QDomCDATASection, and XML.


πŸ‘‘ MEMBER FUNCTION DOCUMENTATION πŸ‘‘

QDomCharacterData::QDomCharacterData ()

constructs an empty character data object. a blank canvas, a clean slate, an empty string waiting to be slayed πŸ’…

QDomCharacterData::QDomCharacterData ( const QDomCharacterData & x )

constructs a copy of x.

⚠️ bestie listen: the data of the copy is shared (shallow copy), so modifying one node will also change the other. if you want a deep copy, use cloneNode().

QDomCharacterData::~QDomCharacterData ()

destroys the object and frees its resources. rip little node, you did great 🫢

void QDomCharacterData::appendData ( const QString & arg ) [virtual]

appends the string arg to the stored string. just adding more onto the end, no thoughts, head empty, pure vibes 🌸

QString QDomCharacterData::data () const [virtual]

returns the string stored in this object.

if the node is a null node, it will return QString::null. so yeah, empty-handed but make it graceful 😭

void QDomCharacterData::deleteData ( unsigned long offset, unsigned long count ) [virtual]

deletes a substring of length count from position offset. bye bye, no cap πŸ¦‹

void QDomCharacterData::insertData ( unsigned long offset, const QString & arg ) [virtual]

inserts the string arg into the stored string at position offset. squeezing it right in there ✨

bool QDomCharacterData::isCharacterData () const [virtual]

returns TRUE.

Reimplemented from QDomNode.

uint QDomCharacterData::length () const [virtual]

returns the length of the stored string. how many characters are we working with, bestie πŸ”’

QDomNode::NodeType QDomCharacterData::nodeType () const [virtual]

returns the type of node this object refers to β€” that's TextNode, CDATASectionNode, CommentNode or CharacterDataNode. for a null node, CharacterDataNode is returned.

Reimplemented from QDomNode. Reimplemented in QDomText and QDomComment.

QDomCharacterData & QDomCharacterData::operator= ( const QDomCharacterData & x )

assigns x to this character data.

⚠️ okay so same warning as the copy constructor, and it matters: the data of the copy is shared (shallow copy), so modifying one node will also change the other. if you want a deep copy, use cloneNode(). periodt.

void QDomCharacterData::replaceData ( unsigned long offset, unsigned long count, const QString & arg ) [virtual]

replaces the substring of length count starting at position offset with the string arg. out with the old, in with the new, glow up complete πŸ”₯

void QDomCharacterData::setData ( const QString & v ) [virtual]

sets this object's string to v. you're the author of this node's destiny now πŸ’œ

QString QDomCharacterData::substringData ( unsigned long offset, unsigned long count ) [virtual]

returns the substring of length count from position offset. lil slice of the data, cute πŸ“


🌈 SEE ALSO 🌈


Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com. see the license file included in the distribution for a complete license statement. (yes, the whole thing, we're not paraphrasing legal βœ‹)


🌟 AUTHOR 🌟

Generated automatically from the source code. so no human author to thank, just the machine doing its thing πŸ€–βœ¨


πŸ’€ BUGS πŸ’€

if you find a bug in Qt, please report it as described in http://doc.trolltech.com/bughowto.html. good bug reports help us to help you. thank you. (genuinely, they're so real for that 🫢)

the definitive Qt documentation is provided in HTML format; it's located at $QTDIR/doc/html and can be read using Qt Assistant or with a web browser. this man page is provided as a convenience for those users who prefer man pages, although this format is not officially supported by Trolltech.

if you find errors in this manual page, please report them to qt-bugs@trolltech.com. please include the name of the manual page (qdomcharacterdata.3qt) and the Qt version (3.3.8). iykyk, include the version, it saves everyone a headache πŸ™ˆ


aaaand that's the whole page bestie πŸ’… brought to you by Trolltech AS, dated 2 February 2007, for Qt version 3.3.8 β€” go forth and manipulate your character data responsibly, no cap πŸŒΈπŸ¦‹βœ¨

πŸ“¦ where this page comes from