ICU 4.8.1.1  4.8.1.1
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions | Friends
MessagePattern::Part Class Reference

A message pattern "part", representing a pattern parsing event. More...

#include <messagepattern.h>

Inheritance diagram for MessagePattern::Part:
UMemory

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

Detailed Description

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.

Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 697 of file messagepattern.h.


Constructor & Destructor Documentation

Default constructor, do not use.

Internal:
Do not use. This API is for internal use only.

Definition at line 703 of file messagepattern.h.


Member Function Documentation

Returns the argument type if this part is of type ARG_START or ARG_LIMIT, otherwise UMSGPAT_ARG_TYPE_NONE.

Returns:
the argument type for this part.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

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.

Returns:
this part's pattern string index.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

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.

Returns:
this part's pattern string index.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 729 of file messagepattern.h.

Returns the pattern string limit (exclusive-end) index associated with this Part.

Convenience method for getIndex()+getLength().

Returns:
this part's pattern string limit index, same as getIndex()+getLength().
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 739 of file messagepattern.h.

Returns the type of this part.

Returns:
the part type.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 710 of file messagepattern.h.

Returns a value associated with this part.

See the documentation of each part type for details.

Returns:
the part value.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 749 of file messagepattern.h.

int32_t MessagePattern::Part::hashCode ( void  ) const [inline]
Returns:
A hash code for this object.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 799 of file messagepattern.h.

Indicates whether the Part type has a numeric value.

If so, then that numeric value can be retrieved via MessagePattern.getNumericValue().

Parameters:
typeThe Part type to be tested.
Returns:
TRUE if the Part type has a numeric value.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 775 of file messagepattern.h.

References UMSGPAT_PART_TYPE_ARG_DOUBLE, and UMSGPAT_PART_TYPE_ARG_INT.

UBool MessagePattern::Part::operator!= ( const Part other) const [inline]
Parameters:
otheranother object to compare with.
Returns:
FALSE if this object is equivalent to the other one.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

Definition at line 791 of file messagepattern.h.

References operator==().

UBool MessagePattern::Part::operator== ( const Part other) const
Parameters:
otheranother object to compare with.
Returns:
TRUE if this object is equivalent to the other one.
Draft:
This API may be changed in the future versions and was introduced in ICU 4.8

The documentation for this class was generated from the following file:
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Friends Defines