原创 scoped_ptr

  template <class C> class scoped_ptr {  public:     // The element type   typedef C element_type;     // Constructor.

原创 DISALLOW

  // A macro to disallow the copy constructor and operator= functions // This should be used in the private: declaratio

原创 scoped_ptr_malloc

template<class C, class FreeProc = ScopedPtrMallocFree> class scoped_ptr_malloc {  public:     // The element type   t

原创 StackBstrT

  // Template class to generate a BSTR from a static wide string // without touching the heap.  Use this class via the

原创 ScopedComPtr

  // Utility template to prevent users of ScopedComPtr from calling AddRef and/or // Release() without going through th

原创 ScopedClipboardWriter

// This class is a wrapper for |Clipboard| that handles packing data // into a Clipboard::ObjectMap. // NB: You should

原创 ScopedVector

  // ScopedVector wraps a vector deleting the elements from its // destructor. template <class T> class ScopedVector {

原创 ScopedHGlobal

template<class T> class ScopedHGlobal {  public:   explicit ScopedHGlobal(HGLOBAL glob) : glob_(glob) {     data_ = st

原创 TimeFormat

// Returns the time of day, e.g., "3:07 PM". std::wstring TimeFormatTimeOfDay(const Time& time);   // Returns a shorte

原创 ScopedStdioHandle

class ScopedStdioHandle {  public:   ScopedStdioHandle()       : handle_(NULL) { }     explicit ScopedStdioHandle(FILE

原创 ScopedFindFileHandle

class ScopedFindFileHandle {  public:   explicit ScopedFindFileHandle(HANDLE handle) : handle_(handle) {     // Windows

原创 StringTokenizerT

template <class str, class const_iterator> class StringTokenizerT {  public:   typedef typename str::value_type char_t

原创 ScopedTempDir

class ScopedTempDir {  public:   // No directory is owned/created initially.   ScopedTempDir();     // Recursively del

原创 bit_cast

  template <class Dest, class Source> inline Dest bit_cast(const Source& source) {   // Compile time assertion: sizeof(

原创 ScopedBstr

  // Manages a BSTR string pointer. // The class interface is based on scoped_ptr. class ScopedBstr {  public:   Scoped