next up previous contents
Next: Include files Up: interface.ccl Previous: interface.ccl   Contents

Header block

The header block has the form:
implements: <implementation>
inherits: <implementation>, <implementation>
friend: <implementation>, <implementation>
where
  • The implementation name must be unique among all thorns, except between thorns which have the same public and protected variables and global and restricted parameters.
  • Inheriting from another implementation makes all that implementation's public variables available to your thorn. At least one thorn providing any inherited implementation must be present at compile time. A thorn cannot inherit from itself. Inheritance is transitive (if 49#49 inherits from 50#50, and 50#50 inherits from 51#51, then 49#49 also implicitly inherits from 51#51), but not commutative.
  • Being a friend of another implementation makes all that implementation's protected variables available to your thorn. At least one thorn providing an implementation for each friend must be present at compile time. A thorn cannot be its own friend. Friendship is associative, commutative and transitive (i.e. if 49#49 is a friend of 50#50 and 50#50 is a friend of 51#51, then 49#49 is implicitly a friend of 51#51).


next up previous contents
Next: Include files Up: interface.ccl Previous: interface.ccl   Contents