MD::WithPosition Class

class MD::WithPosition

Base for any thing with start and end position. More...

Header: #include <md4qt/doc.h>
CMake: find_package(md4qt REQUIRED COMPONENTS md4qt)
target_link_libraries(mytarget PRIVATE md4qt::md4qt)
Inherited By:

MD::Item and MD::StyleDelim

Public Functions

void applyPositions(const MD::WithPosition &other)
long long endColumn() const
long long endLine() const
void setEndColumn(long long c)
void setEndLine(long long l)
void setStartColumn(long long c)
void setStartLine(long long l)
long long startColumn() const
long long startLine() const
bool operator==(const MD::WithPosition &l, const MD::WithPosition &r)

Detailed Description

Such information may be needed for syntax highlighters, for example.

Note: Start position of the document has coordinates (0, 0).

Member Function Documentation

void WithPosition::applyPositions(const MD::WithPosition &other)

Apply positions to this from other.

other Positions to apply.

long long WithPosition::endColumn() const

Returns end column.

See also setEndColumn().

long long WithPosition::endLine() const

Returns end line.

See also setEndLine().

void WithPosition::setEndColumn(long long c)

Set end column.

c New value.

See also endColumn().

void WithPosition::setEndLine(long long l)

Set end line.

l New value.

See also endLine().

void WithPosition::setStartColumn(long long c)

Set start column.

c New value.

See also startColumn().

void WithPosition::setStartLine(long long l)

Set start line.

l New value.

See also startLine().

long long WithPosition::startColumn() const

Returns start column.

See also setStartColumn().

long long WithPosition::startLine() const

Returns start line.

See also setStartLine().

Related Non-Members

bool operator==(const MD::WithPosition &l, const MD::WithPosition &r)

Returns whether both are equal.

l Left operand.

r Right operand.