Guitar
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Document::Line Struct Reference

#include <AbstractCharacterBasedApplication.h>

Public Member Functions

 Line ()=default
 
 Line (std::vector< char > const &ba, LineType type=Normal)
 
 Line (QByteArray const &ba, LineType type=Normal)
 
bool endsWithNewLine () const
 
std::string_view text () const
 
void set_text (const std::vector< char > &new_text)
 
std::vector< char > * to_vector ()
 
void append_text (std::string_view new_text)
 
void append_text (const std::vector< char > &new_text)
 
void append_text (char c)
 

Static Public Member Functions

static Line View (std::string_view v, LineType type=Normal)
 

Public Attributes

LineType type = Unknown
 
int line_number = 0
 
size_t byte_offset = 0
 
varline_t text_ = std::string_view()
 
std::optional< std::vector< CharAttr > > attr_
 

Constructor & Destructor Documentation

◆ Line() [1/3]

Document::Line::Line ( )
default

◆ Line() [2/3]

Document::Line::Line ( std::vector< char > const &  ba,
LineType  type = Normal 
)
inlineexplicit

◆ Line() [3/3]

Document::Line::Line ( QByteArray const &  ba,
LineType  type = Normal 
)
inlineexplicit

Member Function Documentation

◆ append_text() [1/3]

void Document::Line::append_text ( char  c)
inline
Here is the call graph for this function:

◆ append_text() [2/3]

void Document::Line::append_text ( const std::vector< char > &  new_text)
inline
Here is the call graph for this function:

◆ append_text() [3/3]

void Document::Line::append_text ( std::string_view  new_text)
inline
Here is the call graph for this function:

◆ endsWithNewLine()

bool Document::Line::endsWithNewLine ( ) const
inline
Here is the call graph for this function:

◆ set_text()

void Document::Line::set_text ( const std::vector< char > &  new_text)
inline

◆ text()

std::string_view Document::Line::text ( ) const
inline

◆ to_vector()

std::vector<char>* Document::Line::to_vector ( )
inline

◆ View()

static Line Document::Line::View ( std::string_view  v,
LineType  type = Normal 
)
inlinestatic

Member Data Documentation

◆ attr_

std::optional<std::vector<CharAttr> > Document::Line::attr_

◆ byte_offset

size_t Document::Line::byte_offset = 0

◆ line_number

int Document::Line::line_number = 0

◆ text_

varline_t Document::Line::text_ = std::string_view()

◆ type

LineType Document::Line::type = Unknown

The documentation for this struct was generated from the following file: