ICU-6192 do not include internal uvectr32.h from public unicode/fpositer.h

X-SVN-Rev: 27368
This commit is contained in:
Markus Scherer 2010-01-21 23:54:42 +00:00
parent a31a559ede
commit 7fcecf9565
3 changed files with 22 additions and 19 deletions

View File

@ -8,6 +8,7 @@
#if !UCONFIG_NO_FORMAT
#include "fphdlimp.h"
#include "uvectr32.h"
U_NAMESPACE_BEGIN

View File

@ -1,7 +1,7 @@
/*
******************************************************************************
* Copyright (C) 2009, International Business Machines Corporation and *
* others. All Rights Reserved. *
* Copyright (C) 2009-2010, International Business Machines Corporation and
* others. All Rights Reserved.
******************************************************************************
* Date Name Description
* 12/14/09 doug Creation.
@ -10,6 +10,7 @@
#include "unicode/fpositer.h"
#include "cmemory.h"
#include "uvectr32.h"
U_NAMESPACE_BEGIN
@ -82,4 +83,20 @@ void FieldPositionIterator::setData(UVector32 *adopt, UErrorCode& status) {
pos = adopt == NULL ? -1 : 0;
}
UBool FieldPositionIterator::next(FieldPosition& fp) {
if (pos == -1) {
return FALSE;
}
fp.setField(data->elementAti(pos++));
fp.setBeginIndex(data->elementAti(pos++));
fp.setEndIndex(data->elementAti(pos++));
if (pos == data->size()) {
pos = -1;
}
return TRUE;
}
U_NAMESPACE_END

View File

@ -40,10 +40,11 @@ U_NAMESPACE_END
#include "unicode/fieldpos.h"
#include "unicode/umisc.h"
#include "uvectr32.h"
U_NAMESPACE_BEGIN
class UVector32;
/**
* FieldPositionIterator returns the field ids and their start/limit positions generated
* by a call to Format::format. See Format, NumberFormat, DecimalFormat.
@ -121,22 +122,6 @@ private:
int32_t pos;
};
inline UBool FieldPositionIterator::next(FieldPosition& fp) {
if (pos == -1) {
return FALSE;
}
fp.setField(data->elementAti(pos++));
fp.setBeginIndex(data->elementAti(pos++));
fp.setEndIndex(data->elementAti(pos++));
if (pos == data->size()) {
pos = -1;
}
return TRUE;
}
U_NAMESPACE_END
#endif /* #if !UCONFIG_NO_FORMATTING */