feisty meow concerns codebase  2.140
outcome.h File Reference
#include "definitions.h"
Include dependency graph for outcome.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  basis::outcome
 Outcomes describe the state of completion for an operation. More...
 

Namespaces

 basis
 The guards collection helps in testing preconditions and reporting errors.
 

Macros

#define PROMOTE_OUTCOME(outc)    if (outc != common::OKAY) return outc
 checks if the outcome indicates non-okay completion and returns it if so. More...
 
#define DEFINE_OUTCOME(NAME, CURRENT_VALUE, INFO_STRING)    NAME = CURRENT_VALUE
 Provides a way to define auto-generated outcome values. More...
 
#define DEFINE_API_OUTCOME(NAME, CURRENT_VALUE, INFO_STRING)    NAME = CURRENT_VALUE
 Similar to standard outcomes (above), but these cannot be auto-incremented. More...
 

Macro Definition Documentation

◆ DEFINE_API_OUTCOME

#define DEFINE_API_OUTCOME (   NAME,
  CURRENT_VALUE,
  INFO_STRING 
)     NAME = CURRENT_VALUE

Similar to standard outcomes (above), but these cannot be auto-incremented.

This macro specifies an outcome definition where the value is constant, because it must participate in a network API. Standard outcomes are just return values from method calls signifying completion, but the API style outcomes can be used to describe remote procedural invocations. Thus, once they are established with unique values, those values cannot change.

Definition at line 90 of file outcome.h.

◆ DEFINE_OUTCOME

#define DEFINE_OUTCOME (   NAME,
  CURRENT_VALUE,
  INFO_STRING 
)     NAME = CURRENT_VALUE

Provides a way to define auto-generated outcome values.

This macro provides a way to mark our outcome values so that parsers can find all of them when needed. NOTE: do not use the macro in CPP files; it's only for headers. if you define outcomes in CPP files, they will not be added to the build manifest, nor will they be guaranteed to be unique or auto-generated.

Definition at line 80 of file outcome.h.

◆ PROMOTE_OUTCOME

#define PROMOTE_OUTCOME (   outc)     if (outc != common::OKAY) return outc

checks if the outcome indicates non-okay completion and returns it if so.

Definition at line 68 of file outcome.h.