|
///////////////////////////////////////////////////////////////////////////////
// MyEnums.cpp: This file implements a set of enumerations
///////////////////////////////////////////////////////////////////////////////
#include "MyEnums.h"
// the EWeekdays implementation
BEGIN_ENUM_IMPLEMENTATION(Weekdays)
ENUM_ENTRY(EWeekdays::SUNDAY, "Sunday")
ENUM_ENTRY(EWeekdays::MONDAY, "Monday")
ENUM_ENTRY(EWeekdays::TUESDAY, "Tuesday")
ENUM_ENTRY(EWeekdays::WEDNESDAY, "Wednesday")
ENUM_ENTRY(EWeekdays::THURSDAY, "Thursday")
ENUM_ENTRY(EWeekdays::FRIDAY, "Friday")
ENUM_ENTRY(EWeekdays::SATURDAY, "Saturday")
END_ENUM_IMPLEMENTATION(Weekdays)
// the EFruits implementation
BEGIN_ENUM_IMPLEMENTATION(Fruits)
ENUM_ENTRY(EFruits::APPLE, "Apple")
ENUM_ENTRY(EFruits::ORANGE, "Orange")
ENUM_ENTRY(EFruits::GRAPE, "Grape")
ENUM_ENTRY(EFruits::BANANA, "Banana")
ENUM_ENTRY_DATA(EFruits::KIWI, "Kiwi", 1)
END_ENUM_IMPLEMENTATION(Fruits)
// the EFoodGroups implementation
BEGIN_ENUM_IMPLEMENTATION(FoodGroups)
ENUM_ENTRY(EFoodGroups::GRAIN, "Grain")
ENUM_ENTRY(EFoodGroups::MEAT, "Meat")
ENUM_ENTRY(EFoodGroups::FRUIT, "Fruit")
ENUM_ENTRY(EFoodGroups::VEGETABLE, "Vegetable")
END_ENUM_IMPLEMENTATION(FoodGroups)
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I started programming at 15 with a TI-82 calclator in Z80 assembly (oh, those were the days . . .) I am pretty much a self taught programmer. I've taught myself Visual Basic, C/C++, Java, and am currently working on C#. I also like to experiment with system administration and security issues, and occassionally I work on web design. For the last 4 years, I have worked for Leitch, Inc. as a Software Engineer and graduated from Old Dominion University with bachelor's degrees in Computer Science, Mathematics, and Business Management in December of 2004.