CARMA C++
OpticalCatalog.h
Go to the documentation of this file.
1 
9 #ifndef CARMA_SERVICES_OPTICALCATALOG_H
10 #define CARMA_SERVICES_OPTICALCATALOG_H
11 
12 #include "carma/services/Catalog.h"
13 #include "carma/services/Star.h"
14 #include "carma/util/Program.h"
15 #include <string>
16 #include <map>
17 
18 namespace carma {
19 namespace services {
20 
21  class OpticalCatalog : public carma::services::Catalog {
22  public:
24  OpticalCatalog();
26  virtual ~OpticalCatalog();
27 
33  void open(const std::string & fileName);
34 
45  const Star & lookup(const std::string & sourceName);
46 
52  static const ::std::string defaultCatalog() {
53  return carma::util::Program::getConfFile(DEFAULT_CATALOG);
54  }
55 
60  ::std::map< ::std::string, carma::services::Star > getSourceMap() const
61  {
62  return stars_;
63  }
64 
65  private:
66 
67  static const ::std::string DEFAULT_CATALOG;
68 
69  // catalog entries. key is star name
70  ::std::map< ::std::string, services::Star > stars_;
71 
72 
73  };
74 } // end namespace services
75 } // end namespace carma
76 
77 #endif
::std::string getConfFile(const ::std::string &filename)
Get the absolute path of a configuration file.