From: Johannes G. <joh...@gm...> - 2007-05-04 22:00:06
|
There were the following functions in 0.8.x and before: //! Return the matching planet pointer if exists or NULL Planet* searchByEnglishName(string planetEnglishName) const; HipStar *search(const string&) const; // Search the star by string (incl catalog prefix) StelObject *search(const string& name); // search by name M83, NGC 1123, IC 1234 Constellation* findFromAbbreviation(const string& abbreviation) const; for doing what Rob needs: searching by untranslated name. They were not implementations of a virtual function, instead a very ugly function chose and called one of them depending on the type. Migration to StelObjectModule has never been performed, this must be done now. In fact I am glad the ugly function has died, but it must be replaced. Johannes On 2007.05.03 18:58:13 CEST, Fabien Chéreau wrote: > I think there was never such a method in any classes. > There was only I think a ;ethod like selectByType or something like that.. > > Fabien > > On 5/3/07, Rob Spearman <ro...@di...> wrote: > > > > > > On Thu, 2007-05-03 at 10:08 +0200, Fabien Chéreau wrote: > > > > > > > > I don't remember that there was ever such a method in StelObjectMgr. > > > But it is indeed useful. The code for it should be copied from > > > searchByNameI18n(), to add it however we must add in every > > > StelObjectModule the mathcing method. > > > > > > > I don't think they were ever there. These methods simply were not > > migrated to StelObjectModule during the recent refactoring, and seem to > > just have been deleted. > > > > We should just grab this from a past version and tweak it rather than > > rewrite it. Otherwise we keep getting the same bugs showing up time and > > again as we loose code base knowledge. > > > > Rob > > > > > > > > > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by DB2 Express > > Download DB2 Express C - the FREE version of DB2 express and take > > control of your XML. No limits. Just data. Click to get it now. > > http://sourceforge.net/powerbar/db2/ > > _______________________________________________ > > Stellarium-pubdevel mailing list > > Ste...@li... > > https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel > > > > I think there was never such a method in any classes. > There was only I think a ;ethod like selectByType or something like > that.. > > Fabien > > On 5/3/07, Rob Spearman <ro...@di...> wrote: > > > On Thu, 2007-05-03 at 10:08 +0200, Fabien Ch?eau wrote: > > > > > I don't remember that there was ever such a method in > StelObjectMgr. > > But it is indeed useful. The code for it should be copied > from > > searchByNameI18n(), to add it however we must add in every > > StelObjectModule the mathcing method. > > > > I don't think they were ever there. These methods simply were > not > migrated to StelObjectModule during the recent refactoring, and > seem to > just have been deleted. > > We should just grab this from a past version and tweak it rather > than > rewrite it. Otherwise we keep getting the same bugs showing up > time and > again as we loose code base knowledge. > > Rob > > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and > take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Stellarium-pubdevel mailing list > Ste...@li... > https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel > > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by DB2 Express > Download DB2 Express C - the FREE version of DB2 express and take > control of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Stellarium-pubdevel mailing list > Ste...@li... > https://lists.sourceforge.net/lists/listinfo/stellarium-pubdevel > |