class Bindgen::Processor::SanityCheck
- Bindgen::Processor::SanityCheck
- Bindgen::Processor::Base
- Reference
- Object
Overview
Does sanity-checks on the graph.  If any check fails, a message written to
STDERR and the process is exited.
Checks are as follows:
- Name of enums, libs, structures, classes, modules and aliases are valid
- Name of methods are valid
- Enumerations have at least one constant
- Enumeration constants are correctly named
- Flag-enumerations don't have AllnorNoneconstants
- Method arguments and result types are reachable
- Variadic methods are directly bound
- Alias targets are reachable
- Class base-classes are reachable
Defined in:
bindgen/processor/sanity_check.crConstant Summary
- 
        CAMEL_CASE_RX = /^[A-Z_][A-Za-z0-9_]*$/
- 
        Regular expression for a camel-cased symbol 
- 
        CONSTANT_RX = /^[A-Z_][A-Z0-9_]*$/
- 
        Regular expression for a CONSTANT 
- 
        ILLEGAL_FLAG_ENUM = {"All", "None"}
- 
        Illegal constants in a flag enumeration 
- 
        METHOD_NAME_RX = /^[a-z_][A-Za-z0-9_]*[?!=]?$/
- 
        Regular expression describing a method name 
Constructors
Instance Method Summary
- #process(*_args)
- 
        #visit_enum(enumeration)
        
          Check enumeration constants 
- 
        #visit_library(library)
        
          Temporarily switch the platform. 
- 
        #visit_node(node)
        
          Check for correct naming of nodes. 
- 
        #visit_platform_specific(specific)
        
          Only visit non-C++ specifics