21 switch (to_name.
value()) {
22 case OKAY:
return "OKAY";
23 case NOT_IMPLEMENTED:
return "NOT_IMPLEMENTED";
24 case OUT_OF_RANGE:
return "OUT_OF_RANGE";
25 case NOT_FOUND:
return "NOT_FOUND";
26 case BAD_INPUT:
return "BAD_INPUT";
27 case BAD_TYPE:
return "BAD_TYPE";
28 case IS_FULL:
return "IS_FULL";
29 case IS_EMPTY:
return "IS_EMPTY";
30 case IS_NEW:
return "IS_NEW";
31 case EXISTING:
return "EXISTING";
32 case FAILURE:
return "FAILURE";
33 case OUT_OF_MEMORY:
return "OUT_OF_MEMORY";
34 case ACCESS_DENIED:
return "ACCESS_DENIED";
35 case IN_USE:
return "IN_USE";
36 case UNINITIALIZED:
return "UNINITIALIZED";
37 case TIMED_OUT:
return "TIMED_OUT";
38 case GARBAGE:
return "GARBAGE";
39 case NO_SPACE:
return "NO_SPACE";
40 case DISALLOWED:
return "DISALLOWED";
41 case INCOMPLETE:
return "INCOMPLETE";
42 case NO_HANDLER:
return "NO_HANDLER";
43 case NONE_READY:
return "NONE_READY";
44 case INVALID:
return "INVALID";
45 case PARTIAL:
return "PARTIAL";
46 case NO_LICENSE:
return "NO_LICENSE";
47 case UNEXPECTED:
return "UNEXPECTED";
48 case ENCRYPTION_MISMATCH:
return "ENCRYPTION_MISMATCH";
49 default:
return "UNKNOWN_OUTCOME";
static const char * outcome_name(const outcome &to_name)
Returns a string representation of the outcome "to_name".
Outcomes describe the state of completion for an operation.
The guards collection helps in testing preconditions and reporting errors.