3
* Copyright (C) 2006 Fabien Chereau
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20
#ifndef STELOBJECTMODULE_H
21
#define STELOBJECTMODULE_H
23
#include <boost/intrusive_ptr.hpp>
24
#include "StelModule.hpp"
25
#include "StelObjectType.hpp"
29
* Manage a collection of StelObject.
30
* @author Fabien Chereau <stellarium@free.fr>
33
class StelObjectModule : public StelModule
40
//! Search for StelObject in the disk of diameter limitFov centered on the given position
41
//! Only visible objects (i.e curretly displayed on screen should be returned)
42
//! @param v equatorial position at epoch J2000
43
//! @param limitFov angular diameter of the searching zone in degree
44
//! @return the list of all the displayed objects contained in the defined zone
45
virtual vector<StelObjectP> searchAround(const Vec3d& v, double limitFov, const Navigator * nav, const Projector * prj) const = 0;
47
//! Return the matching StelObject if exists or the empty StelObject if not found
48
//! @param nameI18n the translated name for the current sky locale
49
virtual StelObjectP searchByNameI18n(const wstring& nameI18n) const = 0;
51
//! Return the matching StelObject if exists or the empty StelObject if not found
52
//! @param name the standard program name
53
virtual StelObjectP searchByName(const string& name) const = 0;
55
//! Find and return the list of at most maxNbItem objects auto-completing passed object I18 name
56
//! @param objPrefix the first letters of the searched object
57
//! @param maxNbItem the maximum number of returned object names
58
//! @return a vector of matching object name by order of relevance, or an empty vector if nothing matches
59
virtual vector<wstring> listMatchingObjectsI18n(const wstring& objPrefix, unsigned int maxNbItem=5) const = 0;