LibCarna Version 3.4.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
LibCarna::base::RotatingColor Class Reference

Supplies colors from a predefined, distinctive palette. More...

#include <RotatingColor.hpp>

Public Types

enum  ColorIdentifier {
  blue = ( 1 << 0 ) , green = ( 1 << 1 ) , red = ( 1 << 2 ) , orange = red | green ,
  teal = green | blue , violet = red | blue , white = red | green | blue
}
 Identifies supported colors. More...
 

Public Member Functions

 RotatingColor (ColorIdentifier initialColor=blue)
 Instantiates.
 
RotatingColoroperator++ ()
 Pre-increments the color.
 
RotatingColor operator++ (int)
 Post-increments the color.
 
 operator const Color & () const
 Tells current color.
 
void reset ()
 Resets s.t. the current color becomes the initial again.
 

Public Attributes

const ColorIdentifier initialColor
 Holds the initial color.
 

Detailed Description

Supplies colors from a predefined, distinctive palette.

Author
Leonid Kostrykin

Definition at line 43 of file RotatingColor.hpp.

Member Enumeration Documentation

◆ ColorIdentifier

Identifies supported colors.

Enumerator
blue 

Identifies blue.

green 

Identifies green.

red 

Identifies red.

orange 

Identifies orange.

teal 

Identifies teal.

violet 

Identifies violet.

white 

Identifies white.

Definition at line 51 of file RotatingColor.hpp.

Member Function Documentation

◆ operator const Color &()

LibCarna::base::RotatingColor::operator const Color & ( ) const
inline

Tells current color.

Definition at line 91 of file RotatingColor.hpp.

◆ operator++()

RotatingColor LibCarna::base::RotatingColor::operator++ ( int  )
inline

Post-increments the color.

Definition at line 81 of file RotatingColor.hpp.

Member Data Documentation

◆ initialColor

const ColorIdentifier LibCarna::base::RotatingColor::initialColor

Holds the initial color.

Definition at line 71 of file RotatingColor.hpp.


The documentation for this class was generated from the following file: