How to write regular expression in UE to implement this requirement?
-
Now I have a large C++ project which is made up of about 1400k lines of code. Now I have a requirement: Add one line of code to each class which is derived from
CDialog, CWnd or CListCtrl
. It's impossible for me to do this manually. I think maybe UltraEdit regular expression can give me a hand, but I can't write related regular expression by myself. Anybody can help me? Here is the line of code to add:
virtual ULONG GetGestureStatus(CPoint ptTouch) { return 0;}
and here is my code structure(just for a illustration):
class CRibbonAddPlaceDialog : public CDialog
{
DECLARE_DYNAMIC(CRibbonAddPlaceDialog)public:
CRibbonAddPlaceDialog();
virtual ~CRibbonAddPlaceDialog();
enum { IDD = IDD_RIBBON_ADDPLACE };protected:
virtual ULONG GetGestureStatus(CPoint ptTouch) { return 0;}//the line to add
virtual void DoDataExchange(CDataExchange* pDX);
DECLARE_MESSAGE_MAP()
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
afx_msg void OnDestroy();
virtual BOOL OnInitDialog();
virtual BOOL OnCmdMsg(UINT nID, int nCode, void* pExtra, AFX_CMDHANDLERINFO* pHandlerInfo);
public:
BOOL AddButton(CFX_WideString csTitle, AddPlaceButtonProc proc, void* pClientData, CFX_DIBitmap* pButtonImage);
public:CReader\_RibbonFilePageManager\* m\_pRibbonFilePageMgr; CReader\_RibbonStyle\_Static\* m\_pAddPlace; CReader\_RibbonStyle\_Static\* m\_pAddPlaceTip; CTypedPtrArray m\_arButtonData; CTypedPtrArraym\_arButton;
};