~ubuntu-branches/debian/jessie/stellarium/jessie

« back to all changes in this revision

Viewing changes to src/StelObjectModule.hpp

Tags: upstream-0.9.0
Import upstream version 0.9.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Stellarium
 
3
 * Copyright (C) 2006 Fabien Chereau
 
4
 * 
 
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.
 
9
 * 
 
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.
 
14
 * 
 
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.
 
18
 */
 
19
 
 
20
#ifndef STELOBJECTMODULE_H
 
21
#define STELOBJECTMODULE_H
 
22
 
 
23
#include <boost/intrusive_ptr.hpp>
 
24
#include "StelModule.hpp"
 
25
#include "StelObjectType.hpp"
 
26
#include "vecmath.h"
 
27
 
 
28
/**
 
29
 * Manage a collection of StelObject.
 
30
 * @author Fabien Chereau <stellarium@free.fr>
 
31
 */
 
32
 
 
33
class StelObjectModule : public StelModule
 
34
{
 
35
public:
 
36
    StelObjectModule();
 
37
 
 
38
    ~StelObjectModule();
 
39
        
 
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;
 
46
        
 
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;
 
50
 
 
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;
 
54
        
 
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;
 
60
};
 
61
 
 
62
#endif