![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
The CodeChunk class represents a tiny piece of C++ code. More...
#include <codechunk.h>
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 |
The CodeChunk class represents a tiny piece of C++ code.
The class provides conversion between a list of lexemes and a string. It adds spaces in the right places 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, the chunk also records a hotspot, which 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.
|
inline |
Definition at line 16 of file codechunk.h.
Appends lexeme to the current string contents, inserting a space if appropriate.
Definition at line 80 of file codechunk.cpp.
|
inline |
Definition at line 19 of file codechunk.h.
|
inline |
Definition at line 26 of file codechunk.h.
|
inlinenodiscard |
Definition at line 25 of file codechunk.h.
|
inlinenodiscard |
Definition at line 28 of file codechunk.h.
|
inlinenodiscard |
Definition at line 32 of file codechunk.h.
|
inlinenodiscard |
Definition at line 27 of file codechunk.h.