Lines Matching +full:bool +full:- +full:property
1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
8 * Cambridge Computer Laboratory under DARPA/AFRL contract (FA8750-10-C-0237)
68 bool visit_node(device_tree *tree, const node_ptr &n);
89 virtual bool check_node(device_tree *, const node_ptr &) in check_node()
94 * Method for checking that a property is valid. The root class
97 virtual bool check_property(device_tree *, const node_ptr &, property_ptr ) in check_property()
104 bool check_tree(fdt::device_tree *tree) in check_tree()
106 return visit_node(tree, tree->get_root()); in check_tree()
111 * Abstract base class for simple property checks. This class defines a check
112 * method for subclasses, which is invoked only when it finds a property with
113 * the matching name. To define simple property checkers, just subclass this
119 * The name of the property that this checker is looking for.
124 * Implementation of the generic property-checking method that checks
125 * for a property with the name specified in the constructor.
127 virtual bool check_property(device_tree *tree, const node_ptr &n, property_ptr p);
130 * property to check.
137 virtual bool check(device_tree *tree, const node_ptr &n, property_ptr p) = 0;
141 * Property type checker.
148 * property to check as arguments.
152 virtual bool check(device_tree *tree, const node_ptr &n, property_ptr p) = 0;
156 * Empty property checker. This checks that the property has no value.
163 virtual bool check(device_tree *, const node_ptr &, property_ptr p) in check()
165 return p->begin() == p->end(); in check()
170 * String property checker. This checks that the property has exactly one
178 virtual bool check(device_tree *, const node_ptr &, property_ptr p) in check()
180 return (p->begin() + 1 == p->end()) && p->begin()->is_string(); in check()
184 * String list property checker. This checks that the property has at least
193 virtual bool check(device_tree *, const node_ptr &, property_ptr p) in check()
195 for (property::value_iterator i=p->begin(),e=p->end() ; i!=e ; in check()
198 if (!(i->is_string() || i->is_string_list())) in check()
203 return p->begin() != p->end(); in check()
208 * Phandle property checker. This checks that the property has exactly one
216 virtual bool check(device_tree *tree, const node_ptr &, property_ptr p) in check()
218 return (p->begin() + 1 == p->end()) && in check()
219 (tree->referenced_node(*p->begin()) != 0); in check()
224 * Check that a property has the correct size.
229 * The expected size of the property.
234 * Constructor, takes the name of the checker, the name of the property
242 * Check, validates that the property has the correct size.
244 virtual bool check(device_tree *tree, const node_ptr &n, property_ptr p);
250 * default checks to be enabled, non-default checks to be enabled, and so on.
266 * Helper function for adding a property value checker.
275 * Helper function for adding a property value checker.
293 bool run_checks(device_tree *tree, bool keep_going);
297 bool disable_checker(const std::string &name);
301 bool enable_checker(const std::string &name);