// $Id: MolecularDB.h 19611 2011-09-19 03:28:09Z paul $ #ifndef _atm_MolecularDB_h_ #define _atm_MolecularDB_h_ #include #include #include #include #include namespace atm { /** \class MolecularDB \brief Detector description interface for data in the Atm_Molecular database For an example of using this interface, see the ReadMolecularLLNS::ReadMolecularLL example \author T. Paul \date 3 September 2004 \version $Id: MolecularDB.h 19611 2011-09-19 03:28:09Z paul $ \ingroup atm */ class MolecularDB { private: void CacheZones(); typedef std::map InternalZoneMap; typedef InternalZoneMap::const_iterator InternalZoneIterator; InternalZoneMap fZoneMap; struct InternalZoneFunctor { const MolecularZone& operator() (const std::pair& pair) const { return *pair.second; } }; public: /// Return the name of profile type for this MolecularDB std::string GetProfileName() const { return fgProfileNameLookup[fProfileId]; } /// ZoneIterator returns a pointer to a MolecularZone typedef boost::transform_iterator ZoneIterator; /// Beginning of the collection of valid Zones ZoneIterator ZonesBegin() const { return ZoneIterator(fZoneMap.begin()); } /// End of the collection of valid Zones ZoneIterator ZonesEnd() const { return ZoneIterator(fZoneMap.end()); } private: MolecularDB(const MolecularIds::ProfileId id); //DV we have pointer data-members: prevent unintended copying MolecularDB(const MolecularDB&); MolecularDB& operator=(MolecularDB&); ~MolecularDB(); std::string fMolecularIdString; // specifies the aerosol_id key for given time, software version, etc. MolecularIds::ProfileId fProfileId; // specifies profile_type variable in db static const std::string fgProfileNameLookup[MolecularIds::eLast+1]; friend class Atmosphere; }; } // namespace atm #endif // Configure (x)emacs for this file ... // Local Variables: // mode: c++ // compile-command: "make -C .. -k" // End: