00001 #ifndef _STR_BufferChunkFactory_H_ // -*-c++-*-
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifdef __GNUG__
00022 # pragma interface
00023 #endif
00024
00025
00026
00027
00028
00029
00030
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
00059
00060 inline int BufferChunk::Factory::AreYouA(const lcore::ClassIdent &cid) const
00061 {
00062 return((identifier == cid) || Protocol::AreYouA(cid));
00063 }
00064
00065 };
00066 };
00067
00068 #endif