Click here to Skip to main content
Click here to Skip to main content
Articles » Database » Database » General » Downloads
 
Add your own
alternative version
Go to top

C++ Object Oriented Database Generator

, 17 Nov 1999
This project is a code generator to produce CObject-dervied data classes for Object-Oriented database management
///////////////////////////////////////////////////////////////////////////
// CTest -- Interface for CTest object



#ifndef __TEST_H__
#define __TEST_H__


class CTest;


class CTestList : public CObList
{
public:
	CTest* FindEntry(COleDateTime dtDate, int nOrder, CString strLocationID);
	POSITION FindEntryPos(COleDateTime dtDate, int nOrder, CString strLocationID);
	POSITION FindEntryPosBruteForce(COleDateTime dtDate, int nOrder, CString strLocationID);
	void AddTest(CTest* pNew)
	void RemoveTest(COleDateTime dtDate, int nOrder, CString strLocationID)
	virtual void Serialize(CArchive& ar);
	void ClearAndDelete();
};



class CTest : public CObject
{
// construction
public:
	DECLARE_SERIAL(CTest);
	CTest();
	CTest(COleDateTime dtDate, int nOrder, CString strLocationID);
	~CTest();

// Attributes
public:



protected:
	COleDateTime m_dtDate;
	int m_nOrder;
	CString m_strLocationID;
	CString m_strCustomerName;
	COleDateTime m_dtBirthDate;
	COLORREF m_rgbColor;
	COleDateTime m_dtCreated;
	COleDateTime m_dtLastModified;


// Operations
public:
	virtual void Serialize(CArchive& ar);
	void Duplicate(CTest* pSource);
	void Clear();
	int Compare(COleDateTime dtDate, int nOrder, CString strLocationID);
	int Compare(CTest* pTest);


// Diagnostics
	void AssertValid() const;
#ifdef _DEBUG
	virtual void Dump(CDumpContext& dc) const;
#endif


// inlines
public:
	inline void SetDate(COleDateTime dtNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_dtDate = dtNew; }
	inline COleDateTime GetDate() {;
		return m_dtDate; }

	inline void SetOrder(int nNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_nOrder = nNew; }
	inline int GetOrder() {;
		return m_nOrder; }

	inline void SetLocationID(CString strNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_strLocationID = strNew;
		m_strLocationID.FreeExtra(); }
	inline CString GetLocationID() {;
		return m_strLocationID; }

	inline void SetCustomerName(CString strNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_strCustomerName = strNew;
		m_strCustomerName.FreeExtra(); }
	inline CString GetCustomerName() {;
		return m_strCustomerName; }

	inline void SetBirthDate(COleDateTime dtNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_dtBirthDate = dtNew; }
	inline COleDateTime GetBirthDate() {;
		return m_dtBirthDate; }

	inline void SetColor(COLORREF rgbNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_rgbColor = rgbNew; }
	inline COLORREF GetColor() {;
		return m_rgbColor; }

	inline void SetCreated(COleDateTime dtNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_dtCreated = dtNew; }
	inline COleDateTime GetCreated() {;
		return m_dtCreated; }

	inline void SetLastModified(COleDateTime dtNew) {
		m_dtLastModified = COleDateTime::GetCurrentTime();
		m_dtLastModified = dtNew; }
	inline COleDateTime GetLastModified() {;
		return m_dtLastModified; }



};


#endif // #define __TEST_H__

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

Robert Pittenger, MCPD-EAD
President Starpoint Software Inc.
United States United States
Bob Pittenger is founder and President of Starpoint Software Inc. He holds a B.A. degree from Miami University, M.S. and Ph.D. degrees from Purdue University, and an MBA from Xavier University. He has been programming since 1993, starting with Windows application development in C++/MFC and moving to C# and .NET around 2005 and is a .NET Microsoft Certified Professional Developer.
 
Bob is the author of two books:
Billionaire: How the Ultra-Rich Built Their Fortunes Through Good and Evil and What You Can Learn from Them
and
Wealthonomics: The Most Important Economic and Financial Concepts that Can Make You Rich Fast.
Visit http://www.billionairebook.net for more information.

| Advertise | Privacy | Mobile
Web02 | 2.8.140922.1 | Last Updated 18 Nov 1999
Article Copyright 1999 by Robert Pittenger, MCPD-EAD
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid