⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 resizeablestringformatter.h

📁 跨操作系统的微型中间件
💻 H
字号:
/*    File:       ResizeableStringFormatter.h    Contains:   Derived from StringFormatter, this transparently grows the                output buffer if the original buffer is too small to hold all                the data being placed in it        */#ifndef __RESIZEABLE_STRING_FORMATTER_H__#define __RESIZEABLE_STRING_FORMATTER_H__#include "StringFormatter.h"class ResizeableStringFormatter : public StringFormatter{    public:        // Pass in inBuffer=NULL and inBufSize=0 to dynamically allocate the initial buffer.        ResizeableStringFormatter(char* inBuffer = NULL, UInt32 inBufSize = 0)            : StringFormatter(inBuffer, inBufSize), fOriginalBuffer(inBuffer) {}                //If we've been forced to increase the buffer size, fStartPut WILL be a dynamically allocated        //buffer, and it WON'T be equal to fOriginalBuffer (obviously).        virtual ~ResizeableStringFormatter() {  if (fStartPut != fOriginalBuffer) delete [] fStartPut; }    private:                // This function will get called by StringFormatter if the current        // output buffer is full. This object allocates a buffer that's twice        // as big as the old one.        virtual void    BufferIsFull(char* inBuffer, UInt32 inBufferLen);                char*           fOriginalBuffer;        };#endif //__RESIZEABLE_STRING_FORMATTER_H__

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -