]> git.saurik.com Git - wxWidgets.git/blobdiff - interface/strconv.h
adjusted indentation with astyle; added Id keyword
[wxWidgets.git] / interface / strconv.h
index e734ef3f2287cdf9a79158b5e9bc0937810bf91c..a49af8710323c76e0458657bd6217c017d2fe5b8 100644 (file)
@@ -9,15 +9,15 @@
 /**
     @class wxMBConvUTF7
     @wxheader{strconv.h}
-    
+
     This class converts between the UTF-7 encoding and Unicode.
     It has one predefined instance, @b wxConvUTF7.
-    
+
     @b WARNING: this class is not implemented yet.
-    
+
     @library{wxbase}
     @category{FIXME}
-    
+
     @seealso
     wxMBConvUTF8, @ref overview_mbconvclasses "wxMBConv classes overview"
 */
@@ -41,13 +41,13 @@ public:
 /**
     @class wxMBConvUTF8
     @wxheader{strconv.h}
-    
+
     This class converts between the UTF-8 encoding and Unicode.
     It has one predefined instance, @b wxConvUTF8.
-    
+
     @library{wxbase}
     @category{FIXME}
-    
+
     @seealso
     wxMBConvUTF7, @ref overview_mbconvclasses "wxMBConv classes overview"
 */
@@ -71,7 +71,7 @@ public:
 /**
     @class wxMBConvUTF16
     @wxheader{strconv.h}
-    
+
     This class is used to convert between multibyte encodings and UTF-16 Unicode
     encoding (also known as UCS-2). Unlike UTF-8 encoding,
     UTF-16 uses words and not bytes and hence depends on the byte ordering:
@@ -79,10 +79,10 @@ public:
     wxMBConvUTF16LE and wxMBConvUTF16BE and wxMBConvUTF16 itself is just a typedef
     for one of them (native for the given platform, e.g. LE under Windows and BE
     under Mac).
-    
+
     @library{wxbase}
     @category{FIXME}
-    
+
     @seealso
     wxMBConvUTF8, wxMBConvUTF32, @ref overview_mbconvclasses "wxMBConv classes
     overview"
@@ -107,14 +107,14 @@ public:
 /**
     @class wxCSConv
     @wxheader{strconv.h}
-    
+
     This class converts between any character sets and Unicode.
     It has one predefined instance, @b wxConvLocal, for the
     default user character set.
-    
+
     @library{wxbase}
     @category{FIXME}
-    
+
     @seealso
     wxMBConv, wxEncodingConverter, @ref overview_mbconvclasses "wxMBConv classes
     overview"
@@ -129,7 +129,7 @@ public:
         encoding) is not recognized, ISO 8859-1 is used as fall back.
     */
     wxCSConv(const wxChar* charset);
-        wxCSConv(wxFontEncoding encoding);
+    wxCSConv(wxFontEncoding encoding);
     //@}
 
     /**
@@ -165,35 +165,35 @@ public:
 /**
     @class wxMBConvFile
     @wxheader{strconv.h}
-    
-    This class used to define the class instance 
+
+    This class used to define the class instance
     @b wxConvFileName, but nowadays @b wxConvFileName is
     either of type wxConvLibc (on most platforms) or wxConvUTF8
-    (on MacOS X). @b wxConvFileName converts filenames between 
-    filesystem multibyte encoding and Unicode. @b wxConvFileName 
-    can also be set to a something else at run-time which is used 
-    e.g. by wxGTK to use a class which checks the environment 
-    variable @b G_FILESYSTEM_ENCODING indicating that filenames 
-    should not be interpreted as UTF8 and also for converting 
+    (on MacOS X). @b wxConvFileName converts filenames between
+    filesystem multibyte encoding and Unicode. @b wxConvFileName
+    can also be set to a something else at run-time which is used
+    e.g. by wxGTK to use a class which checks the environment
+    variable @b G_FILESYSTEM_ENCODING indicating that filenames
+    should not be interpreted as UTF8 and also for converting
     invalid UTF8 characters (e.g. if there is a filename in iso8859_1)
-    to strings with octal values. 
-    
+    to strings with octal values.
+
     Since some platforms (such as Win32) use Unicode in the filenames,
     and others (such as Unix) use multibyte encodings, this class should only
     be used directly if wxMBFILES is defined to 1. A convenience macro,
     wxFNCONV, is defined to wxConvFileName-cWX2MB in this case. You could
     use it like this:
-    
+
     @code
     wxChar *name = wxT("rawfile.doc");
     FILE *fil = fopen(wxFNCONV(name), "r");
     @endcode
-    
+
     (although it would be better to use wxFopen(name, wxT("r")) in this case.)
-    
+
     @library{wxbase}
     @category{FIXME}
-    
+
     @seealso
     @ref overview_mbconvclasses "wxMBConv classes overview"
 */
