.TH D__REPETITION 2 "14 September 1993" "Demeter" "Demeter Software" .SH NAME D__repetition \- Interface for class D__repetition .SH DESCRIPTION D__repetition is a class template used to define repetition classes. D__repetition is defined as an abstract class template, which means its methods are not fully implemented. To define a repetition class, a user must inherit from an instantiation of one of the concrete subclasses of D__repetition, e.g., D__linked_list. Assuming template class D__repetition, the following methods are available to users of class D__repetition. .TP 10 .I virtual D__repetition* add( R* ob ) = 0; Returns a new repetition with ob added. .TP .I int empty(); Returns TRUE or FALSE, depending on whether the repetition has size 0 or not. .TP .I virtual char* g_code( int&,ofstream& ) const = 0; .TP .I virtual D__universal* g_copy() const = 0; .TP .I virtual void g_draw() = 0; .TP .I virtual int g_equal( D__universal* ) const = 0; .TP .I virtual D__repetition* join( D__repetition* other ); Returns a new repetition that contains all the the elements of other and the current repetition. .TP .I virtual R* member( R* ob ) = 0; If ob is contained in the repetition, return ob, otherwise NULL. .TP .I virtual D__repetition* member_if( R* ob,int (*compare)(R*,R*) ) = 0; Returns a repetition containing all elements e for which compare( e,ob ) returns TRUE. .TP .I virtual D__repetition* member_if( int (*compare)(R*) ) = 0; Returns a repetition containing all elements e for which compare( e ) returns TRUE. .TP .I virtual D__repetition* remove( R* ob ); Returns a new repetition with ob removed. .TP .I virtual D__repetition* remove_if( R* ob,int (*compare)(R*,R*) ); Returns a new repetition with every element e removed such that compare( e,ob ) returns TRUE. .TP .I virtual int size() = 0; Returns the number of elements in the repetition.