Context.h file Reference
Skittle Color Sorter

file Context.h

(Global Variables) This file is to provide access to some of the useful macros and global variables. This static class is the base class for all the components used in this project.

define

  • COLORS_DEFINITION
  • Calibrated Skittle's Colors. All the colors are defined here. This macro will later be used to populate some arrays by changing the COLOR_DEF to retrive only needed data.
  • COLOR_DEF
  • This macro is retrive only the Identifier from the colors definition to generate the enum colorResult.
  • COLOR_LIST_SIZE
  • The size of the color list. This is also equal to the number of items in the enum colorResult.
  • HAS_RESULT
  • A macro function to check if the result is a valid color.

enum

  • colorResult
  • This type represents a color's result. Note it not only can be a valid Skittle's color, but it also can be some invalid values.

Top