00001 #ifndef _STR_DynamicBuffer_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 #include <StrMod/BufferChunk.h>
00030
00031 #define _STR_DynamicBuffer_H_
00032
00033 namespace strmod {
00034 namespace strmod {
00035
00036
00037
00038
00039 class DynamicBuffer : public BufferChunk
00040 {
00041 public:
00042 static const STR_ClassIdent identifier;
00043
00044 DynamicBuffer() { }
00045 DynamicBuffer(unsigned int len) throw(std::bad_alloc);
00046 DynamicBuffer(const void *data, unsigned int len) throw(std::bad_alloc);
00047 virtual ~DynamicBuffer();
00048
00049 inline virtual int AreYouA(const lcore::ClassIdent &cid) const;
00050
00051 virtual void resize(unsigned int newsize) throw(std::bad_alloc);
00052
00053 protected:
00054 virtual const lcore::ClassIdent *i_GetIdent() const { return &identifier; }
00055 };
00056
00057
00058
00059 inline int DynamicBuffer::AreYouA(const lcore::ClassIdent &cid) const
00060 {
00061 return((identifier == cid) || BufferChunk::AreYouA(cid));
00062 }
00063
00064 }
00065 }
00066
00067 #endif