Mercurial > hg > octave-lyh
comparison src/symtab.h @ 12130:3229572cbe23
symbol_table::parent_classes: also add parents of parents to the list
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 22 Jan 2011 12:55:18 -0500 |
parents | f4689107dd8c |
children | d6151d774283 |
comparison
equal
deleted
inserted
replaced
12129:80fc70a53400 | 12130:3229572cbe23 |
---|---|
1864 const_parent_map_iterator it = parent_map.find (dispatch_type); | 1864 const_parent_map_iterator it = parent_map.find (dispatch_type); |
1865 | 1865 |
1866 if (it != parent_map.end ()) | 1866 if (it != parent_map.end ()) |
1867 retval = it->second; | 1867 retval = it->second; |
1868 | 1868 |
1869 for (std::list<std::string>::const_iterator lit = retval.begin (); | |
1870 lit != retval.end (); lit++) | |
1871 { | |
1872 // Search for parents of parents and append them to the list. | |
1873 | |
1874 // FIXME -- should we worry about a circular inheritance graph? | |
1875 | |
1876 std::list<std::string> parents = parent_classes (*lit); | |
1877 | |
1878 if (! parents.empty ()) | |
1879 retval.insert (retval.end (), parents.begin (), parents.end ()); | |
1880 } | |
1881 | |
1869 return retval; | 1882 return retval; |
1870 } | 1883 } |
1871 | 1884 |
1872 static octave_user_function *get_curr_fcn (scope_id scope = xcurrent_scope) | 1885 static octave_user_function *get_curr_fcn (scope_id scope = xcurrent_scope) |
1873 { | 1886 { |