UNIVERSAL(2) Demeter Software UNIVERSAL(2) NAME Universal - methods attached to class Universal DESCRIPTION virtual char *get_type(); Returns a character string whose value is the name of the class of the receiving object. virtual void set_data_member( int index,Universal* value ); Generically sets the value of the part given by _i_n_d_e_x in the receiving object. virtual int number_of_parts(); Returns a count of both immediate and inherited parts in the receiving object. virtual int num_of_imm_parts(); Returns a count of the immediate parts in the receiving object. virtual Universal *get_data_member( int index ); Generically accesses the part given by _i_n_d_e_x in the receiving object. Universal *g_parse( char* filename ); Parses the text in file _f_i_l_e_n_a_m_e and fills in the receiving object. Universal *g_parse( char* filename,char* cdfile ); Parses the text in file _f_i_l_e_n_a_m_e using grammar in file _c_d_f_i_l_e and fills in the receiving object. virtual int g_equal( Universal* ); Performs deep comparison of the receiving object with another object and returns the result. virtual Universal* g_copy(); Returns identical deep copy of the receiving object. virtual void g_draw(); Displays detailed structure of the receiving object on the screen. void g_displayAsTree( ostream& = cout ); Displays the receiving tree object in object graph notation. void Universal::g_delete( char* fileName ); Recursively deletes a subgraph, described in _f_i_l_e_N_a_m_e , of the receiving object graph. Demeter Last change: 13 May 1991 1 UNIVERSAL(2) Demeter Software UNIVERSAL(2) char* g_code(); Generates C++ code to create an instance of an object identical to the receiver. int g_check( char* className = NULL ); Checks whether the receiver is a legal object of class _c_l_a_s_s_N_a_m_e. If _c_l_a_s_s_N_a_m_e is not provided, the start symbol of the class dictionary is used. void g_print(); Prints receiver object out to screen. void g_print( char* outfilename ); Prints receiver object out to file _f_i_l_e_n_a_m_e. void g_print( Universal* grammarobject,char* outfilename ); Prints receiver object out to file _f_i_l_e_n_a_m_e inter- preting _g_r_a_m_m_a_r_o_b_j_e_c_t. SEE ALSO g_check(2), g_code(2), g_copy(2), g_delete(2), g_displayAsTree(2), g_draw(2), g_equal(2), g_parse(2), g_print(2) Demeter Last change: 13 May 1991 2