CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csWtoC Struct Reference
[Utilities]

Helper class to convert widechar* to char*(UTF-8) strings for use as function parameters. More...

#include <util.h>

List of all members.

Public Methods

 csWtoC (const wchar_t *ws)
 Constructor. More...

 ~csWtoC ()
 Deletes the internally stored string. More...

 operator const char * () const
 Retrieve the converted string. More...


Detailed Description

Helper class to convert widechar* to char*(UTF-8) strings for use as function parameters.

Use of this helper class is more convenient than an a csStrNewW() / delete[], but essentially does the same.

   wchar_t* wstr = L"Hello World";
    ... 
   iNativeWindow* natwin =  ... ;
     natwin->SetTitle (csWtoC (wstr));

Definition at line 66 of file util.h.


Constructor & Destructor Documentation

csWtoC::csWtoC const wchar_t *    ws [inline]
 

Constructor.

Stores an UTF-8 converted version of ws internally.

Definition at line 75 of file util.h.

References csStrNew.

csWtoC::~csWtoC   [inline]
 

Deletes the internally stored string.

Definition at line 80 of file util.h.


Member Function Documentation

csWtoC::operator const char *   const [inline]
 

Retrieve the converted string.

Definition at line 85 of file util.h.


The documentation for this struct was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14