// 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 //--------------------------------------------------------------------------- #include "NiUISignalSlotMacros.h" #include "NiUISlot.h" //--------------------------------------------------------------------------- inline NiUISignal0::NiUISignal0() { } //--------------------------------------------------------------------------- // All code in NiUISignal* methods are implemented in the macros defined in // NiUISignalSlotMacros.h. inline NiUISignal0::~NiUISignal0() { // Note: None of the pointers in any of these destructors is owned by // this instance: Therefore, it should not delete them NiUnsubscribeFromAll(m_pkSlots); } //--------------------------------------------------------------------------- inline void NiUISignal0::EmitSignal() const { NiEmitSignalToAll(m_pkSlots, ()); } //--------------------------------------------------------------------------- inline void NiUISignal0::Subscribe(NiUIBaseSlot0* pkSlot) { NiSubscribeToMe(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- inline void NiUISignal0::Unsubscribe(NiUIBaseSlot0* pkSlot) { NiUnsubscribeToMe(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- inline bool NiUISignal0::IsSubscribed(NiUIBaseSlot0* pkSlot) const { return NiIsElementInGroup(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- inline unsigned int NiUISignal0::NumSubscribed() const { return NiNumElements(m_pkSlots); } //--------------------------------------------------------------------------- template inline NiUISignal1::NiUISignal1() { } //--------------------------------------------------------------------------- // All code in NiUISignal* methods are implemented in the macros defined in // NiUISignalSlotMacros.h. template inline NiUISignal1::~NiUISignal1() { // Note: None of the pointers in any of these destructors is owned by // this instance: Therefore, it should not delete them NiUnsubscribeFromAll(m_pkSlots); } //--------------------------------------------------------------------------- template inline void NiUISignal1::EmitSignal(Arg1Type Arg1) const { NiEmitSignalToAll(m_pkSlots, (Arg1)); } //--------------------------------------------------------------------------- template inline void NiUISignal1::Subscribe(NiUIBaseSlot1* pkSlot) { NiSubscribeToMe(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- template inline void NiUISignal1::Unsubscribe(NiUIBaseSlot1* pkSlot) { NiUnsubscribeToMe(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- template inline bool NiUISignal1::IsSubscribed(NiUIBaseSlot1* pkSlot) const { return NiIsElementInGroup(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- template inline unsigned int NiUISignal1::NumSubscribed() const { return NiNumElements(m_pkSlots); } //--------------------------------------------------------------------------- template inline NiUISignal2::NiUISignal2() { } //--------------------------------------------------------------------------- // All code in NiUISignal* methods are implemented in the macros defined in // NiUISignalSlotMacros.h. template inline NiUISignal2::~NiUISignal2() { // Note: None of the pointers in any of these destructors is owned by // this instance: Therefore, it should not delete them NiUnsubscribeFromAll(m_pkSlots); } //--------------------------------------------------------------------------- template inline void NiUISignal2::EmitSignal(Arg1Type Arg1, Arg2Type Arg2) const { NiEmitSignalToAll(m_pkSlots, (Arg1, Arg2)); } //--------------------------------------------------------------------------- template inline void NiUISignal2::Subscribe( NiUIBaseSlot2* pkSlot) { NiSubscribeToMe(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- template inline void NiUISignal2::Unsubscribe( NiUIBaseSlot2* pkSlot) { NiUnsubscribeToMe(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- template inline bool NiUISignal2::IsSubscribed( NiUIBaseSlot2* pkSlot) const { return NiIsElementInGroup(m_pkSlots, pkSlot); } //--------------------------------------------------------------------------- template inline unsigned int NiUISignal2::NumSubscribed() const { return NiNumElements(m_pkSlots); } //---------------------------------------------------------------------------