Index: unk/nv/resource.hh
===================================================================
--- /trunk/nv/resource.hh	(revision 314)
+++ 	(revision )
@@ -1,77 +1,0 @@
-// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
-// http://chaosforge.org/
-//
-// This file is part of NV Libraries.
-// For conditions of distribution and use, see copyright notice in nv.hh
-
-/**
- * @file resource.hh
- * @author Kornel Kisielewicz epyon@chaosforge.org
- * @brief resource implementation
- */
-
-#ifndef NV_RESOURCE_HH
-#define NV_RESOURCE_HH
-
-#include <nv/common.hh>
-#include <memory>
-
-namespace nv
-{
-
-	class resource
-	{
-	public:
-		resource() : m_size(0), m_rid(0), m_used(0), m_loaded(0), m_data(nullptr) {}
-		virtual bool load() = 0;
-		virtual bool initialize() { return true; };
-		virtual bool destroy() { return true; };
-		virtual bool unload() = 0;
-		bool is_loaded() const { return m_loaded; }
-		uid get_rid() const { return m_rid; }
-		uid get_size() const { return m_size; }
-		const void* get() { return m_data; }
-		void lock() { m_used++; }
-		void unlock() { m_used--; }
-		virtual ~resource() {}
-	private:
-		uint32 m_size;
-		uint32 m_rid;
-		uint32 m_used;
-		bool   m_loaded;
-		void*  m_data;
-	};
-
-	template< class DATA >
-	class resource_type : public resource
-	{
-	public:
-		explicit resource_type( DATA* data ) : m_data( data ) {}
-		virtual bool load() { return true; };
-		virtual bool unload() { return true; };
-		~resource_type() { delete data; }
-	};
-
-
-
-	template< class DATA >
-	class resource_handle
-	{
-	public:
-		explicit resource_handle( resource_type< DATA >& m_resource ) 
-			: m_resource( &a_resource ) { m_resource.lock(); }
-		void assign( resource_type< DATA >& a_resource ) 
-		{
-			m_resource.unlock();
-			m_resource = a_resource;
-			m_resource.lock();
-		}
-		const DATA* operator->() const { return (const DATA*)m_resource.get(); }
-		~resource_handle() { m_resource.unlock(); }
-	private:
-		resource& m_resource;
-	};
-
-}
-
-#endif // NV_RESOURCE_HH
Index: unk/nv/resource_manager.hh
===================================================================
--- /trunk/nv/resource_manager.hh	(revision 314)
+++ 	(revision )
@@ -1,74 +1,0 @@
-// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
-// http://chaosforge.org/
-//
-// This file is part of NV Libraries.
-// For conditions of distribution and use, see copyright notice in nv.hh
-
-/**
- * @file resource_manager.hh
- * @author Kornel Kisielewicz epyon@chaosforge.org
- */
-
-#ifndef NV_RESOURCE_MANAGER_HH
-#define NV_RESOURCE_MANAGER_HH
-
-#include <nv/resource.hh>
-#include <nv/singleton.hh>
-#include <string>
-#include <unordered_map>
-#include <vector>
-
-namespace nv
-{
-	typedef std::shared_ptr<resource> (*resource_constructor_func)();
-
-	template <typename TYPE> 
-	std::shared_ptr<resource> resource_constructor()
-	{
-		return std::static_pointer_cast<resource>( std::shared_ptr<TYPE>( new TYPE() ) );
-	}
-
-
-	class resource_manager : public auto_singleton< resource_manager >
-	{
-	public:
-		resource_manager();
-		~resource_manager();
-
-		template<typename T>
-		void register_resource_type( const std::string& name )
-		{
-			register_resource_type( name, resource_constructor<T> );
-		}
-		void register_resource_type( const std::string& name, resource_constructor_func c );
-
-		template<typename T>
-		std::shared_ptr<T> get_resource(uint32 id) const
-		{
-			auto result = std::dynamic_pointer_cast<T,resource>( get_raw_resource( id ) );
-			return result;
-		}
-		template<typename T>
-		std::shared_ptr<T> get_resource( const std::string& id ) const
-		{
-			auto result = std::dynamic_pointer_cast<T,resource>( get_raw_resource( id ) );
-			return result;
-		}
-
-		resource* get_raw_resource(uint32 id) const;
-		resource* get_raw_resource(const std::string& id) const;
-		
-	private:
-		typedef std::vector< resource* > resources; 
-		typedef std::unordered_map< std::string, uid > id_map;
-		typedef std::unordered_map< std::string, resource_constructor_func > constructor_map;
-
-	private:
-		resources       m_data;
-		id_map          m_id_map;
-		constructor_map m_constructors;
-	};
-
-}
-
-#endif // NV_RESOURCE_MANAGER_HH
Index: unk/src/resource_manager.cc
===================================================================
--- /trunk/src/resource_manager.cc	(revision 314)
+++ 	(revision )
@@ -1,39 +1,0 @@
-// Copyright (C) 2012-2013 ChaosForge / Kornel Kisielewicz
-// http://chaosforge.org/
-//
-// This file is part of NV Libraries.
-// For conditions of distribution and use, see copyright notice in nv.hh
-
-#include <nv/resource_manager.hh>
-
-using namespace nv;
-
-resource_manager::resource_manager()
-{
-
-}
-
-resource* resource_manager::get_raw_resource(uint32 id) const
-{
-	return m_data[ id ];
-}
-
-resource* resource_manager::get_raw_resource(const std::string& id) const
-{
-	auto i = m_id_map.find( id );
-	if ( i != m_id_map.end() )
-	{
-		return m_data[ (unsigned int)i->second ];
-	}
-	return nullptr;
-}
-
-void resource_manager::register_resource_type( const std::string& type_name, resource_constructor_func c )
-{
-	m_constructors[ type_name ] = c;
-}
-
-resource_manager::~resource_manager()
-{
-
-}
