Click here to Skip to main content
12,630,420 members (29,764 online)
Click here to Skip to main content

Stats

305.6K views
4.7K downloads
103 bookmarked
Posted

Fast regular expressions

, 29 Oct 2000
Compiles a regular expression into a fast automaton.
// RexSearchDoc.cpp : Implementierung der Klasse CRexSearchDoc
//

//#pragma warning(
#include "stdafx.h"
#include <vector>
using namespace std;
#include "RexSearch.h"

#include "RexSearchDoc.h"
#include "MainFrm.h"
    
#include "FileFind.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CRexSearchDoc

IMPLEMENT_DYNCREATE(CRexSearchDoc, CDocument)

BEGIN_MESSAGE_MAP(CRexSearchDoc, CDocument)
	//{{AFX_MSG_MAP(CRexSearchDoc)
		// HINWEIS - Hier werden Mapping-Makros vom Klassen-Assistenten eingef�gt und entfernt.
		//    Innerhalb dieser generierten Quelltextabschnitte NICHTS VER�NDERN!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CRexSearchDoc Konstruktion/Destruktion

CRexSearchDoc::CRexSearchDoc()
:m_bRegistered(false)
{
	// ZU ERLEDIGEN: Hier Code f�r One-Time-Konstruktion einf�gen

}

CRexSearchDoc::~CRexSearchDoc()
{
}

BOOL CRexSearchDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;
                        
	return TRUE;
}
void CRexSearchDoc::OnIdle()
{
    if(!m_bRegistered){
        m_bRegistered= 
            CMainFrame::RegisterFileProcessor(&m_rexFileProcessor);
    }
}


/////////////////////////////////////////////////////////////////////////////
// CRexSearchDoc Serialisierung

void CRexSearchDoc::Serialize(CArchive& ar)
{
   ((CMainFrame*)AfxGetMainWnd())->Serialize(ar);
}

/////////////////////////////////////////////////////////////////////////////
// CRexSearchDoc Diagnose

#ifdef _DEBUG
void CRexSearchDoc::AssertValid() const
{
	CDocument::AssertValid();
}

void CRexSearchDoc::Dump(CDumpContext& dc) const
{
	CDocument::Dump(dc);
}
#endif //_DEBUG

/////////////////////////////////////////////////////////////////////////////
// CRexSearchDoc Befehle

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

Martin Holzherr
Switzerland Switzerland
No Biography provided

You may also be interested in...

Pro
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.161205.3 | Last Updated 30 Oct 2000
Article Copyright 2000 by Martin Holzherr
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid