home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / MFCINC.PAK / AFX.INL < prev    next >
Encoding:
Text File  |  1997-05-06  |  17.1 KB  |  396 lines

  1. // This is a part of the Microsoft Foundation Classes C++ library.
  2. // Copyright (C) 1992-1995 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. // This source code is only intended as a supplement to the
  6. // Microsoft Foundation Classes Reference and related
  7. // electronic documentation provided with the library.
  8. // See these sources for detailed information regarding the
  9. // Microsoft Foundation Classes product.
  10.  
  11. // Inlines for AFX.H
  12.  
  13. #ifdef _AFX_INLINE
  14.  
  15. // CObject
  16. _AFX_INLINE CObject::CObject()
  17.     { }
  18. _AFX_INLINE CObject::~CObject()
  19.     { }
  20. _AFX_INLINE void CObject::Serialize(CArchive&)
  21.     { /* CObject does not serialize anything by default */ }
  22. _AFX_INLINE void* PASCAL CObject::operator new(size_t, void* p)
  23.     { return p; }
  24. #ifndef _DEBUG
  25. // _DEBUG versions in memory.cpp
  26. _AFX_INLINE void PASCAL CObject::operator delete(void* p)
  27.     { ::operator delete(p); }
  28. _AFX_INLINE void* PASCAL CObject::operator new(size_t nSize)
  29.     { return ::operator new(nSize); }
  30. // _DEBUG versions in objcore.cpp
  31. _AFX_INLINE void CObject::AssertValid() const
  32.     { /* no asserts in release builds */ }
  33. _AFX_INLINE void CObject::Dump(CDumpContext&) const
  34.     { /* no dumping in release builds */ }
  35. #endif
  36. _AFX_INLINE const CObject* AFX_CDECL AfxDynamicDownCast(CRuntimeClass* pClass, const CObject* pObject)
  37.     { return (CObject*)AfxDynamicDownCast(pClass, (const CObject*)pObject); }
  38. #ifdef _DEBUG
  39. _AFX_INLINE const CObject* AFX_CDECL AfxStaticDownCast(CRuntimeClass* pClass, const CObject* pObject)
  40.     { return (CObject*)AfxStaticDownCast(pClass, (const CObject*)pObject); }
  41. #endif
  42.  
  43. // exceptions
  44. _AFX_INLINE CException::~CException()
  45.     { }
  46. _AFX_INLINE CSimpleException::CSimpleException()
  47.     { m_bInitialized = FALSE; m_bLoaded = FALSE; }
  48. _AFX_INLINE CSimpleException::CSimpleException(BOOL bAutoDelete)
  49.     : CException(bAutoDelete) { m_bInitialized = FALSE; m_bLoaded = FALSE; }
  50. _AFX_INLINE CSimpleException::~CSimpleException()
  51.     { }
  52.  
  53. _AFX_INLINE CMemoryException::CMemoryException()
  54.     : CSimpleException() { }
  55. _AFX_INLINE CMemoryException::CMemoryException(BOOL bAutoDelete, UINT nResourceID)
  56.     : CSimpleException(bAutoDelete) { m_nResourceID = nResourceID; }
  57. _AFX_INLINE CMemoryException::~CMemoryException()
  58.     { }
  59. _AFX_INLINE CNotSupportedException::CNotSupportedException()
  60.     : CSimpleException() { }
  61. _AFX_INLINE CNotSupportedException::CNotSupportedException(BOOL bAutoDelete, UINT nResourceID)
  62.     : CSimpleException(bAutoDelete) { m_nResourceID = nResourceID; }
  63. _AFX_INLINE CNotSupportedException::~CNotSupportedException()
  64.     { }
  65. _AFX_INLINE CArchiveException::CArchiveException(int cause,
  66.     LPCTSTR lpszFileName /* = NULL */)
  67.     { m_cause = cause; m_strFileName = lpszFileName; }
  68. _AFX_INLINE CArchiveException::~CArchiveException()
  69.     { }
  70. _AFX_INLINE CFileException::CFileException(int cause, LONG lOsError,
  71.     LPCTSTR pstrFileName /* = NULL */)
  72.     { m_cause = cause; m_lOsError = lOsError; m_strFileName = pstrFileName; }
  73. _AFX_INLINE CFileException::~CFileException()
  74.     { }
  75.  
  76. // CFile
  77. _AFX_INLINE CFile::operator HFILE() const
  78.     { return m_hFile; }
  79. _AFX_INLINE DWORD CFile::ReadHuge(void* lpBuffer, DWORD dwCount)
  80.     { return (DWORD)Read(lpBuffer, (UINT)dwCount); }
  81. _AFX_INLINE void CFile::WriteHuge(const void* lpBuffer, DWORD dwCount)
  82.     { Write(lpBuffer, (UINT)dwCount); }
  83. _AFX_INLINE DWORD CFile::SeekToEnd()
  84.     { return Seek(0, CFile::end); }
  85. _AFX_INLINE void CFile::SeekToBegin()
  86.     { Seek(0, CFile::begin); }
  87. _AFX_INLINE void CFile::SetFilePath(LPCTSTR lpszNewName)
  88. {
  89.     ASSERT_VALID(this);
  90.     ASSERT(AfxIsValidString(lpszNewName, FALSE));
  91.     m_strFileName = lpszNewName;
  92. }
  93.  
  94. // CString
  95. _AFX_INLINE CStringData* CString::GetData() const
  96.     { ASSERT(m_pchData != NULL); return ((CStringData*)m_pchData)-1; }
  97. _AFX_INLINE void CString::Init()
  98.     { m_pchData = afxEmptyString.m_pchData; }
  99. _AFX_INLINE CString::CString(const unsigned char* lpsz)
  100.     { Init(); *this = (LPCSTR)lpsz; }
  101. _AFX_INLINE const CString& CString::operator=(const unsigned char* lpsz)
  102.     { *this = (LPCSTR)lpsz; return *this; }
  103. #ifdef _UNICODE
  104. _AFX_INLINE const CString& CString::operator+=(char ch)
  105.     { *this += (TCHAR)ch; return *this; }
  106. _AFX_INLINE const CString& CString::operator=(char ch)
  107.     { *this = (TCHAR)ch; return *this; }
  108. _AFX_INLINE CString AFXAPI operator+(const CString& string, char ch)
  109.     { return string + (TCHAR)ch; }
  110. _AFX_INLINE CString AFXAPI operator+(char ch, const CString& string)
  111.     { return (TCHAR)ch + string; }
  112. #endif
  113.  
  114. _AFX_INLINE int CString::GetLength() const
  115.     { return GetData()->nDataLength; }
  116. _AFX_INLINE int CString::GetAllocLength() const
  117.     { return GetData()->nAllocLength; }
  118. _AFX_INLINE BOOL CString::IsEmpty() const
  119.     { return GetData()->nDataLength == 0; }
  120. _AFX_INLINE CString::operator LPCTSTR() const
  121.     { return m_pchData; }
  122. _AFX_INLINE int PASCAL CString::SafeStrlen(LPCTSTR lpsz)
  123.     { return (lpsz == NULL) ? 0 : lstrlen(lpsz); }
  124.  
  125. // CString support (windows specific)
  126. _AFX_INLINE int CString::Compare(LPCTSTR lpsz) const
  127.     { return _tcscmp(m_pchData, lpsz); }    // MBCS/Unicode aware
  128. _AFX_INLINE int CString::CompareNoCase(LPCTSTR lpsz) const
  129.     { return _tcsicmp(m_pchData, lpsz); }   // MBCS/Unicode aware
  130. // CString::Collate is often slower than Compare but is MBSC/Unicode
  131. //  aware as well as locale-sensitive with respect to sort order.
  132. _AFX_INLINE int CString::Collate(LPCTSTR lpsz) const
  133.     { return _tcscoll(m_pchData, lpsz); }   // locale sensitive
  134.  
  135. _AFX_INLINE TCHAR CString::GetAt(int nIndex) const
  136. {
  137.     ASSERT(nIndex >= 0);
  138.     ASSERT(nIndex < GetData()->nDataLength);
  139.     return m_pchData[nIndex];
  140. }
  141. _AFX_INLINE TCHAR CString::operator[](int nIndex) const
  142. {
  143.     // same as GetAt
  144.     ASSERT(nIndex >= 0);
  145.     ASSERT(nIndex < GetData()->nDataLength);
  146.     return m_pchData[nIndex];
  147. }
  148. _AFX_INLINE BOOL AFXAPI operator==(const CString& s1, const CString& s2)
  149.     { return s1.Compare(s2) == 0; }
  150. _AFX_INLINE BOOL AFXAPI operator==(const CString& s1, LPCTSTR s2)
  151.     { return s1.Compare(s2) == 0; }
  152. _AFX_INLINE BOOL AFXAPI operator==(LPCTSTR s1, const CString& s2)
  153.     { return s2.Compare(s1) == 0; }
  154. _AFX_INLINE BOOL AFXAPI operator!=(const CString& s1, const CString& s2)
  155.     { return s1.Compare(s2) != 0; }
  156. _AFX_INLINE BOOL AFXAPI operator!=(const CString& s1, LPCTSTR s2)
  157.     { return s1.Compare(s2) != 0; }
  158. _AFX_INLINE BOOL AFXAPI operator!=(LPCTSTR s1, const CString& s2)
  159.     { return s2.Compare(s1) != 0; }
  160. _AFX_INLINE BOOL AFXAPI operator<(const CString& s1, const CString& s2)
  161.     { return s1.Compare(s2) < 0; }
  162. _AFX_INLINE BOOL AFXAPI operator<(const CString& s1, LPCTSTR s2)
  163.     { return s1.Compare(s2) < 0; }
  164. _AFX_INLINE BOOL AFXAPI operator<(LPCTSTR s1, const CString& s2)
  165.     { return s2.Compare(s1) > 0; }
  166. _AFX_INLINE BOOL AFXAPI operator>(const CString& s1, const CString& s2)
  167.     { return s1.Compare(s2) > 0; }
  168. _AFX_INLINE BOOL AFXAPI operator>(const CString& s1, LPCTSTR s2)
  169.     { return s1.Compare(s2) > 0; }
  170. _AFX_INLINE BOOL AFXAPI operator>(LPCTSTR s1, const CString& s2)
  171.     { return s2.Compare(s1) < 0; }
  172. _AFX_INLINE BOOL AFXAPI operator<=(const CString& s1, const CString& s2)
  173.     { return s1.Compare(s2) <= 0; }
  174. _AFX_INLINE BOOL AFXAPI operator<=(const CString& s1, LPCTSTR s2)
  175.     { return s1.Compare(s2) <= 0; }
  176. _AFX_INLINE BOOL AFXAPI operator<=(LPCTSTR s1, const CString& s2)
  177.     { return s2.Compare(s1) >= 0; }
  178. _AFX_INLINE BOOL AFXAPI operator>=(const CString& s1, const CString& s2)
  179.     { return s1.Compare(s2) >= 0; }
  180. _AFX_INLINE BOOL AFXAPI operator>=(const CString& s1, LPCTSTR s2)
  181.     { return s1.Compare(s2) >= 0; }
  182. _AFX_INLINE BOOL AFXAPI operator>=(LPCTSTR s1, const CString& s2)
  183.     { return s2.Compare(s1) <= 0; }
  184.  
  185. // CTime and CTimeSpan
  186. _AFX_INLINE CTimeSpan::CTimeSpan()
  187.     { }
  188. _AFX_INLINE CTimeSpan::CTimeSpan(time_t time)
  189.     { m_timeSpan = time; }
  190. _AFX_INLINE CTimeSpan::CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs)
  191.     { m_timeSpan = nSecs + 60* (nMins + 60* (nHours + 24* lDays)); }
  192. _AFX_INLINE CTimeSpan::CTimeSpan(const CTimeSpan& timeSpanSrc)
  193.     { m_timeSpan = timeSpanSrc.m_timeSpan; }
  194. _AFX_INLINE const CTimeSpan& CTimeSpan::operator=(const CTimeSpan& timeSpanSrc)
  195.     { m_timeSpan = timeSpanSrc.m_timeSpan; return *this; }
  196. _AFX_INLINE LONG CTimeSpan::GetDays() const
  197.     { return m_timeSpan / (24*3600L); }
  198. _AFX_INLINE LONG CTimeSpan::GetTotalHours() const
  199.     { return m_timeSpan/3600; }
  200. _AFX_INLINE int CTimeSpan::GetHours() const
  201.     { return (int)(GetTotalHours() - GetDays()*24); }
  202. _AFX_INLINE LONG CTimeSpan::GetTotalMinutes() const
  203.     { return m_timeSpan/60; }
  204. _AFX_INLINE int CTimeSpan::GetMinutes() const
  205.     { return (int)(GetTotalMinutes() - GetTotalHours()*60); }
  206. _AFX_INLINE LONG CTimeSpan::GetTotalSeconds() const
  207.     { return m_timeSpan; }
  208. _AFX_INLINE int CTimeSpan::GetSeconds() const
  209.     { return (int)(GetTotalSeconds() - GetTotalMinutes()*60); }
  210. _AFX_INLINE CTimeSpan CTimeSpan::operator-(CTimeSpan timeSpan) const
  211.     { return CTimeSpan(m_timeSpan - timeSpan.m_timeSpan); }
  212. _AFX_INLINE CTimeSpan CTimeSpan::operator+(CTimeSpan timeSpan) const
  213.     { return CTimeSpan(m_timeSpan + timeSpan.m_timeSpan); }
  214. _AFX_INLINE const CTimeSpan& CTimeSpan::operator+=(CTimeSpan timeSpan)
  215.     { m_timeSpan += timeSpan.m_timeSpan; return *this; }
  216. _AFX_INLINE const CTimeSpan& CTimeSpan::operator-=(CTimeSpan timeSpan)
  217.     { m_timeSpan -= timeSpan.m_timeSpan; return *this; }
  218. _AFX_INLINE BOOL CTimeSpan::operator==(CTimeSpan timeSpan) const
  219.     { return m_timeSpan == timeSpan.m_timeSpan; }
  220. _AFX_INLINE BOOL CTimeSpan::operator!=(CTimeSpan timeSpan) const
  221.     { return m_timeSpan != timeSpan.m_timeSpan; }
  222. _AFX_INLINE BOOL CTimeSpan::operator<(CTimeSpan timeSpan) const
  223.     { return m_timeSpan < timeSpan.m_timeSpan; }
  224. _AFX_INLINE BOOL CTimeSpan::operator>(CTimeSpan timeSpan) const
  225.     { return m_timeSpan > timeSpan.m_timeSpan; }
  226. _AFX_INLINE BOOL CTimeSpan::operator<=(CTimeSpan timeSpan) const
  227.     { return m_timeSpan <= timeSpan.m_timeSpan; }
  228. _AFX_INLINE BOOL CTimeSpan::operator>=(CTimeSpan timeSpan) const
  229.     { return m_timeSpan >= timeSpan.m_timeSpan; }
  230.  
  231.  
  232. _AFX_INLINE CTime::CTime()
  233.     { }
  234. _AFX_INLINE CTime::CTime(time_t time)
  235.     { m_time = time; }
  236. _AFX_INLINE CTime::CTime(const CTime& timeSrc)
  237.     { m_time = timeSrc.m_time; }
  238. _AFX_INLINE const CTime& CTime::operator=(const CTime& timeSrc)
  239.     { m_time = timeSrc.m_time; return *this; }
  240. _AFX_INLINE const CTime& CTime::operator=(time_t t)
  241.     { m_time = t; return *this; }
  242. _AFX_INLINE time_t CTime::GetTime() const
  243.     { return m_time; }
  244. _AFX_INLINE int CTime::GetYear() const
  245.     { return (GetLocalTm(NULL)->tm_year) + 1900; }
  246. _AFX_INLINE int CTime::GetMonth() const
  247.     { return GetLocalTm(NULL)->tm_mon + 1; }
  248. _AFX_INLINE int CTime::GetDay() const
  249.     { return GetLocalTm(NULL)->tm_mday; }
  250. _AFX_INLINE int CTime::GetHour() const
  251.     { return GetLocalTm(NULL)->tm_hour; }
  252. _AFX_INLINE int CTime::GetMinute() const
  253.     { return GetLocalTm(NULL)->tm_min; }
  254. _AFX_INLINE int CTime::GetSecond() const
  255.     { return GetLocalTm(NULL)->tm_sec; }
  256. _AFX_INLINE int CTime::GetDayOfWeek() const
  257.     { return GetLocalTm(NULL)->tm_wday + 1; }
  258. _AFX_INLINE CTimeSpan CTime::operator-(CTime time) const
  259.     { return CTimeSpan(m_time - time.m_time); }
  260. _AFX_INLINE CTime CTime::operator-(CTimeSpan timeSpan) const
  261.     { return CTime(m_time - timeSpan.m_timeSpan); }
  262. _AFX_INLINE CTime CTime::operator+(CTimeSpan timeSpan) const
  263.     { return CTime(m_time + timeSpan.m_timeSpan); }
  264. _AFX_INLINE const CTime& CTime::operator+=(CTimeSpan timeSpan)
  265.     { m_time += timeSpan.m_timeSpan; return *this; }
  266. _AFX_INLINE const CTime& CTime::operator-=(CTimeSpan timeSpan)
  267.     { m_time -= timeSpan.m_timeSpan; return *this; }
  268. _AFX_INLINE BOOL CTime::operator==(CTime time) const
  269.     { return m_time == time.m_time; }
  270. _AFX_INLINE BOOL CTime::operator!=(CTime time) const
  271.     { return m_time != time.m_time; }
  272. _AFX_INLINE BOOL CTime::operator<(CTime time) const
  273.     { return m_time < time.m_time; }
  274. _AFX_INLINE BOOL CTime::operator>(CTime time) const
  275.     { return m_time > time.m_time; }
  276. _AFX_INLINE BOOL CTime::operator<=(CTime time) const
  277.     { return m_time <= time.m_time; }
  278. _AFX_INLINE BOOL CTime::operator>=(CTime time) const
  279.     { return m_time >= time.m_time; }
  280.  
  281.  
  282. // CArchive
  283. _AFX_INLINE BOOL CArchive::IsLoading() const
  284.     { return (m_nMode & CArchive::load) != 0; }
  285. _AFX_INLINE BOOL CArchive::IsStoring() const
  286.     { return (m_nMode & CArchive::load) == 0; }
  287. _AFX_INLINE BOOL CArchive::IsByteSwapping() const
  288.     { return (m_nMode & CArchive::bNoByteSwap) == 0; }
  289. _AFX_INLINE BOOL CArchive::IsBufferEmpty() const
  290.     { return m_lpBufCur == m_lpBufMax; }
  291. _AFX_INLINE CFile* CArchive::GetFile() const
  292.     { return m_pFile; }
  293. _AFX_INLINE void CArchive::SetObjectSchema(UINT nSchema)
  294.     { m_nObjectSchema = nSchema; }
  295. _AFX_INLINE void CArchive::SetStoreParams(UINT nHashSize, UINT nBlockSize)
  296. {
  297.     ASSERT(IsStoring());
  298.     ASSERT(m_pStoreMap == NULL);    // must be before first object written
  299.     m_nHashSize = nHashSize;
  300.     m_nGrowSize = nBlockSize;
  301. }
  302. _AFX_INLINE void CArchive::SetLoadParams(UINT nGrowBy)
  303. {
  304.     ASSERT(IsLoading());
  305.     ASSERT(m_pLoadArray == NULL);   // must be before first object read
  306.     m_nGrowSize = nGrowBy;
  307. }
  308. _AFX_INLINE CArchive& CArchive::operator<<(int i)
  309.     { return CArchive::operator<<((LONG)i); }
  310. _AFX_INLINE CArchive& CArchive::operator<<(unsigned u)
  311.     { return CArchive::operator<<((LONG)u); }
  312. _AFX_INLINE CArchive& CArchive::operator<<(short w)
  313.     { return CArchive::operator<<((WORD)w); }
  314. _AFX_INLINE CArchive& CArchive::operator<<(char ch)
  315.     { return CArchive::operator<<((BYTE)ch); }
  316. _AFX_INLINE CArchive& CArchive::operator<<(BYTE by)
  317.     { if (m_lpBufCur + sizeof(BYTE) > m_lpBufMax) Flush();
  318.         *(UNALIGNED BYTE*)m_lpBufCur = by; m_lpBufCur += sizeof(BYTE); return *this; }
  319. #ifndef _MAC
  320. _AFX_INLINE CArchive& CArchive::operator<<(WORD w)
  321.     { if (m_lpBufCur + sizeof(WORD) > m_lpBufMax) Flush();
  322.         *(UNALIGNED WORD*)m_lpBufCur = w; m_lpBufCur += sizeof(WORD); return *this; }
  323. _AFX_INLINE CArchive& CArchive::operator<<(LONG l)
  324.     { if (m_lpBufCur + sizeof(LONG) > m_lpBufMax) Flush();
  325.         *(UNALIGNED LONG*)m_lpBufCur = l; m_lpBufCur += sizeof(LONG); return *this; }
  326. _AFX_INLINE CArchive& CArchive::operator<<(DWORD dw)
  327.     { if (m_lpBufCur + sizeof(DWORD) > m_lpBufMax) Flush();
  328.         *(UNALIGNED DWORD*)m_lpBufCur = dw; m_lpBufCur += sizeof(DWORD); return *this; }
  329. _AFX_INLINE CArchive& CArchive::operator<<(float f)
  330.     { if (m_lpBufCur + sizeof(float) > m_lpBufMax) Flush();
  331.         *(UNALIGNED _AFX_FLOAT*)m_lpBufCur = *(_AFX_FLOAT*)&f; m_lpBufCur += sizeof(float); return *this;
  332.     }
  333. _AFX_INLINE CArchive& CArchive::operator<<(double d)
  334.     { if (m_lpBufCur + sizeof(double) > m_lpBufMax) Flush();
  335.         *(UNALIGNED _AFX_DOUBLE*)m_lpBufCur = *(_AFX_DOUBLE*)&d; m_lpBufCur += sizeof(double); return *this; }
  336. #endif
  337. _AFX_INLINE CArchive& CArchive::operator>>(int& i)
  338.     { return CArchive::operator>>((LONG&)i); }
  339. _AFX_INLINE CArchive& CArchive::operator>>(unsigned& u)
  340.     { return CArchive::operator>>((LONG&)u); }
  341. _AFX_INLINE CArchive& CArchive::operator>>(short& w)
  342.     { return CArchive::operator>>((WORD&)w); }
  343. _AFX_INLINE CArchive& CArchive::operator>>(char& ch)
  344.     { return CArchive::operator>>((BYTE&)ch); }
  345. _AFX_INLINE CArchive& CArchive::operator>>(BYTE& by)
  346.     { if (m_lpBufCur + sizeof(BYTE) > m_lpBufMax)
  347.             FillBuffer(sizeof(BYTE) - (UINT)(m_lpBufMax - m_lpBufCur));
  348.         by = *(UNALIGNED BYTE*)m_lpBufCur; m_lpBufCur += sizeof(BYTE); return *this; }
  349. #ifndef _MAC
  350. _AFX_INLINE CArchive& CArchive::operator>>(WORD& w)
  351.     { if (m_lpBufCur + sizeof(WORD) > m_lpBufMax)
  352.             FillBuffer(sizeof(WORD) - (UINT)(m_lpBufMax - m_lpBufCur));
  353.         w = *(UNALIGNED WORD*)m_lpBufCur; m_lpBufCur += sizeof(WORD); return *this; }
  354. _AFX_INLINE CArchive& CArchive::operator>>(DWORD& dw)
  355.     { if (m_lpBufCur + sizeof(DWORD) > m_lpBufMax)
  356.             FillBuffer(sizeof(DWORD) - (UINT)(m_lpBufMax - m_lpBufCur));
  357.         dw = *(UNALIGNED DWORD*)m_lpBufCur; m_lpBufCur += sizeof(DWORD); return *this; }
  358. _AFX_INLINE CArchive& CArchive::operator>>(float& f)
  359.     { if (m_lpBufCur + sizeof(float) > m_lpBufMax)
  360.             FillBuffer(sizeof(float) - (UINT)(m_lpBufMax - m_lpBufCur));
  361.         *(_AFX_FLOAT*)&f = *(UNALIGNED _AFX_FLOAT*)m_lpBufCur; m_lpBufCur += sizeof(float); return *this; }
  362. _AFX_INLINE CArchive& CArchive::operator>>(double& d)
  363.     { if (m_lpBufCur + sizeof(double) > m_lpBufMax)
  364.             FillBuffer(sizeof(double) - (UINT)(m_lpBufMax - m_lpBufCur));
  365.         *(_AFX_DOUBLE*)&d = *(UNALIGNED _AFX_DOUBLE*)m_lpBufCur; m_lpBufCur += sizeof(double); return *this; }
  366. _AFX_INLINE CArchive& CArchive::operator>>(LONG& l)
  367.     { if (m_lpBufCur + sizeof(LONG) > m_lpBufMax)
  368.             FillBuffer(sizeof(LONG) - (UINT)(m_lpBufMax - m_lpBufCur));
  369.         l = *(UNALIGNED LONG*)m_lpBufCur; m_lpBufCur += sizeof(LONG); return *this; }
  370. #endif
  371. _AFX_INLINE CArchive::CArchive(const CArchive& /* arSrc */)
  372.     { }
  373. _AFX_INLINE void CArchive::operator=(const CArchive& /* arSrc */)
  374.     { }
  375. _AFX_INLINE CArchive& AFXAPI operator<<(CArchive& ar, const CObject* pOb)
  376.     { ar.WriteObject(pOb); return ar; }
  377. _AFX_INLINE CArchive& AFXAPI operator>>(CArchive& ar, CObject*& pOb)
  378.     { pOb = ar.ReadObject(NULL); return ar; }
  379. _AFX_INLINE CArchive& AFXAPI operator>>(CArchive& ar, const CObject*& pOb)
  380.     { pOb = ar.ReadObject(NULL); return ar; }
  381.  
  382.  
  383. // CDumpContext
  384. _AFX_INLINE int CDumpContext::GetDepth() const
  385.     { return m_nDepth; }
  386. _AFX_INLINE void CDumpContext::SetDepth(int nNewDepth)
  387.     { m_nDepth = nNewDepth; }
  388. _AFX_INLINE CDumpContext::CDumpContext(const CDumpContext& /* dcSrc */)
  389.     { }
  390. _AFX_INLINE void CDumpContext::operator=(const CDumpContext& /* dcSrc */)
  391.     { }
  392.  
  393. /////////////////////////////////////////////////////////////////////////////
  394.  
  395. #endif //_AFX_INLINE
  396.