All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Namespaces | Macros
Singleton.h File Reference

Header file for the Singleton class. More...

#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
#include <blaze/util/constraints/DerivedFrom.h>
#include <blaze/util/NonCopyable.h>
#include <blaze/util/NullType.h>
#include <blaze/util/Suffix.h>
#include <blaze/util/TypeList.h>

Go to the source code of this file.

Classes

class  blaze::Dependency< T >
 Lifetime dependency on a singleton object.The Dependency template class represents a lifetime dependency on a singleton object based on the Blaze Singleton functionality. By use of the Dependency template, any class can by either public or non-public inheritance or composition define a single or multiple lifetime dependencies on one or several singletons, which guarantees that the singleton instance(s) will be destroyed after the dependent object. The following example demonstrates both the inheritance as well as the composition approach: More...
 
struct  HasCyclicDependency< T, TL, C >
 
class  blaze::Singleton< T, D1, D2, D3, D4, D5, D6, D7, D8 >
 Base class for all lifetime managed singletons.The Singleton class represents the base class for all lifetime managed singletons of the Blaze library. Classes, which are supposed to be implemented in terms of the singleton pattern, only have to derive from this class in order to gain all basic characteristics of a singleton: More...
 

Namespaces

namespace  blaze
 Namespace of the Blaze C++ math library.
 

Macros

#define BLAZE_DETECT_CYCLIC_LIFETIME_DEPENDENCY(T)
 Constraint on the data type.In case the given data type T is not an integral data type, a compilation error is created.
 
#define BLAZE_BEFRIEND_SINGLETON
 Friendship declaration for the Singleton class template.This macro has to be used in order to declare the Singleton functionality as friend of the class deriving from Singleton.
 

Detailed Description

Header file for the Singleton class.

Copyright (C) 2011 Klaus Iglberger - All Rights Reserved

This file is part of the Blaze library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with a special exception for linking and compiling against the Blaze library, the so-called "runtime exception"; see the file COPYING. If not, see http://www.gnu.org/licenses/.