Constraints


The class os_element_group is the main container class used to construct Web pages. This class is constrained by a rule set that can be enabled, disabled, or modified at runtime. Constraint checking is disabled by default.

Constraints are enabled, disabled, and queried through the static member functions enable_constraints() , disable_constraints() , and constraints_enabled() .

Constraint rules can be modified with static member functions. A constraint rule may be added through the static member function add_constraint() , or deleted through the static member function delete_constraint() .

Constraint checking is performed when an os_element_group is converted to HTML through either print() or operator<< . When an element violates the constraint rules for the os_element_group in which it is contained, the element is not printed. Instead, the virtual function report_constraint_violation() is invoked to send the violation to the HTML output stream to which the element would have been printed.

This appendix contains two tables that provide different views of the constraints rules set.

Valid Elements for Element Groups

Valid Element Groups for Elements


Copyright©1994-2026 Recursion Software LLC
All Rights Reserved