CASA/c_micasad/communication/CommunicationFactory.cs
2005-10-11 19:51:00 +00:00

31 lines
624 B
C#

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
}
}
}