added: TextStream<> DbTextStream<> and HtmlTextStream<> have operator<<(Space&) now
added: to db: bool DbBase::AssertValueSpace(PGresult * r, int row, int col, Space & space, bool split_single) added: environment variables for users User::env (of type Space) and User::aenv (of type Space) for admin variables (can be changed only by a super user) added: winix function 'env' for changing User::env and User::aenv ('env' winix function with a 'a' parameter) git-svn-id: svn://ttmath.org/publicrep/winix/trunk@790 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of Winix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* Copyright (c) 2010-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <string>
|
||||
#include "misc.h"
|
||||
#include "confparser.h"
|
||||
|
||||
|
||||
/*
|
||||
@@ -55,6 +56,9 @@ public:
|
||||
TextStream & operator<<(unsigned long);
|
||||
TextStream & operator<<(double);
|
||||
TextStream & operator<<(const void *);// printing a pointer
|
||||
TextStream & operator<<(const Space * space);
|
||||
TextStream & operator<<(const Space & space);
|
||||
|
||||
|
||||
TextStream & Write(const char * buf, size_t len);
|
||||
TextStream & Write(const wchar_t * buf, size_t len);
|
||||
@@ -64,7 +68,7 @@ public:
|
||||
protected:
|
||||
|
||||
StringType buffer;
|
||||
|
||||
std::wstring space_str; // for using with spaces
|
||||
};
|
||||
|
||||
|
||||
@@ -301,5 +305,25 @@ TextStream<StringType> & TextStream<StringType>::write(const wchar_t * buf, size
|
||||
return Write(buf, len);
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const Space * space)
|
||||
{
|
||||
// !! check me pls
|
||||
space->Serialize(*this, true, false);
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
template<class StringType>
|
||||
TextStream<StringType> & TextStream<StringType>::operator<<(const Space & space)
|
||||
{
|
||||
return operator<<(&space);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
|
Reference in New Issue
Block a user