1// Copyright (C) 2014 Google Inc. 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14// 15// Post office box regular expressions. 16 17#ifndef I18N_ADDRESSINPUT_POST_BOX_MATCHERS_H_ 18#define I18N_ADDRESSINPUT_POST_BOX_MATCHERS_H_ 19 20#include <libaddressinput/util/basictypes.h> 21 22#include <vector> 23 24namespace i18n { 25namespace addressinput { 26 27class Rule; 28struct RE2ptr; 29 30class PostBoxMatchers { 31 public: 32 // Returns pointers to RE2 regular expression objects to test address lines 33 // for those languages that are relevant for |country_rule|. 34 static std::vector<const RE2ptr*> GetMatchers(const Rule& country_rule); 35 36 private: 37 DISALLOW_COPY_AND_ASSIGN(PostBoxMatchers); 38}; 39 40} // namespace addressinput 41} // namespace i18n 42 43#endif // I18N_ADDRESSINPUT_POST_BOX_MATCHERS_H_ 44