// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// Copyright 2003 Liam Girdwood
#ifndef _POLLUX_LIBRARY_HH
#define _POLLUX_LIBRARY_HH
#include "catalog.hh"
#include <glibmm/dispatcher.h>
#include <string>
#include <vector>
#define DEFAULT "sky2000"
namespace Pollux
{
/*! \class Library
* \brief The Library class is a contatiner for all Nova catalogs.
*
* This class is a singleton and contains and loads all astro
* catalogs into Nova.
*/
class Library
{
public:
/*! \fn static Library* get_library();
* \brief Get a pointer to the Library
*/
static Library* get_library();
/*! \fn ~Library();
* \brief Destructor
*/
~Library();
/*! \fn Catalog* get_catalog(std::string& name, Glib::Dispatcher* signal = 0);
* \brief Get a pointer to a catalog object
*/
Catalog* get_catalog(std::string& name, Glib::Dispatcher* signal = 0);
/*! \fn void add_search_path (std::string& path);
* \brief Add a catalog search path to the Library
*/
void add_search_path (std::string& path);
/*! void add_catalog (Catalog* cat);
* \brief Add a catalog to the Library
*/
void add_catalog (Catalog* cat);
/*! \fn double get_progress ();
* \brief Get the current Library operation progress
*/
double get_progress ();
private:
/*! \fn Library();
* \brief Constructor
*/
Library();
static Library* m_instance; /*!< Singleton instance pointer */
Catalog* m_cat; /*!< Current working catalog */
std::vector<Catalog*> m_cat_list; /*!< List of catalogs in memory */
std::vector<std::string*> m_path; /*!< List of catalog search paths */
};
};
#endif
syntax highlighted by Code2HTML, v. 0.9.1