// EMERGENT GAME TECHNOLOGIES PROPRIETARY INFORMATION // // This software is supplied under the terms of a license agreement or // nondisclosure agreement with Emergent Game Technologies and may not // be copied or disclosed except in accordance with the terms of that // agreement. // // Copyright (c) 1996-2008 Emergent Game Technologies. // All Rights Reserved. // // Emergent Game Technologies, Chapel Hill, North Carolina 27517 // http://www.emergent.net //--------------------------------------------------------------------------- #ifndef NIUISIGNAL_H #define NIUISIGNAL_H #include "NiUserInterfaceLibType.h" #include //--------------------------------------------------------------------------- // These classes/templates may be found in NiSlot.h. They are forward // declared here in order to avoid circular dependancy. class NiUIBaseSlot0; template class NiUIBaseSlot1; template class NiUIBaseSlot2; //--------------------------------------------------------------------------- // These three classes are identical in all ways except in the parameters // which their "EmitSignal" functions require and they type of NiUIBaseSlot* // they can refer to. class NiUISignal0 : public NiMemObject { public: NiUISignal0(); virtual ~NiUISignal0(); inline void EmitSignal() const; inline void Subscribe(NiUIBaseSlot0* pkSlot); inline void Unsubscribe(NiUIBaseSlot0* pkSlot); inline bool IsSubscribed(NiUIBaseSlot0* pkSlot) const; inline unsigned int NumSubscribed() const; protected: NiTPrimitiveSet m_pkSlots; }; //--------------------------------------------------------------------------- template class NiUISignal1 : public NiMemObject { public: NiUISignal1(); virtual ~NiUISignal1(); inline void EmitSignal(Arg1Type Arg1) const; inline void Subscribe(NiUIBaseSlot1* pkSlot); inline void Unsubscribe(NiUIBaseSlot1* pkSlot); inline bool IsSubscribed(NiUIBaseSlot1* pkSlot) const; inline unsigned int NumSubscribed() const; protected: NiTPrimitiveSet *> m_pkSlots; }; //--------------------------------------------------------------------------- template class NiUISignal2 : public NiMemObject { public: NiUISignal2(); virtual ~NiUISignal2(); inline void EmitSignal(Arg1Type Arg1, Arg2Type Arg2) const; inline void Subscribe(NiUIBaseSlot2* pkSlot); inline void Unsubscribe(NiUIBaseSlot2* pkSlot); inline bool IsSubscribed(NiUIBaseSlot2* pkSlot) const; inline unsigned int NumSubscribed() const; protected: NiTPrimitiveSet *> m_pkSlots; }; //--------------------------------------------------------------------------- #include "NiUISignal.inl" #endif // NIUISIGNAL_H