gtkradiant/libs/signal/signalfwd.h
spog 6ee91d153e refactored plugin api; refactored callback library; added signals library
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@44 8a3a26a2-13c4-0310-b231-cf6edde360e5
2006-04-09 17:15:13 +00:00

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