Logo Search packages:      
Sourcecode: icu version File versions

U_STABLE UMessageFormat U_EXPORT2 umsg_clone ( const UMessageFormat fmt,
UErrorCode status 
)

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

Parameters:
fmt The formatter to copy
status A pointer to an UErrorCode to receive any errors.
Returns:
A pointer to a UDateFormat identical to fmt. ICU 2.0

Definition at line 252 of file umsg.cpp.

References NULL, U_FAILURE, U_ILLEGAL_ARGUMENT_ERROR, and U_MEMORY_ALLOCATION_ERROR.

{
    //check arguments
    if(status==NULL || U_FAILURE(*status)){
        return NULL;
    }
    if(fmt==NULL){
        *status = U_ILLEGAL_ARGUMENT_ERROR;
        return NULL;
    }
    UMessageFormat retVal = (UMessageFormat)((MessageFormat*)fmt)->clone();
    if(retVal == 0) {
        *status = U_MEMORY_ALLOCATION_ERROR;
        return 0;
    }
    return retVal;    
}


Generated by  Doxygen 1.6.0   Back to index