-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMyWxFortranIndent.h
52 lines (40 loc) · 1.4 KB
/
CMyWxFortranIndent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
///////////////////////////////////////////////////////////////////////////////
// Name: CMyWxFortranIndent.h
// Purpose: declaration of CMyWxFortranIndent class
// Author: YWX ([email protected])
// Created: 2012-4-23
// Copyright: (c) YWX <[email protected]>
// Licence: GNU General Public License, version 3
///////////////////////////////////////////////////////////////////////////////
#ifndef _MY_WX_CMyWxFortranIndent_H_
#define _MY_WX_CMyWxFortranIndent_H_
#include <wx/string.h>
#include <wx/regex.h>
#include <wx/hashmap.h>
/// declaration
WX_DECLARE_STRING_HASH_MAP( wxRegEx *, MyFortranRegEx );
class CMyWxFortranIndent
{
public:
/** Constructor. */
CMyWxFortranIndent( )
{
myCreateFortranRegEx();
}
/** Destructor. */
~CMyWxFortranIndent( )
{
myDelFortranRegEx();
}
void myCreateFortranRegEx();
void myDelFortranRegEx();
bool BuffersDiffer( const wxString &a, const wxString &b, const wxString &eolChars,const bool isDelBlank=true );
bool getIsHasLineContinuation( const wxString & srcLine );
bool getIsHasPreprocessor( const wxString & srcLine, int iPreprocessorType );
void delLineContinuation( wxString & srcLine );
void delComment( wxString & srcLine );
void getFortranIndentLine( const wxString & src, int & indentNum, bool & isCur, bool & isCaseBegin );
protected:
MyFortranRegEx myFortranRegEx;
};
#endif // _MY_WX_CMyWxFortranIndent_H_