Logo Search packages:      
Sourcecode: icu version File versions  Download package

U_STABLE UDateFormat* U_EXPORT2 udat_clone ( const UDateFormat fmt,
UErrorCode status 
)

Open a copy of a UDateFormat. This function performs a deep copy.

Parameters:
fmtThe format to copy
statusA pointer to an UErrorCode to receive any errors.
Returns:
A pointer to a UDateFormat identical to fmt. ICU 2.0

Definition at line 103 of file udat.cpp.

References Format::clone(), U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

{
    if(U_FAILURE(*status)) return 0;

    Format *res = ((DateFormat*)fmt)->clone();

    if(res == 0) {
        *status = U_MEMORY_ALLOCATION_ERROR;
        return 0;
    }

    return (UDateFormat*) res;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index