00001 #ifndef GSGL_FRAMEWORK_PACKAGE_H 00002 #define GSGL_FRAMEWORK_PACKAGE_H 00003 00004 // 00005 // $Id: package.hpp 2 2008-03-01 20:58:50Z kulibali $ 00006 // 00007 // Copyright (c) 2008, The Periapsis Project. All rights reserved. 00008 // 00009 // Redistribution and use in source and binary forms, with or without 00010 // modification, are permitted provided that the following conditions are 00011 // met: 00012 // 00013 // * Redistributions of source code must retain the above copyright notice, 00014 // this list of conditions and the following disclaimer. 00015 // 00016 // * Redistributions in binary form must reproduce the above copyright 00017 // notice, this list of conditions and the following disclaimer in the 00018 // documentation and/or other materials provided with the distribution. 00019 // 00020 // * Neither the name of the The Periapsis Project nor the names of its 00021 // contributors may be used to endorse or promote products derived from 00022 // this software without specific prior written permission. 00023 // 00024 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS 00025 // IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 00026 // TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A 00027 // PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER 00028 // OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, 00029 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 00030 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 00031 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF 00032 // LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING 00033 // NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 00034 // SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 00035 // 00036 00037 #include "framework/framework.hpp" 00038 #include "data/string.hpp" 00039 #include "data/list.hpp" 00040 #include "data/config.hpp" 00041 00042 namespace gsgl 00043 { 00044 00045 namespace framework 00046 { 00047 00048 /// Stores information about scenery modules for the UI. 00049 class FRAMEWORK_API pkg_scenery 00050 : public framework_object 00051 { 00052 gsgl::string fname; 00053 gsgl::string scenery_name; 00054 gsgl::string description; 00055 00056 public: 00057 pkg_scenery(const gsgl::string & fname); 00058 virtual ~pkg_scenery(); 00059 00060 const gsgl::string & get_fname() const { return fname; } 00061 const gsgl::string & get_scenery_name() const { return scenery_name; } 00062 const gsgl::string & get_description() const { return description; } 00063 }; // class pkg_scenery 00064 00065 00066 /// Stores information about vehicle classes for the UI. 00067 class FRAMEWORK_API pkg_vehicle 00068 : public framework_object 00069 { 00070 gsgl::string fname; 00071 gsgl::string class_name; 00072 gsgl::string vehicle_name; 00073 gsgl::string description; 00074 00075 public: 00076 pkg_vehicle(const gsgl::string & fname); 00077 virtual ~pkg_vehicle(); 00078 00079 const gsgl::string & get_fname() const { return fname; } 00080 const gsgl::string & get_vehicle_name() const { return vehicle_name; } 00081 const gsgl::string & get_description() const { return description; } 00082 const gsgl::string & get_class_name() const { return class_name; } 00083 }; // class pkg_vehicle 00084 00085 00086 /// Stores information about shared library files for the UI. 00087 class FRAMEWORK_API pkg_library 00088 : public framework_object 00089 { 00090 gsgl::string fname; 00091 00092 public: 00093 pkg_library(const gsgl::string & fname); 00094 virtual ~pkg_library(); 00095 00096 const gsgl::string & get_fname() const { return fname; } 00097 }; // struct pkg_library 00098 00099 00100 /// Stores information about library packages for the UI. 00101 class FRAMEWORK_API package 00102 : public framework_object 00103 { 00104 gsgl::string fname; 00105 gsgl::string package_name; 00106 gsgl::string description; 00107 00108 gsgl::data::list<pkg_scenery *> loaded_sceneries; 00109 gsgl::data::list<pkg_vehicle *> loaded_vehicles; 00110 gsgl::data::list<pkg_library *> loaded_libraries; 00111 00112 public: 00113 package(const gsgl::string & fname); 00114 virtual ~package(); 00115 00116 const gsgl::string & get_fname() const { return fname; } 00117 const gsgl::string & get_package_name() const { return package_name; } 00118 const gsgl::string & get_description() const { return description; } 00119 00120 const gsgl::data::list<pkg_scenery *> & get_loaded_sceneries() const { return loaded_sceneries; } 00121 const gsgl::data::list<pkg_vehicle *> & get_loaded_vehicles() const { return loaded_vehicles; } 00122 const gsgl::data::list<pkg_library *> & get_loaded_libraries() const { return loaded_libraries; } 00123 }; // class package 00124 00125 } // namespace framework 00126 00127 } // namespace gsgl 00128 00129 #endif