Vault
4.1
|
00001 /* 00002 Copyright c1997-2014 Trygve Isaacson. All rights reserved. 00003 This file is part of the Code Vault version 4.1 00004 http://www.bombaydigital.com/ 00005 License: MIT. See LICENSE.md in the Vault top level directory. 00006 */ 00007 00008 #ifndef vsocketthreadfactory_h 00009 #define vsocketthreadfactory_h 00010 00013 /* Note that this is an abstract base class with no implementation 00014 besides this header file's inline declarations. */ 00015 00016 class VSocket; 00017 class VSocketThread; 00018 class VListenerThread; 00019 class VManagementInterface; 00020 00028 class VSocketThreadFactory { 00029 public: 00030 00031 VSocketThreadFactory() : mManager(NULL) {} 00036 VSocketThreadFactory(VManagementInterface* manager) : mManager(manager) {} 00040 virtual ~VSocketThreadFactory() {} 00041 00047 void setManager(VManagementInterface* manager) { mManager = manager; } 00048 00055 virtual VSocketThread* createThread(VSocket* socket, VListenerThread* ownerThread) = 0; 00056 00057 protected: 00058 00059 VManagementInterface* mManager; 00060 00061 private: 00062 00063 VSocketThreadFactory(const VSocketThreadFactory&); // not copyable 00064 VSocketThreadFactory& operator=(const VSocketThreadFactory&); // not assignable 00065 }; 00066 00067 #endif /* vsocketthreadfactory_h */