mirror of https://github.com/CGAL/cgal
177 lines
5.3 KiB
HTML
177 lines
5.3 KiB
HTML
<!-- Begin of cc_manual_header -->
|
|
<!-- ------------------------- -->
|
|
<!-- $Id$ -->
|
|
<!-- $Date$ -->
|
|
|
|
<!-- CC manual page automatically extracted from a TeX specification -->
|
|
<!-- in file main.html -->
|
|
<!-- by cc_extract_html, $Id$. -->
|
|
|
|
<!-- Title -->
|
|
<HEAD>
|
|
<TITLE>Vanilla: A CEP Example: </TITLE>
|
|
</HEAD>
|
|
|
|
<!-- Background layout-->
|
|
<BODY BGCOLOR="FAF8E8" TEXT="#000000">
|
|
|
|
<!-- Navigation -->
|
|
<STRONG>Navigation:</STRONG>
|
|
<A HREF="main.html">Up</A>,
|
|
<A HREF="contents.html">Table of Contents</A>,
|
|
<A HREF="biblio.html">Bibliography</A>,
|
|
<A HREF="manual_index.html">Index</A>,
|
|
<A HREF="title.html">Title Page</A>
|
|
<HR>
|
|
|
|
<!-- End of cc_manual_header -->
|
|
|
|
<A NAME="Cross_link_anchor_0"></A>
|
|
|
|
<A NAME="Index_anchor_0"></A>
|
|
|
|
<H2>Class <I>Flavored_object<O></I></H2>
|
|
<A NAME="ccRef_Flavored_object<O>"></A>
|
|
|
|
<A NAME="pageFlavoredObject"></A>
|
|
<P>
|
|
|
|
<H3>Definition</H3>
|
|
<P>
|
|
|
|
The class <I><A HREF="Class_Flavored_object.html#Cross_link_anchor_0">Flavored_object</A><O></I> 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.
|
|
<P>
|
|
|
|
<I>#include <<A HREF="../include/CEP/Vanilla/Flavored_object.h">CEP/Vanilla/Flavored_object.h</A>></I>
|
|
<P>
|
|
|
|
<H3>Creation</H3>
|
|
<P>
|
|
|
|
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0 WIDTH=650>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=100% NOWRAP COLSPAN=2>
|
|
<I><NOBR>
|
|
<A HREF="Class_Flavored_object.html#Cross_link_anchor_0">Flavored_object</A><O> fo;
|
|
</I></NOBR>
|
|
</TD></TR><TR><TD WIDTH=30% NOWRAP></TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=70%>
|
|
an unflavored empty object <I>fo</I>
|
|
<P>
|
|
|
|
</TD></TR>
|
|
<TR><TD><BR></TD></TR>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=100% NOWRAP COLSPAN=2>
|
|
<I><NOBR>
|
|
<A HREF="Class_Flavored_object.html#Cross_link_anchor_0">Flavored_object</A><O> fo ( <A HREF="main.html#Enum_Flavor">Flavor</A> f);
|
|
</I></NOBR>
|
|
</TD></TR><TR><TD WIDTH=30% NOWRAP></TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=70%>
|
|
<I>fo</I> is an empty object with flavor <I>f</I>
|
|
<P>
|
|
|
|
</TD></TR>
|
|
<TR><TD><BR></TD></TR>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=100% NOWRAP COLSPAN=2>
|
|
<I><NOBR>
|
|
<A HREF="Class_Flavored_object.html#Cross_link_anchor_0">Flavored_object</A><O> fo ( Object o);
|
|
</I></NOBR>
|
|
</TD></TR><TR><TD WIDTH=30% NOWRAP></TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=70%>
|
|
<I>fo</I> is a <A HREF="main.html#Enum_Flavor">VANILLA</A> object with value <I>o</I>
|
|
<P>
|
|
|
|
</TD></TR>
|
|
<TR><TD><BR></TD></TR>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=100% NOWRAP COLSPAN=2>
|
|
<I><NOBR>
|
|
<A HREF="Class_Flavored_object.html#Cross_link_anchor_0">Flavored_object</A><O> fo ( Object o, <A HREF="main.html#Enum_Flavor">Flavor</A> f);
|
|
</I></NOBR>
|
|
</TD></TR><TR><TD WIDTH=30% NOWRAP></TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=70%>
|
|
<I>fo</I> is an object with value <I>o</I> and flavor <I>f</I>
|
|
<P>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<P>
|
|
|
|
<H3>Operations</H3>
|
|
<P>
|
|
|
|
<TABLE BORDER=0 CELLSPACING=2 CELLPADDING=0 WIDTH=650>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=25% NOWRAP>
|
|
<I><NOBR>
|
|
void
|
|
</I></NOBR>
|
|
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=75% NOWRAP COLSPAN=2>
|
|
<I><NOBR>
|
|
fo.set_flavor ( <A HREF="main.html#Enum_Flavor">Flavor</A> f)
|
|
</I></NOBR>
|
|
</TR><TR><TD WIDTH=25% NOWRAP></TD><TD WIDTH=25% NOWRAP></TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=50%>
|
|
makes <I>fo</I> an object with flavor <I>f</I><BR>
|
|
|
|
<EM>Precondition: </EM><I>f</I> must be a valid flavor
|
|
</TD></TR>
|
|
<TR><TD><BR></TD></TR>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=25% NOWRAP>
|
|
<I><NOBR>
|
|
void
|
|
</I></NOBR>
|
|
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=75% NOWRAP COLSPAN=2>
|
|
<I><NOBR>
|
|
fo.enhance_flavor ()
|
|
</I></NOBR>
|
|
</TR><TR><TD WIDTH=25% NOWRAP></TD><TD WIDTH=25% NOWRAP></TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=50%>
|
|
enhances <I>fo</I>'s flavor
|
|
</TD></TR>
|
|
<TR><TD><BR></TD></TR>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=25% NOWRAP>
|
|
<I><NOBR>
|
|
bool
|
|
</I></NOBR>
|
|
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=25% NOWRAP>
|
|
<I><NOBR>
|
|
fo.is_valid ()
|
|
</I></NOBR>
|
|
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=50%>
|
|
determines if <I>fo</I>'s flavor is valid
|
|
</TD></TR>
|
|
<TR><TD><BR></TD></TR>
|
|
<TR><TD ALIGN=LEFT VALIGN=TOP WIDTH=25% NOWRAP>
|
|
<I><NOBR>
|
|
<A HREF="main.html#Enum_Flavor">Flavor</A>
|
|
</I></NOBR>
|
|
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=25% NOWRAP>
|
|
<I><NOBR>
|
|
fo.flavor ()
|
|
</I></NOBR>
|
|
</TD><TD ALIGN=LEFT VALIGN=TOP WIDTH=50%>
|
|
retrieves <I>fo</I>'s flavor
|
|
</TD></TR>
|
|
</TABLE>
|
|
<P>
|
|
|
|
<!-- Begin of cc_manual_footer -->
|
|
<!-- ------------------------- -->
|
|
<!-- $Id$ -->
|
|
<!-- $Date$ -->
|
|
|
|
<!-- Navigation -->
|
|
<HR>
|
|
<STRONG>Navigation:</STRONG>
|
|
<A HREF="main.html">Up</A>,
|
|
<A HREF="contents.html">Table of Contents</A>,
|
|
<A HREF="biblio.html">Bibliography</A>,
|
|
<A HREF="manual_index.html">Index</A>,
|
|
<A HREF="title.html">Title Page</A>
|
|
<HR>
|
|
|
|
<address>
|
|
Irene. Tue, September 14, 1999.
|
|
</address>
|
|
</BODY>
|
|
</HTML>
|
|
|
|
<!-- End of cc_manual_footer -->
|