Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 528 Bytes

mutable-signed.md

File metadata and controls

28 lines (21 loc) · 528 Bytes
description
Adds a signed setter

Mutable signed

This extension defines a mutable value. The action to change its value must be signed by roles passed as argument.

{% code title="mutable_signed.arlx" %}

archetype extension mutable_signed (

  variable[%mutable_signed roles cond%] avariable type

) = {

  action[%signedbyall roles%] set_<%avariable> (newvariable : type) = {
    require { 
      set_<%avariable>_c1 : cond
    }
    effect {
      avariable := newvariable
    }
  }
}

{% endcode %}