Move globalwrap.hpp to library/

This commit is contained in:
Ilari Liusvaara 2012-10-13 09:23:55 +03:00
parent e6dca4e9eb
commit c0f52c3f48
7 changed files with 16 additions and 8 deletions

View file

@ -1,5 +1,5 @@
#ifndef _globalwrap__hpp__included__
#define _globalwrap__hpp__included__
#ifndef _library__globalwrap__hpp__included__
#define _library__globalwrap__hpp__included__
/**
* Wrapper for glboal/module-local objects accessable in global ctor context.
@ -8,6 +8,14 @@ template<class T>
class globalwrap
{
public:
/**
* Ctor, forces the object to be constructed (to avoid races).
*/
globalwrap() throw(std::bad_alloc)
{
if(!storage)
storage = new T();
}
/**
* Get the wrapped object.
*

View file

@ -1,7 +1,7 @@
#include "core/advdumper.hpp"
#include "core/command.hpp"
#include "core/dispatch.hpp"
#include "core/globalwrap.hpp"
#include "library/globalwrap.hpp"
#include "lua/lua.hpp"
#include "library/string.hpp"

View file

@ -1,5 +1,5 @@
#include "core/command.hpp"
#include "core/globalwrap.hpp"
#include "library/globalwrap.hpp"
#include "core/misc.hpp"
#include "core/window.hpp"
#include "library/minmax.hpp"

View file

@ -1,5 +1,5 @@
#include "core/dispatch.hpp"
#include "core/globalwrap.hpp"
#include "library/globalwrap.hpp"
#include "core/misc.hpp"
#include <sstream>

View file

@ -1,6 +1,6 @@
#include "core/command.hpp"
#include "core/dispatch.hpp"
#include "core/globalwrap.hpp"
#include "library/globalwrap.hpp"
#include "core/keymapper.hpp"
#include "core/memorymanip.hpp"
#include "core/misc.hpp"

View file

@ -1,6 +1,6 @@
#include "core/command.hpp"
#include "core/dispatch.hpp"
#include "core/globalwrap.hpp"
#include "library/globalwrap.hpp"
#include "core/misc.hpp"
#include "core/settings.hpp"
#include "library/string.hpp"

View file

@ -1,5 +1,5 @@
#include "core/command.hpp"
#include "core/globalwrap.hpp"
#include "library/globalwrap.hpp"
#include "lua/internal.hpp"
#include "lua/lua.hpp"
#include "lua/unsaferewind.hpp"