[asycxx-devel] SF.net SVN: asycxx:[24] trunk
Status: Alpha
Brought to you by:
joe_steeve
From: <joe...@us...> - 2009-04-08 07:29:18
|
Revision: 24 http://asycxx.svn.sourceforge.net/asycxx/?rev=24&view=rev Author: joe_steeve Date: 2009-04-08 07:29:15 +0000 (Wed, 08 Apr 2009) Log Message: ----------- refactored Factory to ProtocolFactory * The 'Factory' class creates 'Protocol' objects. Refactored 'Factory' to 'ProtocolFactory' to be more specific. * Moved ProtocolFactory to 'asycxx' namespace From: Joe Steeve <js...@hi...> Added Paths: ----------- trunk/include/asycxx/ProtocolFactory.h trunk/src/ProtocolFactory.cxx Removed Paths: ------------- trunk/include/asycxx/Factory.h trunk/src/Factory.cxx Deleted: trunk/include/asycxx/Factory.h =================================================================== --- trunk/include/asycxx/Factory.h 2009-04-08 07:28:20 UTC (rev 23) +++ trunk/include/asycxx/Factory.h 2009-04-08 07:29:15 UTC (rev 24) @@ -1,41 +0,0 @@ - -/******************************************************************** - * Copyright (C) 2008,2009 HiPro IT Solutions Pvt. Ltd., Chennai. All - * rights reserved. - * - * This program and the accompanying materials are made available - * under the terms described in the LICENSE file which accompanies - * this distribution. If the LICENSE file was not attached to this - * distribution or for further clarifications, please contact - * le...@hi.... - * - *******************************************************************/ - -#ifndef __HIPRO_ASYCXX__FACTORY_H__ -#define __HIPRO_ASYCXX__FACTORY_H__ - -#include "Error.h" -#include "Reactor.h" -#include "Transport.h" - -class Factory -{ -public: - Factory (Reactor *reactor); - virtual ~Factory (); - virtual Protocol *GetProtocol (Transport *trans) = 0; - -protected: - Reactor *m_Reactor; -}; - -#endif /* __HIPRO_ASYCXX__FACTORY_H__ */ - -/* - Local Variables: - mode: c++ - indent-tabs-mode: nil - tab-width: 4 - c-file-style: "gnu" - End: -*/ Copied: trunk/include/asycxx/ProtocolFactory.h (from rev 23, trunk/include/asycxx/Factory.h) =================================================================== --- trunk/include/asycxx/ProtocolFactory.h (rev 0) +++ trunk/include/asycxx/ProtocolFactory.h 2009-04-08 07:29:15 UTC (rev 24) @@ -0,0 +1,42 @@ + +/******************************************************************** + * Copyright (C) 2008,2009 HiPro IT Solutions Pvt. Ltd., Chennai. All + * rights reserved. + * + * This program and the accompanying materials are made available + * under the terms described in the LICENSE file which accompanies + * this distribution. If the LICENSE file was not attached to this + * distribution or for further clarifications, please contact + * le...@hi.... + * + *******************************************************************/ + +#ifndef __HIPRO_ASYCXX__PROTOCOL_FACTORY_H__ +#define __HIPRO_ASYCXX__PROTOCOL_FACTORY_H__ + +#include "Error.h" +#include "Reactor.h" +#include "Transport.h" + +namespace asycxx +{ + class ProtocolFactory + { + public: + ProtocolFactory (Reactor *reactor); + virtual ~ProtocolFactory () {} + + protected: + Reactor *m_Reactor; + }; +} +#endif /* __HIPRO_ASYCXX__PROTOCOL_FACTORY_H__ */ + +/* + Local Variables: + mode: c++ + indent-tabs-mode: nil + tab-width: 4 + c-file-style: "gnu" + End: +*/ Deleted: trunk/src/Factory.cxx =================================================================== --- trunk/src/Factory.cxx 2009-04-08 07:28:20 UTC (rev 23) +++ trunk/src/Factory.cxx 2009-04-08 07:29:15 UTC (rev 24) @@ -1,52 +0,0 @@ - -/******************************************************************** - * Copyright (C) 2008,2009 HiPro IT Solutions Pvt. Ltd., Chennai. All - * rights reserved. - * - * This program and the accompanying materials are made available - * under the terms described in the LICENSE file which accompanies - * this distribution. If the LICENSE file was not attached to this - * distribution or for further clarifications, please contact - * le...@hi.... - * - *******************************************************************/ - -#ifdef HAVE_CONFIG_H -#include <asycxx-config.h> -#endif - - -#include "asycxx-common.h" -#include <asycxx/Error.h> -#include <asycxx/Reactor.h> -#include <asycxx/Factory.h> - - -/** - * \author Joe Steeve, jo...@hi... - * \class Factory - * \brief Defines a protocol-factory - * - * \details This class is a factory class that produces - * protocols. This will be used by a 'Listener'/'Connector' to produce - * protocols to handle a new connection. - */ - -Factory::Factory (Reactor *reactor) -{ - ASSERT ((reactor != NULL), "checking parameters"); - m_Reactor = reactor; -} - -Factory::~Factory () -{ -} - -/* - Local Variables: - mode: c++ - indent-tabs-mode: nil - tab-width: 4 - c-file-style: "gnu" - End: -*/ Copied: trunk/src/ProtocolFactory.cxx (from rev 23, trunk/src/Factory.cxx) =================================================================== --- trunk/src/ProtocolFactory.cxx (rev 0) +++ trunk/src/ProtocolFactory.cxx 2009-04-08 07:29:15 UTC (rev 24) @@ -0,0 +1,36 @@ + +/******************************************************************** + * Copyright (C) 2008,2009 HiPro IT Solutions Pvt. Ltd., Chennai. All + * rights reserved. + * + * This program and the accompanying materials are made available + * under the terms described in the LICENSE file which accompanies + * this distribution. If the LICENSE file was not attached to this + * distribution or for further clarifications, please contact + * le...@hi.... + * + *******************************************************************/ + +#ifdef HAVE_CONFIG_H +#include <asycxx-config.h> +#endif + +#include "asycxx-common.h" +#include <asycxx/ProtocolFactory.h> + +using namespace asycxx; + +ProtocolFactory::ProtocolFactory (Reactor *reactor) +{ + ASSERT ((reactor != NULL), "checking parameters"); + m_Reactor = reactor; +} + +/* + Local Variables: + mode: c++ + indent-tabs-mode: nil + tab-width: 4 + c-file-style: "gnu" + End: +*/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |