CASA/c_micasad/communication/CommunicationFactory.cs

31 lines
624 B
C#
Raw Normal View History

using System;
/* This class would have only static methods.
*/
namespace sscs.communication
{
class CommunicationFactory
{
/* Make the constructor private, to avoid instances of this
* class.
*/
private CommunicationFactory()
{
}
/* This method must check for platform and return
* an appropriate class. As of now, it assumes platform as Linux.
*/
public static Communication CreateCommunicationEndPoint()
{
#if LINUX
return( new UnixCommunication());
#endif
#if W32
return (new WinCommunication());
#endif
}
}
}