category

flags

Implementation of persistent object flags.

author:
Theofrastos Mantadelis
version:
1.0
date:
2010/11/27
compilation flags:
static

(no dependencies on other files)

Public interface

get_flag_value/2

Gets or tests the value of a flag.

compilation flags:
static
template:
get_flag_value(Flag,Value)
mode – number of proofs:
get_flag_value(+atom,?nonvar) – zero_or_one

set_flag_value/2

Sets the value of a flag.

compilation flags:
static
template:
set_flag_value(Flag,NewValue)
mode – number of proofs:
set_flag_value(+atom,@nonvar) – one

set_flag_value/3

Sets the value of a flag, returning the old value.

compilation flags:
static
template:
set_flag_value(Flag,OldValue,NewValue)
mode – number of proofs:
set_flag_value(+atom,?nonvar,@nonvar) – one

reset_flags/0

Resets all flags to their default values.

compilation flags:
static
mode – number of proofs:
reset_flags – one

reset_flags/1

Resets all flags in a group to their default values.

compilation flags:
static
template:
reset_flags(Group)
mode – number of proofs:
reset_flags(+atom) – one

flag_groups/1

Returns a list of all flag groups.

compilation flags:
static
template:
flag_groups(Groups)
mode – number of proofs:
flag_groups(-list(atom)) – one

flag_group_chk/1

Checks if a given atom is a flag group.

compilation flags:
static
template:
flag_group_chk(Group)
mode – number of proofs:
flag_group_chk(+atom) – zero_or_one

Prints a listing of all flags.

compilation flags:
static
mode – number of proofs:
print_flags – one

Prints a listing of all flags in a group.

compilation flags:
static
template:
print_flags(Group)
mode – number of proofs:
print_flags(+atom) – one

defined_flag/6

Gets or test the existing (visible) flag definitions.

compilation flags:
static
template:
defined_flag(Flag,Group,Type,DefaultValue,Description,Access)
mode – number of proofs:
defined_flag(?atom,?atom,?nonvar,?nonvar,?atom,?atom) – zero_or_more

built_in_flag/2

True if the argument is a built-in flag type with the specified default value.

compilation flags:
static
template:
built_in_flag(Type,DefaultValue)
mode – number of proofs:
built_in_flag(?atom,?nonvar) – zero_or_more

Protected interface

unsafe_set_flag_value/2

Sets the value of a flag without performing any validation checks.

compilation flags:
static
template:
unsafe_set_flag_value(Flag,NewValue)
mode – number of proofs:
unsafe_set_flag_value(+atom,@nonvar) – one

define_flag/1

Defines a new flag using default options.

compilation flags:
static
template:
define_flag(Flag)
mode – number of proofs:
define_flag(+atom) – one

define_flag/2

Defines a new flag using a given set of options (for example, [group(general), type(nonvar), default(true), description(Flag), access(read_write)]).

compilation flags:
static
template:
define_flag(Flag,Options)
mode – number of proofs:
define_flag(+atom,@list) – one

Private predicates

defined_flag_/6

Gets or test the existing flag definitions.

compilation flags:
dynamic
template:
defined_flag_(Flag,Group,Type,DefaultValue,Description,Access)
mode – number of proofs:
defined_flag_(?atom,?atom,?nonvar,?nonvar,?atom,?atom) – zero_or_more

flag_value_/2

Table of flag values.

compilation flags:
dynamic
template:
flag_value_(Flag,Value)
mode – number of proofs:
flag_value_(?atom,?nonvar) – zero_or_more

validate/3

compilation flags:
static

validate_type/1

compilation flags:
static

is_validator/1

compilation flags:
static

Operators

(none)

Remarks

(none)