Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

cpputils.h

Go to the documentation of this file.
00001 /*
00002 *******************************************************************************
00003 *
00004 *   Copyright (C) 1997-1999, International Business Machines
00005 *   Corporation and others.  All Rights Reserved.
00006 *
00007 *******************************************************************************
00008 *   file name:  cpputils.h
00009 *   encoding:   US-ASCII
00010 *   tab size:   8 (not used)
00011 *   indentation:4
00012 */
00013 
00014 #ifndef CPPUTILS_H
00015 #define CPPUTILS_H
00016 
00017 #include "unicode/utypes.h"
00018 
00019 #ifdef XP_CPLUSPLUS
00020 
00021 #include "cmemory.h"
00022 #include "unicode/unistr.h"
00023 
00024 /*===========================================================================*/
00025 /* Array copy utility functions */
00026 /*===========================================================================*/
00027 
00028 inline void uprv_arrayCopy(const double* src, double* dst, int32_t count)
00029 { uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
00030 
00031 inline void uprv_arrayCopy(const double* src, int32_t srcStart,
00032               double* dst, int32_t dstStart, int32_t count)
00033 { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
00034 
00035 inline void uprv_arrayCopy(const int8_t* src, int8_t* dst, int32_t count)
00036     { uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
00037 
00038 inline void uprv_arrayCopy(const int8_t* src, int32_t srcStart,
00039               int8_t* dst, int32_t dstStart, int32_t count)
00040 { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
00041 
00042 inline void uprv_arrayCopy(const int16_t* src, int16_t* dst, int32_t count)
00043 { uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
00044 
00045 inline void uprv_arrayCopy(const int16_t* src, int32_t srcStart,
00046               int16_t* dst, int32_t dstStart, int32_t count)
00047 { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
00048 
00049 inline void uprv_arrayCopy(const int32_t* src, int32_t* dst, int32_t count)
00050 { uprv_memcpy(dst, src, (size_t)(count * sizeof(*src))); }
00051 
00052 inline void uprv_arrayCopy(const int32_t* src, int32_t srcStart,
00053               int32_t* dst, int32_t dstStart, int32_t count)
00054 { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
00055 
00056 inline void
00057 uprv_arrayCopy(const UChar *src, int32_t srcStart,
00058         UChar *dst, int32_t dstStart, int32_t count)
00059 { uprv_memcpy(dst+dstStart, src+srcStart, (size_t)(count * sizeof(*src))); }
00060 
00061 /******************************************************
00062  * Simple utility to set output buffer parameters
00063  ******************************************************/
00064 
00065 U_CAPI void U_EXPORT2 T_fillOutputParams(const UnicodeString* temp,
00066                                        UChar* result, 
00067                                        const int32_t resultLength,
00068                                        int32_t* resultLengthOut, 
00069                                        UErrorCode* status);
00070 #endif
00071 
00072 
00073 
00074 
00075 #endif /* _CPPUTILS */

Generated at Tue Dec 5 17:55:26 2000 for ICU by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000