Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

trajmanager.h

Go to the documentation of this file.
00001 // trajmanager.h
00002 //
00003 // Copyright (C) 2001 Chris Laurel <claurel@shatters.net>
00004 //
00005 // This program is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU General Public License
00007 // as published by the Free Software Foundation; either version 2
00008 // of the License, or (at your option) any later version.
00009 
00010 #ifndef CELENGINE_TRAJMANAGER_H_
00011 #define CELENGINE_TRAJMANAGER_H_
00012 
00013 #include <string>
00014 #include <map>
00015 #include <celutil/resmanager.h>
00016 #include <celengine/orbit.h>
00017 
00018 
00019 class TrajectoryInfo : public ResourceInfo<Orbit>
00020 {
00021  public:
00022     std::string source;
00023     std::string path;
00024 
00025     TrajectoryInfo(const std::string _source,
00026                    const std::string _path = "") :
00027         source(_source), path(_path) {};
00028 
00029     virtual std::string resolve(const std::string&);
00030     virtual Orbit* load(const std::string&);
00031 };
00032 
00033 inline bool operator<(const TrajectoryInfo& ti0, const TrajectoryInfo& ti1)
00034 {
00035     if (ti0.source == ti1.source)
00036         return ti0.path < ti1.path;
00037     else
00038         return ti0.source < ti1.source;
00039 }
00040 
00041 typedef ResourceManager<TrajectoryInfo> TrajectoryManager;
00042 
00043 extern TrajectoryManager* GetTrajectoryManager();
00044 
00045 #endif // CELENGINE_TRAJMANAGER_H_
00046 

Generated on Sat Jan 14 22:30:29 2006 for Celestia by  doxygen 1.4.1