@@ -217,7 +217,7 @@ public:
 /**
     @class wxMBConvUTF32
     @wxheader{strconv.h}
-    
+
     This class is used to convert between multibyte encodings and UTF-32 Unicode
     encoding (also known as UCS-4). Unlike UTF-8 encoding,
     UTF-32 uses (double) words and not bytes and hence depends on the byte ordering:
@@ -225,10 +225,10 @@ public:
     wxMBConvUTF32LE and wxMBConvUTF32BE and wxMBConvUTF32 itself is just a typedef
     for one of them (native for the given platform, e.g. LE under Windows and BE
     under Mac).
-    
+
     @library{wxbase}
     @category{FIXME}
-    
+
     @seealso
     wxMBConvUTF8, wxMBConvUTF16, @ref overview_mbconvclasses "wxMBConv classes
     overview"
@@ -253,26 +253,26 @@ public:
 /**
     @class wxMBConv
     @wxheader{strconv.h}
-    
+
     This class is the base class of a hierarchy of classes capable of converting
     text strings between multibyte (SBCS or DBCS) encodings and Unicode.
-    
-    In the documentation for this and related classes please notice that 
+
+    In the documentation for this and related classes please notice that
     length of the string refers to the number of characters in the string
     not counting the terminating @c NUL, if any. While the size of the string
     is the total number of bytes in the string, including any trailing @c NUL.
     Thus, length of wide character string @c L"foo" is 3 while its size can
     be either 8 or 16 depending on whether @c wchar_t is 2 bytes (as
     under Windows) or 4 (Unix).
-    
+
     @library{wxbase}
     @category{FIXME}
-    
+
     @seealso
     wxCSConv, wxEncodingConverter, @ref overview_mbconvclasses "wxMBConv classes
     overview"
 */
