Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
CodeChunk Class Reference

The CodeChunk class represents a tiny piece of C++ code. More...

#include <codechunk.h>

+ Collaboration diagram for CodeChunk:

Public Member Functions

 CodeChunk ()
 
void append (const QString &lexeme)
 Appends lexeme to the current string contents, inserting a space if appropriate.
 
void appendHotspot ()
 
bool isEmpty () const
 
void clear ()
 
QString toString () const
 
QString left () const
 
QString right () const
 

Detailed Description

The CodeChunk class represents a tiny piece of C++ code.

Note
I think this class should be eliminated (mws 11/12/2018

The class provides conversion between a list of lexemes and a string. It adds spaces at the right place for consistent style. The tiny pieces of code it represents are data types, enum values, and default parameter values.

Apart from the piece of code itself, there are two bits of metainformation stored in CodeChunk: the base and the hotspot. The base is the part of the piece that may be a hypertext link. The base of

QMap<QString, QString>

is QMap.

The hotspot is the place the variable name should be inserted in the case of a variable (or parameter) declaration. The hotspot of

char * []

is between '*' and '[]'.

Definition at line 13 of file codechunk.h.

Constructor & Destructor Documentation

◆ CodeChunk()

CodeChunk::CodeChunk ( )
inline

Definition at line 16 of file codechunk.h.

Member Function Documentation

◆ append()

void CodeChunk::append ( const QString & lexeme)

Appends lexeme to the current string contents, inserting a space if appropriate.

Definition at line 89 of file codechunk.cpp.

◆ appendHotspot()

void CodeChunk::appendHotspot ( )
inline

Definition at line 19 of file codechunk.h.

◆ clear()

void CodeChunk::clear ( )
inline

Definition at line 26 of file codechunk.h.

◆ isEmpty()

bool CodeChunk::isEmpty ( ) const
inlinenodiscard

Definition at line 25 of file codechunk.h.

◆ left()

QString CodeChunk::left ( ) const
inlinenodiscard

Definition at line 28 of file codechunk.h.

Referenced by testing.tools.safetynet_image.ImageLocations::Left().

+ Here is the caller graph for this function:

◆ right()

QString CodeChunk::right ( ) const
inlinenodiscard

Definition at line 32 of file codechunk.h.

Referenced by testing.tools.safetynet_image.ImageLocations::Right().

+ Here is the caller graph for this function:

◆ toString()

QString CodeChunk::toString ( ) const
inlinenodiscard

Definition at line 27 of file codechunk.h.


The documentation for this class was generated from the following files: