Moving micasa 1.5 trunk to Novell forge.
This commit is contained in:
30
c_micasad/communication/CommunicationFactory.cs
Normal file
30
c_micasad/communication/CommunicationFactory.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user