ICU-9803 Add API to get number formatter from UFile

X-SVN-Rev: 33101
This commit is contained in:
Michael Ow 2013-01-31 16:54:46 +00:00
parent 9d932766bd
commit 4a089feb16
2 changed files with 16 additions and 2 deletions

View file

@ -1,7 +1,7 @@
/*
******************************************************************************
*
* Copyright (C) 1998-2012, International Business Machines
* Copyright (C) 1998-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@ -299,4 +299,10 @@ u_fgetConverter(UFILE *file)
{
return file->fConverter;
}
#if !UCONFIG_NO_FORMATTING
U_CAPI const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(const UFILE *file)
{
return u_locbund_getNumberFormat(&file->str.fBundle, UNUM_DECIMAL);
}
#endif

View file

@ -1,7 +1,7 @@
/*
******************************************************************************
*
* Copyright (C) 1998-2012, International Business Machines
* Copyright (C) 1998-2013, International Business Machines
* Corporation and others. All Rights Reserved.
*
******************************************************************************
@ -29,6 +29,7 @@
#include "unicode/ucnv.h"
#include "unicode/utrans.h"
#include "unicode/localpointer.h"
#include "unicode/unum.h"
/*
TODO
@ -438,6 +439,13 @@ u_fsetcodepage(const char *codepage,
U_STABLE UConverter* U_EXPORT2 u_fgetConverter(UFILE *f);
#if !UCONFIG_NO_FORMATTING
/**
* Returns an alias to the number formatter being used for this file.
* @param f The UFILE to get the value from
* @return alias to the number formatter (The formatter <EM>must not</EM> be modified or closed)
* @draft ICU 51
*/
U_DRAFT const UNumberFormat* U_EXPORT2 u_fgetNumberFormat(const UFILE *f);
/* Output functions */