Windows utility classes.


Classes

class  comet::auto_coinit
 Automatic handling of CoInitialize / CoUninitialize. More...

Typedefs

typedef std::basic_string<
TCHAR > 
comet::tstring
typedef std::basic_ios< TCHAR,
std::char_traits< TCHAR > > 
comet::tios
typedef std::basic_streambuf<
TCHAR, std::char_traits<
TCHAR > > 
comet::tstreambuf
typedef std::basic_istream<
TCHAR, std::char_traits<
TCHAR > > 
comet::tistream
typedef std::basic_ostream<
TCHAR, std::char_traits<
TCHAR > > 
comet::tostream
typedef std::basic_iostream<
TCHAR, std::char_traits<
TCHAR > > 
comet::tiostream
typedef std::basic_stringbuf<
TCHAR, std::char_traits<
TCHAR >, std::allocator<
TCHAR > > 
comet::tstringbuf
typedef std::basic_istringstream<
TCHAR, std::char_traits<
TCHAR >, std::allocator<
TCHAR > > 
comet::tistringstream
typedef std::basic_ostringstream<
TCHAR, std::char_traits<
TCHAR >, std::allocator<
TCHAR > > 
comet::tostringstream
typedef std::basic_stringstream<
TCHAR, std::char_traits<
TCHAR >, std::allocator<
TCHAR > > 
comet::tstringstream
typedef std::basic_filebuf<
TCHAR, std::char_traits<
TCHAR > > 
comet::tfilebuf
typedef std::basic_ifstream<
TCHAR, std::char_traits<
TCHAR > > 
comet::tifstream
typedef std::basic_ofstream<
TCHAR, std::char_traits<
TCHAR > > 
comet::tofstream
typedef std::basic_fstream<
TCHAR, std::char_traits<
TCHAR > > 
comet::tfstream
typedef auto_coinit auto_CoInitialize

Functions

CLSID comet::get_clsid_of_ftm ()
 Returns the class id of the free threaded marshaler.
bool comet::is_object_aggregating_ftm (const com_ptr< IUnknown > &p)
bool comet::is_sta ()
bool comet::is_std_proxy (const com_ptr< IUnknown > &unk)

Comet tstring type.

In order for comet projects to more easily support unicode via the windows file "tchar.h", many comet classes support the type comet::tstring which is a convenience typedef to basic_string. Associated with tstring are all or most of the other STL classes that have a char argument to the templates.

In addition to being used by comet, this is a generally useful series of typedefs to be used when combining STL types with tchar.h compatible projects.

There are two area to be particularly wary of with STL and tchar.h.

The first is that the filename argument for file streams are always narrow char *. I would suggest using a comet::bstr_t which will convert for you, especially in UNICODE (actually UCS2 little-endien) projects.

The second is that tstring support for multi-byte character strings is very minimal. Embedded NULLs in the stream are not a problem for copying around, however none of the parsing/searching/comparison methods cope with multi-byte character sets.

I believe that part of the reason for this is the platform specific nature of multi-byte, and the internal support for a variety of different MBCS implementations by Microsoft.


Typedef Documentation

typedef std::basic_filebuf<TCHAR, std::char_traits<TCHAR> > comet::tfilebuf
 

TCHAR version of std::basic_filebuf.

typedef std::basic_fstream<TCHAR, std::char_traits<TCHAR> > comet::tfstream
 

TCHAR version of std::basic_fstream.

typedef std::basic_ifstream<TCHAR, std::char_traits<TCHAR> > comet::tifstream
 

TCHAR version of std::basic_ifstream.

typedef std::basic_ios<TCHAR, std::char_traits<TCHAR> > comet::tios
 

TCHAR version of std::basic_ios.

typedef std::basic_iostream<TCHAR, std::char_traits<TCHAR> > comet::tiostream
 

TCHAR version of std::basic_iostream.

typedef std::basic_istream<TCHAR, std::char_traits<TCHAR> > comet::tistream
 

TCHAR version of std::basic_istream.

typedef std::basic_istringstream<TCHAR, std::char_traits<TCHAR>, std::allocator<TCHAR> > comet::tistringstream
 

TCHAR version of std::basic_istringstream.

typedef std::basic_ofstream<TCHAR, std::char_traits<TCHAR> > comet::tofstream
 

TCHAR version of std::basic_ofstream.

typedef std::basic_ostream<TCHAR, std::char_traits<TCHAR> > comet::tostream
 

TCHAR version of std::basic_ostream.

typedef std::basic_ostringstream<TCHAR, std::char_traits<TCHAR>, std::allocator<TCHAR> > comet::tostringstream
 

TCHAR version of std::basic_ostringstream.

typedef std::basic_streambuf<TCHAR, std::char_traits<TCHAR> > comet::tstreambuf
 

TCHAR version of std::basic_streambuf.

typedef std::basic_string< TCHAR > comet::tstring
 

TCHAR version of std::basic_string. See Comet tstring type.

typedef std::basic_stringbuf<TCHAR, std::char_traits<TCHAR>, std::allocator<TCHAR> > comet::tstringbuf
 

TCHAR version of std::basic_stringbuf.

typedef std::basic_stringstream<TCHAR, std::char_traits<TCHAR>, std::allocator<TCHAR> > comet::tstringstream
 

TCHAR version of std::basic_stringstream.


Function Documentation

bool is_object_aggregating_ftm const com_ptr< IUnknown > &  p  )  [inline]
 

Returns true if and only if object is aggregating the free threaded marshaler.

bool is_sta  )  [inline]
 

Returns true if and only if current apartment is an STA.

bool is_std_proxy const com_ptr< IUnknown > &  unk  )  [inline]
 

Returns true if and only if specified ptr is a standard proxy.