Navigation: Up, Table of Contents, Bibliography, Index, Title Page

Class Flavored_object<O>

Definition

The class Flavored_object<O> is a templated class that is derived from the class of its template argument. It adds a flavor to the object and provides member functions for flavor enhancement and for checking the validity of the flavor, as well as functions for setting and retrieving the flavor of the object.

#include <CEP/Vanilla/Flavored_object.h>

Creation

Flavored_object<O> fo;
an unflavored empty object fo


Flavored_object<O> fo ( Flavor f);
fo is an empty object with flavor f


Flavored_object<O> fo ( Object o);
fo is a VANILLA object with value o


Flavored_object<O> fo ( Object o, Flavor f);
fo is an object with value o and flavor f

Operations

void fo.set_flavor ( Flavor f)
makes fo an object with flavor f
Precondition: f must be a valid flavor

void fo.enhance_flavor ()
enhances fo's flavor

bool fo.is_valid () determines if fo's flavor is valid

Flavor fo.flavor () retrieves fo's flavor


Navigation: Up, Table of Contents, Bibliography, Index, Title Page
Irene. Tue, September 14, 1999.