Click here to Skip to main content
15,897,371 members
Articles / Desktop Programming / MFC

CPerlWrap - A class wrapper for embedding Perl into your MFC program

Rate me:
Please Sign up or sign in to vote.
4.85/5 (23 votes)
23 Feb 2012CPOL10 min read 217K   2.2K   90  
Simple class to allow fast, easy access to Perl and Perl variables.
// CPerlWrapperDoc.cpp : implementation of the CCPerlWrapperDoc class
//

#include "stdafx.h"
#include "CPerlWrapper.h"

#include "CPerlWrapperDoc.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
//lint -esym(528,THIS_FILE)		not referenced
//lint -esym(843,THIS_FILE)		could be declared as const
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCPerlWrapperDoc

IMPLEMENT_DYNCREATE(CCPerlWrapperDoc, CDocument)

BEGIN_MESSAGE_MAP(CCPerlWrapperDoc, CDocument)
	//{{AFX_MSG_MAP(CCPerlWrapperDoc)
		// NOTE - the ClassWizard will add and remove mapping macros here.
		//    DO NOT EDIT what you see in these blocks of generated code!
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCPerlWrapperDoc construction/destruction

CCPerlWrapperDoc::CCPerlWrapperDoc()
{
	// TODO: add one-time construction code here

}

CCPerlWrapperDoc::~CCPerlWrapperDoc()
{
}

BOOL CCPerlWrapperDoc::OnNewDocument()
{
	if (!CDocument::OnNewDocument())
		return FALSE;

	// TODO: add reinitialization code here
	// (SDI documents will reuse this document)

	return TRUE;
}



/////////////////////////////////////////////////////////////////////////////
// CCPerlWrapperDoc serialization

void CCPerlWrapperDoc::Serialize(CArchive& ar)
{
	if (ar.IsStoring())
	{
		// TODO: add storing code here
	}
	else
	{
		// TODO: add loading code here
	}
}

/////////////////////////////////////////////////////////////////////////////
// CCPerlWrapperDoc diagnostics

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

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

/////////////////////////////////////////////////////////////////////////////
// CCPerlWrapperDoc commands

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, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) Thales Visionix
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions