aboutsummaryrefslogtreecommitdiff
path: root/cpp/src/rule.h
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/rule.h')
-rw-r--r--cpp/src/rule.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/cpp/src/rule.h b/cpp/src/rule.h
index 1286bcb..87948df 100644
--- a/cpp/src/rule.h
+++ b/cpp/src/rule.h
@@ -15,7 +15,7 @@
// An object to store address metadata, describing the addressing rules for
// regions and sub-regions. The address metadata format is documented here:
//
-// https://code.google.com/p/libaddressinput/wiki/AddressValidationMetadata
+// https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata
#ifndef I18N_ADDRESSINPUT_RULE_H_
#define I18N_ADDRESSINPUT_RULE_H_
@@ -110,6 +110,18 @@ class Rule {
return postal_code_name_message_id_;
}
+ // The message string identifier for locality name. If not set, then
+ // INVALID_MESSAGE_ID.
+ int GetLocalityNameMessageId() const {
+ return locality_name_message_id_;
+ }
+
+ // The message string identifier for sublocality name. If not set, then
+ // INVALID_MESSAGE_ID.
+ int GetSublocalityNameMessageId() const {
+ return sublocality_name_message_id_;
+ }
+
// Returns the name for the most specific place described by this rule, if
// there is one. This is typically set when it differs from the key.
const std::string& GetName() const { return name_; }
@@ -137,6 +149,8 @@ class Rule {
std::string sole_postal_code_;
int admin_area_name_message_id_;
int postal_code_name_message_id_;
+ int locality_name_message_id_;
+ int sublocality_name_message_id_;
std::string name_;
std::string latin_name_;
std::string postal_code_example_;