Click here to Skip to main content
15,896,912 members
Articles / Database Development / SQL Server

A scripted SQL query generation framework with IDE: SQLpp (v1.4)

Rate me:
Please Sign up or sign in to vote.
4.98/5 (47 votes)
12 Sep 200311 min read 416.2K   5.4K   133  
A helper framework for generation of SQL queries in C++ and Lua
// ProjectFile.h: interface for the CProjectFile class.
//
//////////////////////////////////////////////////////////////////////

#if !defined(AFX_PROJECTFILE_H__737B3FC6_28E7_47DD_B9F6_D41D550C8E23__INCLUDED_)
#define AFX_PROJECTFILE_H__737B3FC6_28E7_47DD_B9F6_D41D550C8E23__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

class CLuaEditor;

class CProjectFile
{
public:
	void UpdateRelPathName();
	void DeleteIntermediateFiles();
	BOOL Compile();
	BOOL IsModified();
	BOOL Save(CArchive& ar);
	BOOL Load(CArchive& ar);
	void RemoveBreakPoint(int nLine);
	BOOL HasFile(CString strPathName);
	void SetBreakPointsIn(CLuaEditor* pEditor);
	BOOL HasBreakPoint(int nLine);
	CProjectFile();
	virtual ~CProjectFile();

	void AddDebugLine(int nLine);
	void RemoveAllDebugLines();
	void AddBreakPoint(int nLine);
	void RemoveAllBreakPoints();

	BOOL PositionBreakPoints();
	int GetNearestDebugLine(int nLine);
	int GetPreviousDebugLine(int nLine);
	int GetNextDebugLine(int nLine);

	void SetPathName(CString strPathName) { m_strPathName=strPathName; UpdateRelPathName(); };
	CString GetPathName() { return m_strPathName; };
	CString GetName();
	CString GetNameExt();
	CString GetOutputNameExt() { return GetName()+".out"; }
	CString GetOutputPathNameExt();

protected:
	CString m_strPathName, m_strRelPathName;
	CMap<int, int, BOOL, BOOL> m_breakPoints;
	int m_nMinBreakPoint, m_nMaxBreakPoint;
	CMap<int, int, BOOL, BOOL> m_debugLines;
	int m_nMinDebugLine, m_nMaxDebugLine;
	SYSTEMTIME	m_timeCompiled;
};

#endif // !defined(AFX_PROJECTFILE_H__737B3FC6_28E7_47DD_B9F6_D41D550C8E23__INCLUDED_)

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


Written By
Engineer
United States United States
Jonathan de Halleux is Civil Engineer in Applied Mathematics. He finished his PhD in 2004 in the rainy country of Belgium. After 2 years in the Common Language Runtime (i.e. .net), he is now working at Microsoft Research on Pex (http://research.microsoft.com/pex).

Comments and Discussions