mirror of
https://github.com/UberGames/GtkRadiant.git
synced 2024-11-26 22:01:38 +00:00
6ee91d153e
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@44 8a3a26a2-13c4-0310-b231-cf6edde360e5
48 lines
899 B
C++
48 lines
899 B
C++
|
|
#if !defined(INCLUDED_SIGNALFWD_H)
|
|
#define INCLUDED_SIGNALFWD_H
|
|
|
|
class SignalHandler;
|
|
template<typename FirstArgument>
|
|
class SignalHandler1;
|
|
template<typename FirstArgument, typename SecondArgument>
|
|
class SignalHandler2;
|
|
template<typename FirstArgument, typename SecondArgument, typename ThirdArgument>
|
|
class SignalHandler3;
|
|
|
|
template<typename Context>
|
|
class Opaque;
|
|
|
|
///\brief A pointer that always has a well-defined value.
|
|
/// If no value is specified, the appropriate null value is used.
|
|
template<typename Type>
|
|
class Handle
|
|
{
|
|
Type* p;
|
|
public:
|
|
Handle() : p(0)
|
|
{
|
|
}
|
|
explicit Handle(Type* p) : p(p)
|
|
{
|
|
}
|
|
Type* get() const
|
|
{
|
|
return p;
|
|
}
|
|
bool isNull() const
|
|
{
|
|
return p == 0;
|
|
}
|
|
};
|
|
|
|
template<typename Handler>
|
|
class SignalFwd
|
|
{
|
|
public:
|
|
typedef Handle< Opaque<Handler> > handler_id_type;
|
|
};
|
|
|
|
typedef SignalFwd<SignalHandler>::handler_id_type SignalHandlerId;
|
|
|
|
#endif
|