BSDL Device Tree Compiler
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator
Public Member Functions | Protected Member Functions | List of all members
dtc::fdt::checking::checker Class Reference
Inheritance diagram for dtc::fdt::checking::checker:
dtc::fdt::checking::property_checker dtc::fdt::checking::property_size_checker dtc::fdt::checking::property_type_checker< T > dtc::fdt::checking::property_type_checker< property_value::EMPTY > dtc::fdt::checking::property_type_checker< property_value::PHANDLE > dtc::fdt::checking::property_type_checker< property_value::STRING > dtc::fdt::checking::property_type_checker< property_value::STRING_LIST >

Public Member Functions

 checker (const char *name)
 
virtual bool check_node (device_tree *tree, node *n)
 
virtual bool check_property (device_tree *tree, node *n, property *p)
 
bool check_tree (fdt::device_tree *tree)
 

Protected Member Functions

void report_error (const char *errmsg)
 

Detailed Description

Base class for all checkers. This will visit the entire tree and perform semantic checks defined in subclasses. Note that device trees are generally small (a few dozen nodes at most) and so we optimise for flexibility and extensibility here, not for performance. Each checker will visit the entire tree.

Constructor & Destructor Documentation

dtc::fdt::checking::checker::checker ( const char *  name)
inline

Constructor. Takes the name of this checker, which is which is used when reporting errors.

Member Function Documentation

virtual bool dtc::fdt::checking::checker::check_node ( device_tree tree,
node n 
)
inlinevirtual

Method for checking that a node is valid. The root class version does nothing, subclasses should override this.

virtual bool dtc::fdt::checking::checker::check_property ( device_tree tree,
node n,
property p 
)
inlinevirtual

Method for checking that a property is valid. The root class version does nothing, subclasses should override this.

Reimplemented in dtc::fdt::checking::property_checker.

bool dtc::fdt::checking::checker::check_tree ( fdt::device_tree tree)
inline

Runs the checker on the specified device tree.

void dtc::fdt::checking::checker::report_error ( const char *  errmsg)
inlineprotected

Prints the error message, along with the path to the node that caused the error and the name of the checker.


The documentation for this class was generated from the following file: