StringIO.h

Go to the documentation of this file.
00001 /*
00002  * Copyright (c) 2005 Palmsource, Inc.
00003  * 
00004  * This software is licensed as described in the file LICENSE, which
00005  * you should have received as part of this distribution. The terms
00006  * are also available at http://www.openbinder.org/license.html.
00007  * 
00008  * This software consists of voluntary contributions made by many
00009  * individuals. For the exact contribution history, see the revision
00010  * history and logs, available at http://www.openbinder.org
00011  */
00012 
00013 #ifndef _SUPPORT_STRINGIO_H
00014 #define _SUPPORT_STRINGIO_H
00015 
00021 #include <support/TextStream.h>
00022 #include <support/ByteStream.h>
00023 #include <support/MemoryStore.h>
00024 
00025 #if _SUPPORTS_NAMESPACE
00026 namespace palmos {
00027 namespace support {
00028 #endif
00029 
00034 /*-------------------------------------------------------------------*/
00035 /*------- BStringIO Class -------------------------------------------*/
00036 
00037 class BStringIO : public BMallocStore, public BTextOutput
00038 {
00039     public:
00040 
00041                             BStringIO();
00042         virtual             ~BStringIO();
00043         
00044         const char *        String();
00045         size_t              StringLength() const;
00046         void                Clear(off_t to);
00047         void                Reset();
00048         void                PrintAndReset(const sptr<ITextOutput>& io);
00049 };
00050 
00051 /*-------------------------------------------------------------*/
00052 /*-------------------------------------------------------------*/
00053 
00056 #if _SUPPORTS_NAMESPACE
00057 } } // namespace palmos::support
00058 #endif
00059 
00060 #endif /* _SUPPORT_STRINGIO_H */