ICU 4.8.1.1
4.8.1.1
|
A message pattern "part", representing a pattern parsing event. More...
#include <messagepattern.h>
Public Member Functions | |
Part () | |
Default constructor, do not use. | |
UMessagePatternPartType | getType () const |
Returns the type of this part. | |
int32_t | getIndex () const |
Returns the pattern string index associated with this Part. | |
int32_t | getLength () const |
Returns the length of the pattern substring associated with this Part. | |
int32_t | getLimit () const |
Returns the pattern string limit (exclusive-end) index associated with this Part. | |
int32_t | getValue () const |
Returns a value associated with this part. | |
UMessagePatternArgType | getArgType () const |
Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise UMSGPAT_ARG_TYPE_NONE. | |
UBool | operator== (const Part &other) const |
UBool | operator!= (const Part &other) const |
int32_t | hashCode () const |
Static Public Member Functions | |
static UBool | hasNumericValue (UMessagePatternPartType type) |
Indicates whether the Part type has a numeric value. | |
Friends | |
class | MessagePattern |
A message pattern "part", representing a pattern parsing event.
There is a part for the start and end of a message or argument, for quoting and escaping of and with ASCII apostrophes, and for syntax elements of "complex" arguments.
Definition at line 697 of file messagepattern.h.
MessagePattern::Part::Part | ( | ) | [inline] |
Default constructor, do not use.
Definition at line 703 of file messagepattern.h.
UMessagePatternArgType MessagePattern::Part::getArgType | ( | ) | const [inline] |
Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise UMSGPAT_ARG_TYPE_NONE.
Definition at line 759 of file messagepattern.h.
References UMSGPAT_ARG_TYPE_NONE, UMSGPAT_PART_TYPE_ARG_LIMIT, and UMSGPAT_PART_TYPE_ARG_START.
int32_t MessagePattern::Part::getIndex | ( | void | ) | const [inline] |
Returns the pattern string index associated with this Part.
Definition at line 719 of file messagepattern.h.
int32_t MessagePattern::Part::getLength | ( | void | ) | const [inline] |
Returns the length of the pattern substring associated with this Part.
This is 0 for some parts.
Definition at line 729 of file messagepattern.h.
int32_t MessagePattern::Part::getLimit | ( | ) | const [inline] |
Returns the pattern string limit (exclusive-end) index associated with this Part.
Convenience method for getIndex()+getLength().
Definition at line 739 of file messagepattern.h.
UMessagePatternPartType MessagePattern::Part::getType | ( | ) | const [inline] |
Returns the type of this part.
Definition at line 710 of file messagepattern.h.
int32_t MessagePattern::Part::getValue | ( | ) | const [inline] |
Returns a value associated with this part.
See the documentation of each part type for details.
Definition at line 749 of file messagepattern.h.
int32_t MessagePattern::Part::hashCode | ( | void | ) | const [inline] |
Definition at line 799 of file messagepattern.h.
static UBool MessagePattern::Part::hasNumericValue | ( | UMessagePatternPartType | type | ) | [inline, static] |
Indicates whether the Part type has a numeric value.
If so, then that numeric value can be retrieved via MessagePattern.getNumericValue().
type | The Part type to be tested. |
Definition at line 775 of file messagepattern.h.
References UMSGPAT_PART_TYPE_ARG_DOUBLE, and UMSGPAT_PART_TYPE_ARG_INT.
other | another object to compare with. |
Definition at line 791 of file messagepattern.h.
References operator==().
other | another object to compare with. |