D__REPETITION(2) Demeter Software D__REPETITION(2) NAME D__repetition - Interface for class D__repetition DESCRIPTION D__repetition is a class template used to define repetition classes. D__repetition is defined as an abstract class tem- plate, 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 follow- ing methods are available to users of class D__repetition. _v_i_r_t_u_a_l _D___r_e_p_e_t_i_t_i_o_n<_R>* _a_d_d( _R* _o_b ) Returns a new repetition with ob added. _i_n_t _e_m_p_t_y(); Returns TRUE or FALSE, depending on whether the repetition has size 0 or not. _v_i_r_t_u_a_l _c_h_a_r* _g__c_o_d_e( _i_n_t&,_o_f_s_t_r_e_a_m& ) _c_o_n_s_t _v_i_r_t_u_a_l _D___u_n_i_v_e_r_s_a_l* _g__c_o_p_y() _c_o_n_s_t = _0; _v_i_r_t_u_a_l _v_o_i_d _g__d_r_a_w() = _0; _v_i_r_t_u_a_l _i_n_t _g__e_q_u_a_l( _D___u_n_i_v_e_r_s_a_l* ) _c_o_n_s_t _v_i_r_t_u_a_l _D___r_e_p_e_t_i_t_i_o_n<_R>* _j_o_i_n( _D___r_e_p_e_t_i_t_i_o_n<_R>* _o_t_h_e_r ); Returns a new repetition that contains all the the elements of other and the current repetition. _v_i_r_t_u_a_l _R* _m_e_m_b_e_r( _R* _o_b ) If ob is contained in the repetition, return ob, otherwise NULL. _v_i_r_t_u_a_l _D___r_e_p_e_t_i_t_i_o_n<_R>* _m_e_m_b_e_r__i_f( _R* _o_b,_i_n_t (*_c_o_m_p_a_r_e)(_R*,_R*) Returns a repetition containing all elements e for which compare( e,ob ) returns TRUE. _v_i_r_t_u_a_l _D___r_e_p_e_t_i_t_i_o_n<_R>* _m_e_m_b_e_r__i_f( _i_n_t (*_c_o_m_p_a_r_e)(_R*) ) Returns a repetition containing all elements e for which compare( e ) returns TRUE. _v_i_r_t_u_a_l _D___r_e_p_e_t_i_t_i_o_n<_R>* _r_e_m_o_v_e( _R* _o_b ); Returns a new repetition with ob removed. _v_i_r_t_u_a_l _D___r_e_p_e_t_i_t_i_o_n<_R>* _r_e_m_o_v_e__i_f( _R* _o_b,_i_n_t (*_c_o_m_p_a_r_e)(_R*,_R*) Returns a new repetition with every element e Demeter Last change: 14 September 1993 1 D__REPETITION(2) Demeter Software D__REPETITION(2) removed such that compare( e,ob ) returns TRUE. _v_i_r_t_u_a_l _i_n_t _s_i_z_e() = _0; Returns the number of elements in the repetition. Demeter Last change: 14 September 1993 2