but with a Clear() method the dynamic allocated buffer can be easily reused added: DbTextStream a special version of a stream used to create a database string query everything is escaped by default added: DbBase a base class with some basic methods for communicating with the database added: DbConn a class for managing connection to the database changed: some refactoring in Db class git-svn-id: svn://ttmath.org/publicrep/winix/trunk@655 e52654a7-88a9-db11-a3e9-0013d4bc506e
48 lines
821 B
C++
Executable File
48 lines
821 B
C++
Executable File
/*
|
|
* This file is a part of Winix
|
|
* and is not publicly distributed
|
|
*
|
|
* Copyright (c) 2010, Tomasz Sowa
|
|
* All rights reserved.
|
|
*
|
|
*/
|
|
|
|
#ifndef headerfile_winix_core_textstream
|
|
#define headerfile_winix_core_textstream
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class TextStream
|
|
{
|
|
public:
|
|
|
|
void Clear();
|
|
const std::string & Str() const;
|
|
const char * CStr() const;
|
|
|
|
TextStream & operator<<(const char * str);
|
|
TextStream & operator<<(const std::string * str);
|
|
TextStream & operator<<(const std::string & str);
|
|
|
|
TextStream & operator<<(char);
|
|
TextStream & operator<<(int);
|
|
TextStream & operator<<(long);
|
|
TextStream & operator<<(unsigned int);
|
|
TextStream & operator<<(unsigned long);
|
|
TextStream & operator<<(double);
|
|
TextStream & operator<<(const void *);// printing a pointer
|
|
|
|
protected:
|
|
|
|
std::string buffer;
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
#endif
|
|
|