Home | History | Annotate | Download | only in src

Lines Matching refs:ruleset

47 class Ruleset {
49 // Builds a ruleset for |field| with a region-wide |rule| in the default
52 Ruleset(AddressField field, scoped_ptr<Rule> rule);
54 ~Ruleset();
56 // Returns the parent ruleset. This is NULL until this ruleset has been passed
58 // a country-level ruleset.
59 Ruleset* parent() const { return parent_; }
61 // Returns the field type for this ruleset.
64 // Returns the region-wide rule for this ruleset in the default language of
68 // Adds the |ruleset| for |sub_region| and sets this to be its parent. A
69 // |sub_region| should be added at most once. The |ruleset| should not be
72 // The field of the |ruleset| parameter must be exactly one smaller than the
73 // field of this ruleset. For example, a COUNTRY ruleset can contain
76 scoped_ptr<Ruleset> ruleset);
86 Ruleset* GetSubRegionRuleset(const std::string& sub_region) const;
94 const std::map<std::string, Ruleset*>& GetSubRegionRulesets() const {
99 // on a COUNTRY level ruleset.
105 // Returns the deepest possible ruleset level for this country. Must be called
106 // on a COUNTRY level ruleset. Must be called after BuildPrefixSearchIndex()
117 // Should be called only on a COUNTRY level ruleset. Should be called only
126 std::set<const Ruleset*>* result) const;
130 typedef std::map<Rule::IdentityField, Trie<const Ruleset*>*>
139 // Adds all children of |parent_ruleset| into |tries_| of this ruleset. Should
140 // be called only on a COUNTRY level ruleset.
141 void AddSubRegionRulesetsToTrie(const Ruleset& parent_ruleset);
144 // rule. Has data only in a COUNTRY level ruleset. Owns the map and trie
145 // objects. Does not own the ruleset objects.
151 // The parent ruleset of this object. The parent ruleset owns this object.
152 Ruleset* parent_;
154 // The field of this ruleset.
157 // The deepest possible ruleset level for this country. Set in
159 // COUNTRY level ruleset.
166 std::map<std::string, Ruleset*> sub_regions_;
171 DISALLOW_COPY_AND_ASSIGN(Ruleset);