-class wxMBConv 
+class wxMBConv
 {
 public:
     /**
@@ -288,7 +288,7 @@ public:
     virtual wxMBConv * Clone();
 
     /**
-        This function has the same semantics as ToWChar() 
+        This function has the same semantics as ToWChar()
         except that it converts a wide string to multibyte one.
     */
     virtual size_t FromWChar(char * dst, size_t dstLen,
@@ -299,13 +299,13 @@ public:
         This function returns 1 for most of the multibyte encodings in which the
         string is terminated by a single @c NUL, 2 for UTF-16 and 4 for UTF-32 for
         which the string is terminated with 2 and 4 @c NUL characters respectively.
-        The other cases are not currently supported and @c wxCONV_FAILED 
+        The other cases are not currently supported and @c wxCONV_FAILED
         (defined as -1) is returned for them.
     */
     size_t GetMBNulLen();
 
     /**
-        Returns the maximal value which can be returned by 
+        Returns the maximal value which can be returned by
         GetMBNulLen() for any conversion object. Currently
         this value is 4.
         
@@ -317,44 +317,44 @@ public:
     /**
         This function is deprecated, please use ToWChar() instead
         
-        Converts from a string @e in in multibyte encoding to Unicode putting up to 
+        Converts from a string @e in in multibyte encoding to Unicode putting up to
         @e outLen characters into the buffer @e out.
         
         If @e out is @NULL, only the length of the string which would result from
         the conversion is calculated and returned. Note that this is the length and not
         size, i.e. the returned value does not include the trailing @c NUL. But
-        when the function is called with a non-@NULL @e out buffer, the @e outLen 
+        when the function is called with a non-@NULL @e out buffer, the @e outLen
         parameter should be one more to allow to properly @c NUL-terminate the string.
         
-        @param out 
+        @param out
         The output buffer, may be @NULL if the caller is only
         interested in the length of the resulting string
         
-        @param in 
+        @param in
         The NUL-terminated input string, cannot be @NULL
         
-        @param outLen 
-        The length of the output buffer but including 
+        @param outLen
+        The length of the output buffer but including
         NUL, ignored if out is @NULL
         
         @returns The length of the converted string excluding the trailing NUL.
     */
 #define virtual size_t MB2WC(wchar_t * out, const char * in,
-                         size_t outLen)     /* implementation is private */
+    size_t outLen)     /* implementation is private */
 
     /**
         The most general function for converting a multibyte string to a wide string.
-        The main case is when @e dst is not @NULL and @e srcLen is not 
+        The main case is when @e dst is not @NULL and @e srcLen is not
         @c wxNO_LEN (which is defined as @c (size_t)-1): then
         the function converts exactly @e srcLen bytes starting at @e src into
         wide string which it output to @e dst. If the length of the resulting wide
-        string is greater than @e dstLen, an error is returned. Note that if 
+        string is greater than @e dstLen, an error is returned. Note that if
         @e srcLen bytes don't include @c NUL characters, the resulting wide string is
         not @c NUL-terminated neither.
         
         If @e srcLen is @c wxNO_LEN, the function supposes that the string is
-        properly (i.e. as necessary for the encoding handled by this conversion) 
-        @c NUL-terminated and converts the entire string, including any trailing @c NUL 
+        properly (i.e. as necessary for the encoding handled by this conversion)
+        @c NUL-terminated and converts the entire string, including any trailing @c NUL
         bytes. In this case the wide string is also @c NUL-terminated.
         
         Finally, if @e dst is @NULL, the function returns the length of the needed
@@ -368,10 +368,10 @@ public:
         This function is deprecated, please use FromWChar() instead
         
         Converts from Unicode to multibyte encoding. The semantics of this function
-        (including the return value meaning) is the same as for 
+        (including the return value meaning) is the same as for
         wxMBConv::MB2WC.
         
-        Notice that when the function is called with a non-@NULL buffer, the 
+        Notice that when the function is called with a non-@NULL buffer, the
         @e n parameter should be the size of the buffer and so it should take
         into account the trailing @c NUL, which might take two or four bytes for some
         encodings (UTF-16 and UTF-32) and not one.
@@ -380,7 +380,7 @@ public:
 
     //@{
     /**
-        Converts from multibyte encoding to Unicode by calling 
+        Converts from multibyte encoding to Unicode by calling
         wxMBConv::MB2WC, allocating a temporary wxWCharBuffer to hold
         the result.
         
@@ -388,8 +388,8 @@ public:
         a
         string of exactly the specified length and the string may include or not the
         trailing @c NUL character(s). If the string is not @c NUL-terminated, a
-        temporary 
-        @c NUL-terminated copy of it suitable for passing to wxMBConv::MB2WC 
+        temporary
+        @c NUL-terminated copy of it suitable for passing to wxMBConv::MB2WC
         is made, so it is more efficient to ensure that the string is does have the
         appropriate number of @c NUL bytes (which is usually 1 but may be 2 or 4
         for UTF-16 or UTF-32, see wxMBConv::GetMBNulLen),
@@ -399,8 +399,8 @@ public:
         string.
     */
     const wxWCharBuffer cMB2WC(const char * in);
-        const wxWCharBuffer cMB2WC(const char * in, size_t inLen,
-                                   size_t outLen);
+    const wxWCharBuffer cMB2WC(const char * in, size_t inLen,
+                               size_t outLen);
     //@}
 
     //@{
@@ -412,7 +412,7 @@ public:
         return type (without const).
     */
     const char* cMB2WX(const char* psz);
-        const wxWCharBuffer cMB2WX(const char* psz);
+    const wxWCharBuffer cMB2WX(const char* psz);
     //@}
 
     //@{
@@ -431,8 +431,8 @@ public:
         string.
     */
     const wxCharBuffer cWC2MB(const wchar_t* in);
-        const wxCharBuffer cWC2MB(const wchar_t* in, size_t inLen,
-                                  size_t outLen);
+    const wxCharBuffer cWC2MB(const wchar_t* in, size_t inLen,
+                              size_t outLen);
     //@}
 
     //@{
@@ -443,7 +443,7 @@ public:
         return type (without const).
     */
     const wchar_t* cWC2WX(const wchar_t* psz);
-        const wxCharBuffer cWC2WX(const wchar_t* psz);
+    const wxCharBuffer cWC2WX(const wchar_t* psz);
     //@}
 
     //@{
@@ -454,7 +454,7 @@ public:
         return type (without const).
     */
     const char* cWX2MB(const wxChar* psz);
-        const wxCharBuffer cWX2MB(const wxChar* psz);
+    const wxCharBuffer cWX2MB(const wxChar* psz);
     //@}
 
     //@{
@@ -465,6 +465,6 @@ public:
         return type (without const).
     */
     const wchar_t* cWX2WC(const wxChar* psz);
-        const wxWCharBuffer cWX2WC(const wxChar* psz);
+    const wxWCharBuffer cWX2WC(const wxChar* psz);
     //@}
 };