Logo Search packages:      
Sourcecode: icu version File versions

DateTimePatternGenerator *U_EXPORT2 DateTimePatternGenerator::createEmptyInstance ( UErrorCode status  )  [static]

Create an empty generator, to be constructed with addPattern(...) etc.

Parameters:
status Output param set to success/failure code on exit, which must not indicate a failure before the function call. ICU 3.8

Definition at line 254 of file dtptngen.cpp.

References DateTimePatternGenerator(), NULL, U_FAILURE, and U_MEMORY_ALLOCATION_ERROR.

Referenced by IntlTestDateTimePatternGeneratorAPI::testAPI(), and udatpg_openEmpty().

                                                                {
    DateTimePatternGenerator *result = new DateTimePatternGenerator(status);
    if (result == NULL) {
        status = U_MEMORY_ALLOCATION_ERROR;
    }
    if (U_FAILURE(status)) {
        delete result;
        result = NULL;
    }
    return result;
}


Generated by  Doxygen 1.6.0   Back to index