Code::Blocks  SVN r11506
Classes | Functions | Variables
parsewatchvalue.cpp File Reference
#include <sdk.h>
#include "parsewatchvalue.h"
Include dependency graph for parsewatchvalue.cpp:

Go to the source code of this file.

Classes

struct  Token
 a symbol found in the parsed files, it can be many kinds, such as a variable, a class and so on. More...
 

Functions

int SkipShortenedString (wxString const &str, int pos)
 GDB can shorten the string. More...
 
int DetectRepeatingSymbols (wxString const &str, int pos)
 
bool GetNextToken (wxString const &str, int pos, Token &token)
 
cb::shared_ptr< GDBWatchAddChild (cb::shared_ptr< GDBWatch > parent, wxString const &full_value, Token &name)
 
cb::shared_ptr< GDBWatchAddChild (cb::shared_ptr< GDBWatch > parent, wxString const &str_name)
 
bool ParseGDBWatchValue (cb::shared_ptr< GDBWatch > watch, wxString const &value, int &start, int length)
 
wxString RemoveWarnings (wxString const &input)
 
void RemoveBefore (wxString &str, const wxString &s)
 
void PrepareFortranOutput (wxString &outStr)
 
bool ParseGDBWatchValue (cb::shared_ptr< GDBWatch > watch, wxString const &inputValue)
 
bool ParseCDBWatchValue (cb::shared_ptr< GDBWatch > watch, wxString const &value)
 
void TokenizeGDBLocals (std::vector< GDBLocalVariable > &results, wxString const &value)
 

Variables

wxRegEx regexRepeatedChars (wxT("^((\'.{1,6}\')|('.{1,6}'))[ \](<repeats[ \][0-9]+[ \]times>)"), wxRE_ADVANCED)
 
wxRegEx regexRepeatedChar (wxT(".+[ \](<repeats[ \][0-9]+[ \]times>)$"))
 
wxRegEx regexFortranArray (wxT("^\[0-9,]+)$"))
 

Function Documentation

◆ AddChild() [1/2]

cb::shared_ptr<GDBWatch> AddChild ( cb::shared_ptr< GDBWatch parent,
wxString const &  full_value,
Token name 
)
inline

Definition at line 304 of file parsewatchvalue.cpp.

References cbWatch::AddChild(), and Token::ExtractString().

Referenced by GdbCmd_LocalsFuncArgs::ParseOutput().

◆ AddChild() [2/2]

cb::shared_ptr<GDBWatch> AddChild ( cb::shared_ptr< GDBWatch parent,
wxString const &  str_name 
)
inline

Definition at line 320 of file parsewatchvalue.cpp.

References cbWatch::AddChild(), regexFortranArray, regexRepeatedChar, and wxT.

◆ DetectRepeatingSymbols()

int DetectRepeatingSymbols ( wxString const &  str,
int  pos 
)
inline

◆ GetNextToken()

bool GetNextToken ( wxString const &  str,
int  pos,
Token token 
)
inline

◆ ParseCDBWatchValue()

bool ParseCDBWatchValue ( cb::shared_ptr< GDBWatch watch,
wxString const &  value 
)

◆ ParseGDBWatchValue() [1/2]

bool ParseGDBWatchValue ( cb::shared_ptr< GDBWatch watch,
wxString const &  value,
int &  start,
int  length 
)
inline

◆ ParseGDBWatchValue() [2/2]

bool ParseGDBWatchValue ( cb::shared_ptr< GDBWatch watch,
wxString const &  inputValue 
)

◆ PrepareFortranOutput()

void PrepareFortranOutput ( wxString outStr)

Definition at line 762 of file parsewatchvalue.cpp.

References wxRegEx::Replace(), wxString::Replace(), and wxT.

Referenced by ParseGDBWatchValue().

◆ RemoveBefore()

void RemoveBefore ( wxString str,
const wxString s 
)
inline

◆ RemoveWarnings()

wxString RemoveWarnings ( wxString const &  input)
inline

◆ SkipShortenedString()

int SkipShortenedString ( wxString const &  str,
int  pos 
)
inline

GDB can shorten the string.

Such strings are printed as '"value"...'. This function moves position, so that the dot characters become part of the token.

Returns
The new position if there are dots or the old position.

Definition at line 80 of file parsewatchvalue.cpp.

References wxString::length(), and wxT.

Referenced by GetNextToken().

◆ TokenizeGDBLocals()

void TokenizeGDBLocals ( std::vector< GDBLocalVariable > &  results,
wxString const &  value 
)

Definition at line 981 of file parsewatchvalue.cpp.

References wxString::length(), Token::start, and wxT.

Referenced by GdbCmd_LocalsFuncArgs::ParseOutput(), and SUITE().

Variable Documentation

◆ regexFortranArray

wxRegEx regexFortranArray(wxT("^\([0-9,]+)$"))

Referenced by AddChild().

◆ regexRepeatedChar

wxRegEx regexRepeatedChar(wxT(".+[ \t](<repeats[ \t][0-9]+[ \t]times>)$"))

Referenced by AddChild().

◆ regexRepeatedChars

wxRegEx regexRepeatedChars(wxT("^((\\'.{1,6}\\')|('.{1,6}'))[ \t](<repeats[ \t][0-9]+[ \t]times>)"), wxRE_ADVANCED)

Referenced by DetectRepeatingSymbols().