home *** CD-ROM | disk | FTP | other *** search
- // -------------------------------------------------------------------------
- // Copyright @ 1997 TCK Software, Incorporated
- // All Rights Reserved
- // -------------------------------------------------------------------------
-
- #include "stdafx.h"
- #include <io.h>
- #include <errno.h>
-
- #include "Person2.h"
-
- // IMPLEMENT_DYNAMIC( CPerson2, CObject )
- // IMPLEMENT_DYNAMIC( CPerson2DB, CObject )
-
-
- // -------------------------------------------------------------------------
- // -------------------------------------------------------------------------
- // CPerson2 Class
- // -------------------------------------------------------------------------
- // -------------------------------------------------------------------------
-
- // -------------------------------------------------------------------------
- // CPerson2 Constructor
- // -------------------------------------------------------------------------
- CPerson2::CPerson2()
- {
- Clear();
- m_deleted = 'N';
- }
-
- // -------------------------------------------------------------------------
- // CPerson2 Destructor
- // -------------------------------------------------------------------------
- CPerson2::~CPerson2()
- {
- }
-
-
- // -------------------------------------------------------------------------
- // CPerson2 copy constructor
- // -------------------------------------------------------------------------
- CPerson2::CPerson2(CPerson2& x)
- {
- *this = x;
- }
-
- // -------------------------------------------------------------------------
- // CPerson2 overloaded assigment
- // -------------------------------------------------------------------------
- CPerson2& CPerson2::operator=(CPerson2& x)
- {
- int i;
-
- Clear();
-
- _tcscpy(m_name, x.m_name);
- _tcscpy(m_note, x.m_note);
- for(i=0; i < PERS2_MAX_PHONES; i++)
- {
- _tcscpy(m_phones[i].m_phoneDesc, x.m_phones[i].m_phoneDesc);
- _tcscpy(m_phones[i].m_phone, x.m_phones[i].m_phone);
- }
-
- m_deleted = x.m_deleted;
-
- return *this;
- }
-
- // -------------------------------------------------------------------------
- // Wipe everything out except carrage return, line feed
- // -------------------------------------------------------------------------
- void CPerson2::Clear()
- {
- memset(this, 0, sizeof(*this));
- m_carriage_return = '\r';
- m_newline = '\n';
- }
-
-
-