Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.2 KiB

  1. // RenderConnector.h: interface for the CRenderConnector class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_RENDERCONNECTOR_H__023A75E3_A81A_11D3_8D63_00C04F949D33__INCLUDED_)
  5. #define AFX_RENDERCONNECTOR_H__023A75E3_A81A_11D3_8D63_00C04F949D33__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include "Stateless.h"
  10. ////////////////////////////////////////////////////////////////////////////////////
  11. // CRenderConnector class declaration
  12. ////////////////////////////////////////////////////////////////////////////////////
  13. class CRenderConnector
  14. {
  15. CStatelessPublic m_Stateless;
  16. bool m_bLocked;
  17. public:
  18. CRenderConnector() : m_bLocked(false) {}
  19. virtual ~CRenderConnector() {}
  20. public:
  21. void Render(CString strPage);
  22. bool GetLocked() {return m_bLocked;}
  23. void SetLocked(bool set) {m_bLocked = set;}
  24. protected:
  25. // PURE virtual
  26. virtual void RenderInternal(CString strPage) =0;
  27. };
  28. inline void CRenderConnector::Render(CString strPage)
  29. {
  30. m_Stateless.Lock(__FILE__, __LINE__);
  31. RenderInternal(strPage);
  32. m_Stateless.Unlock();
  33. }
  34. #endif // !defined(AFX_RENDERCONNECTOR_H__023A75E3_A81A_11D3_8D63_00C04F949D33__INCLUDED_)