Kstars

nameresolver.h
1/*
2 SPDX-FileCopyrightText: 2014 Akarsh Simha <akarsh.simha@kdemail.net>
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
13class QString;
14class CatalogObject;
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 <akarsh.simha@kdemail.net>
28 */
29
30namespace NameResolver
31{
32/**
33 * @short Resolve the name of the given DSO and extract data from
34 * various sources
35 */
36std::pair<bool, CatalogObject> resolveName(const QString &name);
37
38namespace 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 */
47std::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 */
74SkyObject::TYPE interpretObjectType(const QString &typeString, bool caseSensitive = true);
75} // namespace NameResolverInternals
76}; // namespace NameResolver
77
78#endif
A simple container object to hold the minimum information for a Deep Sky Object to be drawn on the sk...
TYPE
The type classification of the SkyObject.
Definition skyobject.h:112
Uses name resolver services to get coordinates and information about deep-sky objects,...
std::pair< bool, CatalogObject > resolveName(const QString &name)
Resolve the name of the given DSO and extract data from various sources.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.