OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
ot::SyntaxHighlighterRule Class Reference

#include "SyntaxHighlighterRule.h"

Inheritance diagram for ot::SyntaxHighlighterRule:
ot::Serializable

Public Member Functions

 SyntaxHighlighterRule ()
 
 SyntaxHighlighterRule (const std::string &_regularExpression, Painter2D *_painter)
 Constructor. The SyntaxHighlighterRule takes ownership of the painter.
 
 SyntaxHighlighterRule (const SyntaxHighlighterRule &_other)
 
virtual ~SyntaxHighlighterRule ()
 
SyntaxHighlighterRuleoperator= (const SyntaxHighlighterRule &_other)
 
virtual void addToJsonObject (ot::JsonValue &_object, ot::JsonAllocator &_allocator) const override
 Add the object contents to the provided JSON object.
 
virtual void setFromJsonObject (const ot::ConstJsonObject &_object) override
 Set the object contents from the provided JSON object.
 
void setPainter (Painter2D *_painter)
 Set the painter. The SyntaxHighlighterRule takes ownership of the painter. An existing painter will be destroyed before replacing.
 
Painter2DgetPainter (void)
 Returns the current painter. The SyntaxHighlighterRule keeps ownership of the painter.
 
const Painter2DgetPainter (void) const
 Returns the current painter. The SyntaxHighlighterRule keeps ownership of the painter.
 
void setRegularExpression (const std::string &_regularExpression)
 
const std::string & getRegularExpression (void) const
 
void setFont (const Font &_f)
 
const FontgetFont (void) const
 
- Public Member Functions inherited from ot::Serializable
 Serializable ()
 
virtual ~Serializable ()
 

Constructor & Destructor Documentation

◆ SyntaxHighlighterRule() [1/3]

ot::SyntaxHighlighterRule::SyntaxHighlighterRule ( )

◆ SyntaxHighlighterRule() [2/3]

ot::SyntaxHighlighterRule::SyntaxHighlighterRule ( const std::string & _regularExpression,
Painter2D * _painter )

Constructor. The SyntaxHighlighterRule takes ownership of the painter.

◆ SyntaxHighlighterRule() [3/3]

ot::SyntaxHighlighterRule::SyntaxHighlighterRule ( const SyntaxHighlighterRule & _other)

◆ ~SyntaxHighlighterRule()

ot::SyntaxHighlighterRule::~SyntaxHighlighterRule ( )
virtual

Member Function Documentation

◆ addToJsonObject()

void ot::SyntaxHighlighterRule::addToJsonObject ( ot::JsonValue & _object,
ot::JsonAllocator & _allocator ) const
overridevirtual

Add the object contents to the provided JSON object.

Parameters
_objectJson object reference to write the data to.
_allocatorAllocator.

Implements ot::Serializable.

◆ getFont()

const Font & ot::SyntaxHighlighterRule::getFont ( void ) const
inline

◆ getPainter() [1/2]

Painter2D * ot::SyntaxHighlighterRule::getPainter ( void )
inline

Returns the current painter. The SyntaxHighlighterRule keeps ownership of the painter.

◆ getPainter() [2/2]

const Painter2D * ot::SyntaxHighlighterRule::getPainter ( void ) const
inline

Returns the current painter. The SyntaxHighlighterRule keeps ownership of the painter.

◆ getRegularExpression()

const std::string & ot::SyntaxHighlighterRule::getRegularExpression ( void ) const
inline

◆ operator=()

ot::SyntaxHighlighterRule & ot::SyntaxHighlighterRule::operator= ( const SyntaxHighlighterRule & _other)

◆ setFont()

void ot::SyntaxHighlighterRule::setFont ( const Font & _f)
inline

◆ setFromJsonObject()

void ot::SyntaxHighlighterRule::setFromJsonObject ( const ot::ConstJsonObject & _object)
overridevirtual

Set the object contents from the provided JSON object.

Parameters
_objectThe JSON object containing the information.
Exceptions
Maythrow an exception if the provided object is not valid (members missing or invalid types).

Implements ot::Serializable.

◆ setPainter()

void ot::SyntaxHighlighterRule::setPainter ( Painter2D * _painter)

Set the painter. The SyntaxHighlighterRule takes ownership of the painter. An existing painter will be destroyed before replacing.

◆ setRegularExpression()

void ot::SyntaxHighlighterRule::setRegularExpression ( const std::string & _regularExpression)
inline

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