QDomCharacterData(3qt)
π 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:
QDomTextandQDomComment
π 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 withdata() - you can grab a portion of the data string using
substringData() - extra data can be appended with
appendData(), or inserted withinsertData() - portions of the data string can be deleted with
deleteData()or replaced withreplaceData() - 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 fromQDomNode. Reimplemented inQDomTextandQDomComment.
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 π
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
- fedora 43: qt3-devel-docs 3.3.8b-102.fc43 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- fedora 44: qt3-devel-docs 3.3.8b-103.fc44 Β· QPL-1.0 OR GPL-2.0-only OR GPL-3.0-only
- Copyright 1992-2007 Trolltech ASA. All rights reserved. See the
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms