Envision
A visual programming IDE for object-oriented languages
|
Public Member Functions | |
FileWriter (const QString &fileName, TextToNodeMap *map) | |
void | appendBackslashToLinesAfter (int bytes) |
adds backslashes to all lines of the part of the buffer after bytes bytes. More... | |
void | appendNodeToStack (Model::Node *node) |
int | bytesWrittenSoFar () |
returns the amount of bytes written to the buffer of this writer so far. More... | |
QString | fileContents () |
Flushes any remaining writes, appends an empty line to the end of the file, and returns the entire file text. More... | |
void | finishLine () |
bool | isAtStartOfLine () const |
bool | lastCharacterIsWhiteSpace () const |
void | popLastNodeFromStack () |
void | write (const QString &str) |
void | writeEmptyLine () |
Private Member Functions | |
void | flushPending () |
void | mapUntil (int endLine, int endColumn) |
Private Attributes | |
int | currentColumn_ {} |
int | currentLine_ {} |
QString | fileName_ |
TextToNodeMap * | map_ {} |
QList< Model::Node * > | nodeStack_ |
Model::Node * | pendingNodeToMap_ {} |
Span | pendingSpanToMap_ {0, 0, 0, 0} |
QString | renderedFile_ |
Export::FileWriter::FileWriter | ( | const QString & | fileName, |
TextToNodeMap * | map | ||
) |
void Export::FileWriter::appendBackslashToLinesAfter | ( | int | bytes | ) |
adds backslashes to all lines of the part of the buffer after bytes bytes.
|
inline |
int Export::FileWriter::bytesWrittenSoFar | ( | ) |
returns the amount of bytes written to the buffer of this writer so far.
used to add backslashes to all lines of the buffer after this value when exporting C++ macros.
QString Export::FileWriter::fileContents | ( | ) |
Flushes any remaining writes, appends an empty line to the end of the file, and returns the entire file text.
void Export::FileWriter::finishLine | ( | ) |
|
private |
|
inline |
|
inline |
|
private |
|
inline |
void Export::FileWriter::write | ( | const QString & | str | ) |
void Export::FileWriter::writeEmptyLine | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |