Kstars

nameresolver.h
1 /*
2  SPDX-FileCopyrightText: 2014 Akarsh Simha <[email protected]>
3 
4  SPDX-License-Identifier: GPL-2.0-or-later
5 */
6 
7 #ifndef NAMERESOLVER_H
8 #define NAMERESOLVER_H
9 
10 #include "skyobject.h"
11 
12 // Forward declarations
13 class QString;
15 
16 /**
17  * @namespace NameResolver
18  *
19  * @short Uses name resolver services to get coordinates and
20  * information about deep-sky objects, given their names
21  *
22  * This class uses the CDS Sesame name resolver (and potentially other
23  * resolvers) to resolve the names of deep-sky objects, and obtain
24  * coordinates, fluxes, alternate designations, and possibly other
25  * data.
26  *
27  * @author Akarsh Simha <[email protected]>
28  */
29 
30 namespace NameResolver
31 {
32 /**
33  * @short Resolve the name of the given DSO and extract data from
34  * various sources
35  */
36 std::pair<bool, CatalogObject> resolveName(const QString &name);
37 
38 namespace NameResolverInternals
39 {
40 /**
41  * @short Resolve the name and obtain basic data using CDS Sesame service
42  *
43  * @param data the structure to fill with the obtained data
44  * @param name the name (identifier) to resolve
45  * @return Success value and the object
46  */
47 std::pair<bool, CatalogObject> sesameResolver(const QString &name);
48 
49 /*
50  * @short Retrieve additional data from SIMBAD
51  *
52  * If the object was resolved by SIMBAD, obtain additional data
53  * that is not available through CDS Sesame, such as the major and
54  * minor axes and position angle of the object.
55  *
56  * @param data the structure containing data from Sesame, to be
57  * filled with additional data
58  * @return Success value
59  */
60 // bool getDataFromSimbad( CatalogObject &data );
61 
62 /**
63  * @short Interprets object type returned by Sesame
64  *
65  * This method reads the object type string returned by Sesame
66  * / other resolvers and attempts to convert it into a
67  * SkyObject type.
68  *
69  * @param typeString An abbreviated string containing the type of the object
70  * @param caseSensitive Should we make a case-sensitive check?
71  *
72  * @return a SkyObject::TYPE.
73  */
74 SkyObject::TYPE interpretObjectType(const QString &typeString, bool caseSensitive = true);
75 } // namespace NameResolverInternals
76 }; // namespace NameResolver
77 
78 #endif
Uses name resolver services to get coordinates and information about deep-sky objects,...
Definition: nameresolver.h:14
std::pair< bool, CatalogObject > resolveName(const QString &name)
Resolve the name of the given DSO and extract data from various sources.
A simple container object to hold the minimum information for a Deeb Sky Object to be drawn on the sk...
Definition: catalogobject.h:40
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Aug 11 2022 04:00:01 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.