CARMA C++
carma::services::SourceCatalog Class Reference

The SourceCatalog class is used to hold information regarding a particular source catalog file as retrieved from a Catalog. More...

#include <carma/services/SourceCatalog.h>

Inherits carma::services::Catalog.

Public Member Functions

carma::services::SourceIterator catalogBegin () const
 
carma::services::SourceIterator catalogEnd () const
 
::std::map< ::std::string,
carma::services::Source
getSourceMap () const
 
const carma::services::Sourcelookup (const std::string &sourceName)
 Select a source from the file of input sources. More...
 
void open (const std::string &fileName)
 Open a file containing a source catalog. More...
 
- Public Member Functions inherited from carma::services::Catalog
virtual bool contains (const std::string &entryName)
 
long getCommentColumnNo () const
 
std::string getFileName () const
 
bool hasCommentColumn () const
 Tables and Catalogs are of course allowed to have no column which contains comments. More...
 
virtual const
carma::services::CatalogEntry & 
lookup (const std::string &entryName)=0
 Lookup an catalog entry by name. More...
 
void open (const std::string &fileName)
 Open a file for reading in this Catalog. More...
 
void setCommentColumnNo (const long columnNo)
 Comment are allows to have white space, which can confuse carma::services::Table which assumes white space delineates columns. More...
 

Static Public Member Functions

static const std::string defaultCatalog ()
 

Additional Inherited Members

- Static Public Attributes inherited from carma::services::Catalog
static const long NO_COMMENT = -1
 We're allowed to have no comments in catalog, as this value indicates. More...
 
- Protected Attributes inherited from carma::services::Catalog
carma::services::Table catalogTable_
 
std::string fileName_
 

Detailed Description

The SourceCatalog class is used to hold information regarding a particular source catalog file as retrieved from a Catalog.

Definition at line 28 of file SourceCatalog.h.

Member Function Documentation

carma::services::SourceIterator carma::services::SourceCatalog::catalogBegin ( ) const
Returns
an iterator over all sources in this catalog, initially pointing to the first source in the underlying source map.
carma::services::SourceIterator carma::services::SourceCatalog::catalogEnd ( ) const
Returns
an iterator over all sources in this catalog, pointing to the end of the underlying source map. For use in loops.
static const std::string carma::services::SourceCatalog::defaultCatalog ( )
static
Returns
the default CARMA Source catalog NB: could move this to Catalog.h if we want all Catalogs to provide this.

Definition at line 58 of file SourceCatalog.h.

::std::map< ::std::string, carma::services::Source > carma::services::SourceCatalog::getSourceMap ( ) const
Returns
the underlyin map of sources. The map key is the upper case source name.

Definition at line 78 of file SourceCatalog.h.

const carma::services::Source& carma::services::SourceCatalog::lookup ( const std::string &  sourceName)

Select a source from the file of input sources.

This look-up is case insensitive.

Parameters
sourceNameThe Source name
Returns
A carma::services::Source representation of the named entry
Exceptions
SourceNotFoundExceptionif the source name cannot be found in the opened file.
void carma::services::SourceCatalog::open ( const std::string &  fileName)

Open a file containing a source catalog.

Parameters
fileNameThe file to open
Exceptions
carma::util::FileNotFoundExceptionif the file is not found

The documentation for this class was generated from the following file: