Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

BufferChunkFactory.h

00001 #ifndef _STR_BufferChunkFactory_H_  // -*-c++-*-
00002 
00003 /*
00004  * Copyright (C) 1991-9 Eric M. Hopper <hopper@omnifarious.mn.org>
00005  * 
00006  *     This program is free software; you can redistribute it and/or modify it
00007  *     under the terms of the GNU Lesser General Public License as published
00008  *     by the Free Software Foundation; either version 2 of the License, or
00009  *     (at your option) any later version.
00010  * 
00011  *     This program is distributed in the hope that it will be useful, but
00012  *     WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  *     Lesser General Public License for more details.
00015  * 
00016  *     You should have received a copy of the GNU Lesser General Public
00017  *     License along with this program; if not, write to the Free Software
00018  *     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00019  */
00020 
00021 #ifdef __GNUG__
00022 #  pragma interface
00023 #endif
00024 
00025 /* $Header: /home/hopper/src/cvs/C++/StrMod/StrMod/BufferChunkFactory.h,v 1.4 2002/08/29 00:58:04 hopper Exp $ */
00026 
00027 // For a log, see ../ChangeLog
00028 //
00029 // Revision 1.1  1999/09/16 01:41:21  hopper
00030 // An interface for things that create BufferChunks.
00031 //
00032 
00033 #include <LCore/Protocol.h>
00034 #include <StrMod/STR_ClassIdent.h>
00035 #include <StrMod/BufferChunk.h>
00036 
00037 #define _STR_BufferChunkFactory_H_
00038 
00039 namespace strmod {
00040 namespace strmod {
00041 
00042 class BufferChunk::Factory : virtual public lcore::Protocol
00043 {
00044  public:
00045    static const STR_ClassIdent identifier;
00046 
00047    Factory()                                            { }
00048    virtual ~Factory()                                   { }
00049 
00050    inline virtual int AreYouA(const lcore::ClassIdent &cid) const;
00051 
00052    virtual BufferChunk *makeChunk() = 0;
00053 
00054  protected:
00055    virtual const lcore::ClassIdent *i_GetIdent() const  { return &identifier; }
00056 };
00057 
00058 //-----------------------------inline functions--------------------------------
00059 
00060 inline int BufferChunk::Factory::AreYouA(const lcore::ClassIdent &cid) const
00061 {
00062    return((identifier == cid) || Protocol::AreYouA(cid));
00063 }
00064 
00065 };  // namespace strmod
00066 };  // namespace strmod
00067 
00068 #endif

Generated on Wed Jan 29 00:32:43 2003 for libNet by doxygen1.3-rc1