~tomprogs/gewoopi/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//------------------------------------------------------------------------------
// fwd_default.hpp - this file is part of the gewoopi game engine
// (c) copyright 2009 Thomas Geymayer <tomgey@gmail.com>
// For conditions of distribution and use, see copyright notice in gewoopi.hpp
//------------------------------------------------------------------------------

/*!
 * @file
 * @brief
 * @details
 * @author Thomas Geymayer <tomgey@gmail.com>
 * @date Date of Creation: 11.06.2009
 */

#ifndef FWD_DEFAULT_HPP_
#define FWD_DEFAULT_HPP_

#include <boost/shared_ptr.hpp>
#include <boost/weak_ptr.hpp>

#include <boost/shared_array.hpp>

//------------------------------------------------------------------------------
///
/// @brief Defines default smart pointers for Objekt Type.
///
/// @param TypeName The type for the smart pointers.

#define DEF_SMART_PTR( TypeName )\
  typedef boost::shared_ptr<TypeName> TypeName##Ptr;\
  typedef boost::weak_ptr<TypeName> TypeName##WeakPtr;\
  typedef boost::shared_ptr<const TypeName> TypeName##ConstPtr;\
  typedef boost::weak_ptr<const TypeName> TypeName##ConstWeakPtr;

#define DEF_SMART_PTR_FORWARD( Type, TypeName )\
  Type TypeName; /* Forward declaration */\
  DEF_SMART_PTR(TypeName);

#endif /* FWD_DEFAULT_HPP_ */