OpenVPN 3 Core Library
Loading...
Searching...
No Matches
openvpn::LexQuoteMixin Class Reference

Helper class to handle quote processing. More...

#include <lex.hpp>

Inheritance diagram for openvpn::LexQuoteMixin:
[legend]

Public Member Functions

bool in_quote () const
 Check if currently inside a quote.
 

Protected Member Functions

bool handle_quote (char c)
 Handle a character as a potential quote.
 

Private Attributes

bool in_squote = false
 
bool in_dquote = false
 

Detailed Description

Helper class to handle quote processing.

This class provides functionality to handle single and double quotes within a text. It allows treating single quotes as regular characters when inside double quotes, and vice versa.

Definition at line 38 of file lex.hpp.

Member Function Documentation

◆ handle_quote()

bool openvpn::LexQuoteMixin::handle_quote ( char  c)
inlineprotected

Handle a character as a potential quote.

Toggles quote state if c is a single or double quote, considering the current context.

Parameters
cCharacter to process
Returns
true if c is treated as a quote, false otherwise

Definition at line 60 of file lex.hpp.

Here is the caller graph for this function:

◆ in_quote()

bool openvpn::LexQuoteMixin::in_quote ( ) const
inline

Check if currently inside a quote.

Returns
true if inside single or double quote, false otherwise

Definition at line 45 of file lex.hpp.

Here is the caller graph for this function:

Member Data Documentation

◆ in_dquote

bool openvpn::LexQuoteMixin::in_dquote = false
private

State for double quotes

Definition at line 79 of file lex.hpp.

◆ in_squote

bool openvpn::LexQuoteMixin::in_squote = false
private

State for single quotes

Definition at line 78 of file lex.hpp.


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