Leaked source code of windows server 2003
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.

36 lines
477 B

  1. #ifndef __FnObjs_h__
  2. #define __FnObjs_h__
  3. class IsEqLPTSTR
  4. {
  5. private:
  6. LPCTSTR m_pcsz;
  7. public:
  8. IsEqLPTSTR( LPCTSTR pcsz ) : m_pcsz( pcsz ) { ; }
  9. bool operator() ( LPCTSTR pcsz )
  10. {
  11. return ( 0 == lstrcmp( pcsz, m_pcsz ) );
  12. }
  13. };
  14. template< class T >
  15. class IsEq
  16. {
  17. const T& m_rT;
  18. public:
  19. IsEq( const T& rT ) : m_rT( rT ) { ; }
  20. bool operator() ( const T& rT )
  21. {
  22. return rT == m_rT;
  23. }
  24. };
  25. #endif // __FnObjs_h__