00001 /* 00002 ** ClanLib SDK 00003 ** Copyright (c) 1997-2005 The ClanLib Team 00004 ** 00005 ** This software is provided 'as-is', without any express or implied 00006 ** warranty. In no event will the authors be held liable for any damages 00007 ** arising from the use of this software. 00008 ** 00009 ** Permission is granted to anyone to use this software for any purpose, 00010 ** including commercial applications, and to alter it and redistribute it 00011 ** freely, subject to the following restrictions: 00012 ** 00013 ** 1. The origin of this software must not be misrepresented; you must not 00014 ** claim that you wrote the original software. If you use this software 00015 ** in a product, an acknowledgment in the product documentation would be 00016 ** appreciated but is not required. 00017 ** 2. Altered source versions must be plainly marked as such, and must not be 00018 ** misrepresented as being the original software. 00019 ** 3. This notice may not be removed or altered from any source distribution. 00020 ** 00021 ** Note: Some of the libraries ClanLib link to may have additional 00022 ** requirements or restrictions. 00023 ** 00024 ** File Author(s): 00025 ** 00026 ** Magnus Norddahl 00027 */ 00028 00029 #include "precomp.h" 00030 #include "resource.h" 00031 #include "resource_manager.h" 00032 #include "weakptr.h" 00033 #include "dom_element.h" 00034 #include <vector> 00035 00037 // CL_Resource_Impl Class: 00038 00039 class CL_ResourceManager_Impl; 00040 00041 class CL_Resource_Impl 00042 { 00044 public: 00045 CL_WeakPtr<CL_ResourceManager_Impl> resource_manager; 00046 00047 CL_DomElement element; 00048 00049 std::vector< std::pair<CL_StringA, CL_UnknownSharedPtr> > cache_objects; 00050 }; 00051 00053 // CL_Resource Construction: 00054 00055 CL_Resource::CL_Resource() 00056 { 00057 } 00058 00059 CL_Resource::~CL_Resource() 00060 { 00061 } 00062 00064 // CL_Resource Attributes: 00065 00066 CL_StringA CL_Resource::get_type() const 00067 { 00068 return impl->element.get_tag_name(); 00069 } 00070 00071 CL_StringA CL_Resource::get_name() const 00072 { 00073 return impl->element.get_attribute("name"); 00074 } 00075 00076 CL_DomElement &CL_Resource::get_element() 00077 { 00078 return impl->element; 00079 } 00080 00081 CL_ResourceManager CL_Resource::get_manager() 00082 { 00083 return CL_ResourceManager(impl->resource_manager); 00084 } 00085 00086 CL_UnknownSharedPtr CL_Resource::get_data(const CL_StringA &name) 00087 { 00088 return CL_UnknownSharedPtr(); 00089 } 00090 00092 // CL_Resource Operations: 00093 00094 void CL_Resource::set_data(const CL_StringA &name, const CL_UnknownSharedPtr &ptr) 00095 { 00096 } 00097 00098 void CL_Resource::load_data() 00099 { 00100 } 00101 00102 void CL_Resource::load_data(CL_ResourceLoader *factory) 00103 { 00104 } 00105 00106 void CL_Resource::load_data_async() 00107 { 00108 } 00109 00110 void CL_Resource::load_data_async(CL_ResourceLoader *factory) 00111 { 00112 } 00113 00114 void CL_Resource::load_data_async(const CL_StringA &data_name, CL_ResourceLoadable *loadable_object, bool async) 00115 { 00116 } 00117 00118 void CL_Resource::unload_data() 00119 { 00120 } 00121 00123 // CL_Resource Implementation:
1.4.1