code/WPILib/DigitalModule.cpp
/**
 * Get an instance of an Digital Module.
 * Singleton digital module creation where a module is allocated on the first use
 * and the same module is returned on subsequent uses.
 */
Get an instance of an Digital Module.
Singleton digital module creation where a module is allocated on the first use
and the same module is returned on subsequent uses.
Get an instance of an Digital Module . Singleton digital module creation where a module is allocated on the first use and the same module is returned on subsequent uses .
DigitalModule* DigitalModule::GetInstance(UINT32 slot)
{
	if (CheckDigitalModule(slot))
	{
		if (m_modules[slot] == NULL)
		{
			m_modules[slot] = new DigitalModule(slot);
		}
		return (DigitalModule*)m_modules[slot];
	}
	return NULL;
}
DigitalModule * DigitalModule :: GetInstance ( UINT32 slot ) { if ( CheckDigitalModule ( slot ) ) { if ( m_modules [ slot ] == NULL ) { m_modules [ slot ] = new DigitalModule ( slot ) ; } return ( DigitalModule * ) m_modules [ slot ] ; } return NULL ; }
Get an instance of an Digital Module.
Get an instance of an Digital Module .