You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(622) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(303) |
Feb
(64) |
Mar
(5) |
Apr
(63) |
May
(82) |
Jun
(53) |
Jul
(50) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Christian P. <cp...@us...> - 2005-01-17 22:39:12
|
Update of /cvsroot/pclasses/pclasses2/m4 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32184/m4 Added Files: gcc_visibility.m4 Log Message: Added gcc visibility patch support. --- NEW FILE: gcc_visibility.m4 --- dnl dnl Check for gcc visibility support (gcc 4.0 or higher, or gcc 3.x dnl with backported visibility patch) dnl dnl (C) 2004 Bernhard Rosenkraenzer <be...@ar...> dnl AC_DEFUN([PC_CHECK_CXX_VISIBILITY], [AC_MSG_CHECKING([for gcc visibility support]) save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fvisibility=hidden" AC_COMPILE_IFELSE([int main(int, char **) { }], [ ac_cv_cxx_visibility=yes AC_DEFINE([GCC_VISIBILITY], 1, [Define if g++ supports -fvisibility]) ], [ ac_cv_cxx_visibility=no CXXFLAGS="$save_CXXFLAGS" ]) AC_MSG_RESULT([$ac_cv_cxx_visibility])]) |
From: Christian P. <cp...@us...> - 2005-01-17 22:39:08
|
Update of /cvsroot/pclasses/pclasses2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32184 Modified Files: configure.in Log Message: Added gcc visibility patch support. Index: configure.in =================================================================== RCS file: /cvsroot/pclasses/pclasses2/configure.in,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- configure.in 16 Jan 2005 00:18:54 -0000 1.6 +++ configure.in 17 Jan 2005 22:38:44 -0000 1.7 @@ -33,6 +33,11 @@ AM_PROG_LIBTOOL dnl +dnl check for compiler features +dnl +PC_CHECK_CXX_VISIBILITY + +dnl dnl compiling on big-endian architecture? dnl AC_C_BIGENDIAN |
From: Christian P. <cp...@us...> - 2005-01-17 22:02:22
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Plugin In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23767/include/pclasses/Plugin Modified Files: Plugin.h Log Message: Added #ifdef around PCLASSES_LIB_DIR and PCLASSES_PLUGINS_DIR - seems not possible with autoconf/automake since PCLASSES_LIB_DIR ($pkglibdir) is left unexpanded in config.h. ugh! Index: Plugin.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Plugin/Plugin.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Plugin.h 10 Jan 2005 13:00:56 -0000 1.13 +++ Plugin.h 17 Jan 2005 22:01:54 -0000 1.14 @@ -245,9 +245,13 @@ void init() { this->m_path.addPath( "." ); +#ifdef PCLASSES_PLUGINS_DIR this->m_path.addPath( PCLASSES_PLUGINS_DIR ); +#endif +#ifdef PCLASSES_LIB_DIR this->m_path.addPath( PCLASSES_LIB_DIR ); - this->m_path.addExtension(std::string(".")+::P::System::SharedLib::extension()); +#endif + this->m_path.addExtension(std::string(".")+System::SharedLib::extension()); } PluginsMap m_smap; ::P::System::PathFinder m_path; |
From: Christian P. <cp...@us...> - 2005-01-17 21:58:51
|
Update of /cvsroot/pclasses/pclasses2/src/IO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23030/src/IO Modified Files: URL.cpp Log Message: Added support for URL arguments (needed for HTTP post data as well). Added support for URL anchors. Added support for URL encoding/decoding. todo: Implement URL::encode()/URL::decode() Index: URL.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/IO/URL.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- URL.cpp 26 Dec 2004 16:26:03 -0000 1.1 +++ URL.cpp 17 Jan 2005 21:58:36 -0000 1.2 @@ -32,254 +32,429 @@ namespace P { namespace IO { -using namespace std; - URL::URL() { - m_proto = "file"; - m_port = 0; - m_path = "/"; + _proto = "file"; + _port = 0; + _path = "/"; } -URL::URL(const string& url) throw(InvalidURL/*,NetDbError*/) +URL::URL(const std::string& url) throw(InvalidURL/*,NetDbError*/) { - *this = url; + *this = url; } URL::URL(const URL& url) -: m_proto(url.m_proto), m_host(url.m_host), m_user(url.m_user), - m_passwd(url.m_passwd), m_port(url.m_port), m_path(url.m_path) -{} +: _proto(url._proto), _host(url._host), _user(url._user), + _passwd(url._passwd), _port(url._port), _path(url._path), + _args(url._args), _anchor(url._anchor) +{ +} -URL::~URL() +URL::~URL() throw() { } -void URL::setProtocol(const string& proto, bool setPort) +void URL::setProtocol(const std::string& proto) { - m_proto = proto; + _proto = proto; +} - if(setPort) - { - m_port = lookupPort(proto); - } +const std::string& URL::protocol() const throw() +{ + return _proto; } -void URL::setHost(const string& host) +void URL::setHost(const std::string& host) { - m_host = host; + _host = host; } -void URL::setUser(const string& user) +const std::string& URL::host() const throw() { - m_user = user; + return _host; } -void URL::setPassword(const string& passwd) +void URL::setUser(const std::string& user) { - m_passwd = passwd; + _user = user; +} + +const std::string& URL::user() const throw() +{ + return _user; +} + +void URL::setPassword(const std::string& passwd) +{ + _passwd = passwd; +} + +const std::string& URL::password() const throw() +{ + return _passwd; } void URL::setPort(unsigned short port) { - m_port = port; + _port = port; } -void URL::setPath(const string& path) +unsigned short URL::port() const throw() { - if(path.empty()) - m_path = "/"; - else - m_path = path; + return _port; +} + +void URL::setPath(const std::string& path) +{ + if(path.empty()) + { + _path = "/"; + } + else + { + // make sure we have a leading slash in the path ... + if(path[0] != '/') + _path = "/" + path; + else + _path = path; + } +} + +const std::string& URL::path() const throw() +{ + return _path; +} + +URL::ArgumentMap URL::fromString(const std::string& args) +{ + ArgumentMap pargs; + std::istringstream is(args); + + char ch; + bool invalue = false; + std::ostringstream os_name, os_val; + + do + { + is >> ch; + + if(ch == '?' || ch == '&' || !is) + { + std::string name = os_name.str(); + std::string value = os_val.str(); + + if(!name.empty()) + pargs[decode(name)] = decode(value); + + invalue = false; + os_name.str(""); + os_val.str(""); + continue; + } + + if(ch == '=') + { + invalue = true; + continue; + } + + if(invalue) + os_val << ch; + else + os_name << ch; + + } while(is); + + return pargs; +} + +std::string URL::toString(const ArgumentMap& args) +{ + std::ostringstream os; + + // add URL arguments ... + URL::ArgumentMap::const_iterator i = args.begin(); + while(i != args.end()) + { + if(i != args.begin()) + os << '&'; + + // add urlencoded arg... + os << URL::encode(i->first) + << '=' + << URL::encode(i->second); + + ++i; + } + + return os.str(); +} + +void URL::addArg(const std::string& name, const std::string& value) +{ + _args[name] = value; +} + +const std::string& URL::arg(const std::string& name) const throw() +{ + static std::string emptyStr; + ArgumentMap::const_iterator i = _args.find(name); + if(i != _args.end()) + return i->second; + + return emptyStr; +} + +void URL::setArgs(const ArgumentMap& args) +{ + _args = args; +} + +void URL::setArgs(const std::string& args) +{ + _args = fromString(args); +} + +const URL::ArgumentMap& URL::args() const throw() +{ + return _args; +} + +std::string URL::args(std::string /*<- dummy */) const +{ + return toString(_args); +} + +void URL::clearArgs() throw() +{ + _args.clear(); +} + +void URL::setAnchor(const std::string& anch) +{ + _anchor = anch; +} + +const std::string& URL::anchor() const throw() +{ + return _anchor; } URL& URL::operator=(const URL& url) { - m_proto = url.m_proto; - m_host = url.m_host; - m_user = url.m_user; - m_passwd= url.m_passwd; - m_port = url.m_port; - m_path = url.m_path; - return *this; + _proto = url._proto; + _host = url._host; + _user = url._user; + _passwd = url._passwd; + _port = url._port; + _path = url._path; + _args = url._args; + _anchor = url._anchor; + + return *this; } -URL& URL::operator=(const string& url) throw(InvalidURL/*,NetDbError*/) +URL& URL::operator=(const std::string& url) throw(InvalidURL/*,NetDbError*/) { - string proto, host, user, passwd, path, port; - istringstream is(url); - ostringstream os; - - char ch; - bool atfound = url.find('@') != (size_t)-1 ? true : false; + std::string proto, host, user, passwd, path, port; + std::istringstream is(url); + std::ostringstream os; + + char ch; + bool atfound = url.find('@') != (size_t)-1 ? true : false; - // parse until protocol delimiter found... - while((is >> ch)) - { - if(ch == ':') - { - if((is >> ch) && ch == '/' && - (is >> ch) && ch == '/') - break; - throw InvalidURL(std::string("Invalid url: "+url).c_str(), P_SOURCEINFO); - - } - else if(!isalnum(ch) && !isalpha(ch)) - throw InvalidURL(std::string("Invalid url: "+url).c_str(), P_SOURCEINFO); - os << ch; - } + // parse until protocol delimiter found... + while((is >> ch)) + { + if(ch == ':') + { + if((is >> ch) && ch == '/' && + (is >> ch) && ch == '/') + break; - if(!is) - throw InvalidURL("Invalid url", P_SOURCEINFO); + throw InvalidURL(std::string("Invalid url: "+url).c_str(), P_SOURCEINFO); + + } + else if(!isalnum(ch) && !isalpha(ch)) + throw InvalidURL(std::string("Invalid url: "+url).c_str(), P_SOURCEINFO); - proto = os.str(); - os.str(""); + os << ch; + } - // parse hostname ... - bool atproc = false; - while((is >> ch)) - { - // username in hostname ? - if(ch == '@') - { - user = os.str(); - os.str(""); + if(!is) + throw InvalidURL("Invalid url", P_SOURCEINFO); - size_t pos = user.find(':'); - if(pos != (size_t)-1) - { - passwd = user.substr(pos+1, user.length() - (pos + 1)); - user = user.substr(0, pos); - } - - atproc = true; - continue; - } - else if(((atfound && ch == ':') && (atproc && ch == ':')) || ch == '/') - break; + proto = os.str(); + os.str(""); - os << ch; - } + // parse hostname ... + bool atproc = false; + while((is >> ch)) + { + // username in hostname ? + if(ch == '@') + { + user = os.str(); + os.str(""); - host = os.str(); - os.str(""); + size_t pos = user.find(':'); + if(pos != (size_t)-1) + { + passwd = user.substr(pos+1, user.length() - (pos + 1)); + user = user.substr(0, pos); + } - if(!is) - { - m_proto = proto; - m_host = host; - m_user = user; - m_passwd= passwd; - m_port = lookupPort(proto); - m_path = "/"; - return *this; - } + atproc = true; + continue; + } + else if(((atfound && ch == ':') && (atproc && ch == ':')) || ch == '/') + break; + + os << ch; + } + + host = os.str(); + os.str(""); + + if(!is) + { + _proto = proto; + _host = host; + _user = user; + _passwd = passwd; + _port = 0; + _path = "/"; + _args.clear(); + _anchor = ""; + + return *this; + } - // parse port ... - if(ch == ':') - { - while((is >> ch)) - { - if(ch == '/') - break; - else if(!isdigit(ch)) - throw InvalidURL("Non-digit in port not allowed", P_SOURCEINFO); + // parse port ... + if(ch == ':') + { + while((is >> ch)) + { + if(ch == '/') + break; + else if(!isdigit(ch)) + throw InvalidURL("Non-digit in port not allowed", P_SOURCEINFO); - os << ch; - } + os << ch; + } - port = os.str(); - os.str(""); - } + port = os.str(); + os.str(""); + } - if(!is) - { - m_proto = proto; - m_host = host; - m_user = user; - m_passwd= passwd; + if(!is) + { + _proto = proto; + _host = host; + _user = user; + _passwd = passwd; + _port = atoi(port.c_str()); + _path = "/"; + _args.clear(); + _anchor = ""; + return *this; + } - m_port = atoi(port.c_str()); - if(!m_port) - m_port = lookupPort(proto); - - m_path = "/"; - return *this; - } + os << '/'; - os << '/'; - - // parse path - while((is >> ch)) - os << ch; - - m_proto = proto; - m_host = host; - m_user = user; - m_passwd= passwd; + // parse path + while((is >> ch)) + os << ch; - m_port = atoi(port.c_str()); - if(!m_port) - m_port = lookupPort(proto); + //@@fixme ... parse args and anchor + + _proto = proto; + _host = host; + _user = user; + _passwd = passwd; + _port = atoi(port.c_str()); + _path = decode(os.str()); + _args.clear(); + _anchor = ""; - m_path = os.str(); - - return *this; + return *this; } -bool URL::operator==(const URL& url) const +bool URL::operator==(const URL& url) const throw() { - if(m_proto == url.m_proto && m_host == url.m_host && - m_user == url.m_user && m_passwd == url.m_passwd && - m_port == url.m_port && m_path == url.m_path) - return true; - return false; + if(_proto == url._proto && _host == url._host && + _user == url._user && _passwd == url._passwd && + _port == url._port && _path == url._path && + _args == url._args && _anchor == url._anchor) + return true; + + return false; } -string URL::str() const +std::string URL::str() const { - ostringstream os; - os << *this; - return os.str(); + std::ostringstream os; + os << *this; + return os.str(); } -ostream& operator<<(ostream& os, const URL& url) +std::ostream& operator<<(std::ostream& os, const URL& url) { - os << url.m_proto << "://"; + // add protocol... + os << url._proto << "://"; - if(!url.m_user.empty()) - { - os << url.m_user; - os << '@'; - } - - os << url.m_host; + // add username ... + if(!url._user.empty()) + { + os << url._user; + os << '@'; + } - if(url.m_port != URL::lookupPort(url.m_proto)) - os << ':' << url.m_port; + // add hostname + os << url._host; - os << url.m_path; - return os; + // add port ... + if(url._port) + os << ':' << url._port; + + // add path ... + os << URL::encode(url._path); + + // add URL arguments ... + std::string args = URL::toString(url._args); + if(!args.empty()) + os << '?' << args; + + // add anchor if set ... + if(!url._anchor.empty()) + os << "#" << URL::encode(url._anchor); + + return os; } -istream& operator>>(istream& is, URL& url) throw(InvalidURL) +std::istream& operator>>(std::istream& is, URL& url) throw(InvalidURL) { - string str; - if(is) - { - is >> str; - url = str; - } - - return is; + std::string str; + if(is) + { + is >> str; + url = str; + } + + return is; } -unsigned short URL::lookupPort(const string& service, const string& proto) +std::string URL::encode(const std::string& str) { - return 0; -// NetDb::ServiceEntry se = NetDb::serviceByName(service, proto); -// return se.port(); + return str; } -}} // P::IO +std::string URL::decode(const std::string& str) +{ + return str; +} + +} // !namespace IO +} // !namespace P |
From: Christian P. <cp...@us...> - 2005-01-17 21:57:04
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22829/include/pclasses Modified Files: Makefile.am Log Message: Added Export.h Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Makefile.am,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile.am 16 Jan 2005 00:08:00 -0000 1.8 +++ Makefile.am 17 Jan 2005 21:56:51 -0000 1.9 @@ -9,4 +9,4 @@ Stack.h LinkedItem.h Pair.h IntTypeLimits.h Queue.h IntrusivePtr.h \ CircularQueue.h List.h NonCopyable.h Phoenix.h Factory.h \ Time.h Date.h DateTime.h TimeSpan.h Callback.h Signal.h \ - Trace.h PropertyMap.h + Trace.h PropertyMap.h Export.h |
From: Christian P. <cp...@us...> - 2005-01-17 21:56:12
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/IO In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22324/include/pclasses/IO Modified Files: BZip2.h IODevice.h IOError.h IOFilter.h IOStream.h StringDevice.h URL.h ZLib.h ZLibIOFilter.h Log Message: Added xxx_EXPORT macros for upcoming win32 and gcc visibility patch support. Index: URL.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/URL.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- URL.h 26 Dec 2004 16:26:01 -0000 1.1 +++ URL.h 17 Jan 2005 21:55:23 -0000 1.2 @@ -17,110 +17,144 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#ifndef _purl_h_ -#define _purl_h_ +#ifndef P_IO_URL_h +#define P_IO_URL_h -// #include <pclasses/pexport.h> +#include <pclasses/Export.h> #include <pclasses/Exception.h> -// #include <pclasses/pnetdb.h> #include <iostream> +#include <map> #include <string> namespace P { + namespace IO { - //! Invalid url error - /*! - \ingroup net - \author Christian Prochnow <cp...@se...> - */ - class /* PNET_EXPORT*/ InvalidURL: public RuntimeError { - public: - inline InvalidURL(const char* _what, const SourceInfo& _si) throw() - : RuntimeError(_what,_si) {} - }; +//! Invalid url error +/*! + \author Christian Prochnow <cp...@se...> +*/ +class PIO_EXPORT InvalidURL: public RuntimeError { +public: + inline InvalidURL(const char* _what, const SourceInfo& _si) throw() + : RuntimeError(_what,_si) + { } +}; - //! Uniform resource locator - /*! - This class is used to parse and store uniform resource - locators. When storing a URL with password the password - will not be printed out by the operator<< but can - be retrieved via password(). - \ingroup net - \author Christian Prochnow <cp...@se...> - */ - class /*PNET_EXPORT*/ URL { +//! Uniform resource locator +/*! + This class is used to parse and store uniform resource + locators. When storing a URL with password the password + will not be printed out by the operator<< but can + be retrieved via password(). + \author Christian Prochnow <cp...@se...> +*/ +class PIO_EXPORT URL { public: + typedef std::map<std::string, std::string> ArgumentMap; + //! Default constructor /*! Initializes the URL to 'file:///' */ URL(); - + //! Parse URL constructor - URL(const std::string& url) throw(InvalidURL/*,NetDbError*/); - + URL(const std::string& url) throw(InvalidURL); + + //! Copy constructor URL(const URL& url); - - ~URL(); - inline const std::string& protocol() const - { return m_proto; } + ~URL() throw(); - /** - Achtung: setPort is currently ignored, and might go away, - due to a dep on network libs. - */ - void setProtocol(const std::string& proto, bool setPort = true); - - inline const std::string& host() const - { return m_host; } + const std::string& protocol() const throw(); + void setProtocol(const std::string& proto); + const std::string& host() const throw(); void setHost(const std::string& host); - inline const std::string& user() const - { return m_user; } - + const std::string& user() const throw(); void setUser(const std::string& user); - inline const std::string& password() const - { return m_passwd; } - + const std::string& password() const throw(); void setPassword(const std::string& passwd); - - inline unsigned short port() const - { return m_port; } + unsigned short port() const throw(); void setPort(unsigned short port); - - inline const std::string& path() const - { return m_path; } + const std::string& path() const throw(); void setPath(const std::string& path); + //! Returns the argument for the given key + const std::string& arg(const std::string& key) const throw(); + + //! Add argument to URL + void addArg(const std::string& name, const std::string& value); + + //! Set arguments + void setArgs(const ArgumentMap& args); + + //! Set arguments from URL-encoded string + void setArgs(const std::string& str); + + //! Returns arguments + const ArgumentMap& args() const throw(); + + //! Returns arguments as url encoded string + std::string args(std::string) const; + + //! Clear arguments + void clearArgs() throw(); + + //! Returns the anchor + const std::string& anchor() const throw(); + + //! Sets the anchor + void setAnchor(const std::string& anch); + + //! URL assignment operator URL& operator=(const URL& url); - URL& operator=(const std::string& url) throw(InvalidURL/*,NetDbError*/); - bool operator==(const URL& url) const; - + //! String assignment operator + URL& operator=(const std::string& url) throw(InvalidURL); + + //! Compare URLs + bool operator==(const URL& url) const throw(); + + //! Returns the URL as URL-encoded string std::string str() const; - - /* PNET_EXPORT*/ friend std::ostream& operator<<(std::ostream& os, const URL& url); - /*PNET_EXPORT*/ friend std::istream& operator>>(std::istream& is, URL& url) throw(InvalidURL); - + + //! URL-encodes the given string + static std::string encode(const std::string& str); + + //! URL-decodes the given string + static std::string decode(const std::string& str); + + friend PIO_EXPORT std::ostream& operator<<(std::ostream& os, + const URL& url); + + friend PIO_EXPORT std::istream& operator>>(std::istream& is, URL& url) + throw(InvalidURL); + + //! Returns a ArgumentMap for given URL-encoded argument-string + static ArgumentMap fromString(const std::string& args); + + //! Returns the URL-encoded string representation of the given ArgumentMap + static std::string toString(const ArgumentMap& args); + private: - /** - currently always returns 0. - */ - static unsigned short lookupPort(const std::string& service, const std::string& proto = "tcp"); // const? - std::string m_proto; - std::string m_host; - std::string m_user; - std::string m_passwd; - unsigned short m_port; - std::string m_path; - }; + std::string _proto; + std::string _host; + std::string _user; + std::string _passwd; + unsigned short _port; + std::string _path; + ArgumentMap _args; + std::string _anchor; +}; -}} // P::IO +} // !namespace IO + +} // !namespace P #endif Index: IOFilter.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/IOFilter.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- IOFilter.h 6 Jan 2005 17:24:20 -0000 1.3 +++ IOFilter.h 17 Jan 2005 21:55:23 -0000 1.4 @@ -21,6 +21,7 @@ #ifndef P_IO_IOFilter_h #define P_IO_IOFilter_h +#include <pclasses/Export.h> #include <pclasses/IO/IOError.h> #include <pclasses/IO/IODevice.h> @@ -28,7 +29,7 @@ namespace IO { -class IOFilter { +class PIO_EXPORT IOFilter { public: IOFilter(); virtual ~IOFilter(); Index: ZLib.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/ZLib.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- ZLib.h 6 Jan 2005 17:24:20 -0000 1.3 +++ ZLib.h 17 Jan 2005 21:55:23 -0000 1.4 @@ -21,6 +21,7 @@ #ifndef P_IO_ZLib_h #define P_IO_ZLib_h +#include <pclasses/Export.h> #include <pclasses/Exception.h> #include <pclasses/IntTypes.h> #include <string> @@ -33,7 +34,7 @@ namespace IO { //! ZLib error -class ZLibError: public RuntimeError { +class PIO_EXPORT ZLibError: public RuntimeError { public: ZLibError(int err, const char* msg, const char* what, const SourceInfo& si); ~ZLibError(); @@ -47,7 +48,7 @@ }; //! ZLib stream base -class ZLibStream { +class PIO_EXPORT ZLibStream { public: ZLibStream(size_t bufferSize); virtual ~ZLibStream(); @@ -74,7 +75,7 @@ }; //! ZLib output (deflate) stream -class ZLibOutputStream: public ZLibStream { +class PIO_EXPORT ZLibOutputStream: public ZLibStream { public: ZLibOutputStream(int level = 6, size_t bufferSize = 1024) throw(ZLibError); ~ZLibOutputStream() throw(); @@ -95,7 +96,7 @@ }; //! ZLib input (inflate) stream -class ZLibInputStream: public ZLibStream { +class PIO_EXPORT ZLibInputStream: public ZLibStream { public: ZLibInputStream(size_t bufferSize = 1024) throw(ZLibError); ~ZLibInputStream() throw(); Index: ZLibIOFilter.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/ZLibIOFilter.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ZLibIOFilter.h 6 Jan 2005 17:24:20 -0000 1.2 +++ ZLibIOFilter.h 17 Jan 2005 21:55:23 -0000 1.3 @@ -21,6 +21,7 @@ #ifndef P_IO_ZLibIOFilter_h #define P_IO_ZLibIOFilter_h +#include <pclasses/Export.h> #include <pclasses/IO/IOFilter.h> #include <pclasses/IO/ZLib.h> @@ -32,7 +33,7 @@ /*! ZLib stream based I/O Filter. This is not a gzip filter! */ -class ZLibIOFilter: public IOFilter { +class PIO_EXPORT ZLibIOFilter: public IOFilter { public: ZLibIOFilter(); ~ZLibIOFilter(); Index: IODevice.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/IODevice.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- IODevice.h 7 Jan 2005 13:33:15 -0000 1.5 +++ IODevice.h 17 Jan 2005 21:55:22 -0000 1.6 @@ -21,6 +21,7 @@ #ifndef P_IO_IODevice_h #define P_IO_IODevice_h +#include <pclasses/Export.h> #include <pclasses/BasicTypes.h> #include <pclasses/IO/IOError.h> @@ -32,7 +33,7 @@ class IOListener; //! I/O Device base class -class IODevice { +class PIO_EXPORT IODevice { public: friend class IOListener; friend class IOFilter; @@ -138,7 +139,7 @@ char* _readBuffNext; }; -class IOListener { +class PIO_EXPORT IOListener { public: enum EventFlags { None = 0x0, Index: IOStream.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/IOStream.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- IOStream.h 30 Dec 2004 19:46:52 -0000 1.2 +++ IOStream.h 17 Jan 2005 21:55:23 -0000 1.3 @@ -18,6 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ +#include <pclasses/Export.h> #include <pclasses/IO/IODevice.h> #include <iostream> @@ -26,7 +27,7 @@ namespace IO { //! I/O Stream buffering class -class IOStreamBuffer: public std::streambuf { +class PIO_EXPORT IOStreamBuffer: public std::streambuf { public: IOStreamBuffer(IODevice& dev, size_t outBufferSize = 1024, size_t inBufferSize = 1024); @@ -47,7 +48,7 @@ //! I/O Stream that works with IODevice's -class IOStream: public std::iostream { +class PIO_EXPORT IOStream: public std::iostream { public: IOStream(IODevice& dev, size_t outBufferSize = 1024, size_t inBufferSize = 1024); Index: StringDevice.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/StringDevice.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- StringDevice.h 1 Jan 2005 19:24:26 -0000 1.1 +++ StringDevice.h 17 Jan 2005 21:55:23 -0000 1.2 @@ -11,6 +11,8 @@ StringDevice is an experiment to get to know the IO layer better. It implements an IODevice interface into a Unicode::String buffer of arbitrary size. + + @@fixme .. implementation is out of sync!! */ class StringDevice : public IODevice { Index: BZip2.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/BZip2.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- BZip2.h 6 Jan 2005 18:30:33 -0000 1.1 +++ BZip2.h 17 Jan 2005 21:55:21 -0000 1.2 @@ -21,6 +21,7 @@ #ifndef P_IO_BZip2_h #define P_IO_BZip2_h +#include <pclasses/Export.h> #include <pclasses/Exception.h> #include <pclasses/IntTypes.h> #include <string> @@ -30,7 +31,7 @@ namespace IO { //! BZip2 error -class BZip2Error: public RuntimeError { +class PIO_EXPORT BZip2Error: public RuntimeError { public: BZip2Error(int err, const char* what, const SourceInfo& si); ~BZip2Error(); @@ -43,7 +44,7 @@ }; //! Bzip2 stream base -class BZip2Stream { +class PIO_EXPORT BZip2Stream { public: BZip2Stream(size_t bufferSize); virtual ~BZip2Stream(); @@ -67,7 +68,7 @@ }; //! BZip2 output (deflate) stream -class BZip2OutputStream: public BZip2Stream { +class PIO_EXPORT BZip2OutputStream: public BZip2Stream { public: BZip2OutputStream(int level = 6, size_t bufferSize = 1024) throw(BZip2Error); ~BZip2OutputStream() throw(); @@ -88,7 +89,7 @@ }; //! BZip2 input (inflate) stream -class BZip2InputStream: public BZip2Stream { +class PIO_EXPORT BZip2InputStream: public BZip2Stream { public: BZip2InputStream(size_t bufferSize = 1024) throw(BZip2Error); ~BZip2InputStream() throw(); Index: IOError.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/IO/IOError.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- IOError.h 23 Dec 2004 05:23:31 -0000 1.2 +++ IOError.h 17 Jan 2005 21:55:23 -0000 1.3 @@ -21,6 +21,7 @@ #ifndef P_IO_IOError_h #define P_IO_IOError_h +#include <pclasses/Export.h> #include <pclasses/Exception.h> #include <pclasses/Unicode/String.h> @@ -29,7 +30,7 @@ namespace IO { //! I/O Error class -class IOError: public RuntimeError { +class PIO_EXPORT IOError: public RuntimeError { public: IOError(long errorNo, const char* what, const SourceInfo& si) throw(); IOError(const IOError& err) throw(); |
From: Christian P. <cp...@us...> - 2005-01-17 21:55:34
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22324/include/pclasses Added Files: Export.h Log Message: Added xxx_EXPORT macros for upcoming win32 and gcc visibility patch support. --- NEW FILE: Export.h --- /*************************************************************************** * Copyright (C) 2004 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef P_Export_h #define P_Export_h #ifdef WIN32 # ifdef PCORE_BUILD # define PCORE_EXPORT __declspec(dllexport) # else # define PCORE_EXPORT __declspec(dllimport) # endif #else # define PCORE_EXPORT #endif #ifdef WIN32 # ifdef PIO_BUILD # define PIO_EXPORT __declspec(dllexport) # else # define PIO_EXPORT __declspec(dllimport) # endif #else # define PIO_EXPORT #endif #ifdef WIN32 # ifdef PSYSTEM_BUILD # define PSYSTEM_EXPORT __declspec(dllexport) # else # define PSYSTEM_EXPORT __declspec(dllimport) # endif #else # define PSYSTEM_EXPORT #endif #ifdef WIN32 # ifdef PNET_BUILD # define PNET_EXPORT __declspec(dllexport) # else # define PNET_EXPORT __declspec(dllimport) # endif #else # define PNET_EXPORT #endif #endif |
From: stephan b. <sg...@us...> - 2005-01-17 21:39:04
|
Update of /cvsroot/pclasses/pclasses2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19251 Modified Files: TODO Log Message: Added some TODOs, mainly for me. Index: TODO =================================================================== RCS file: /cvsroot/pclasses/pclasses2/TODO,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- TODO 7 Jan 2005 14:31:34 -0000 1.2 +++ TODO 17 Jan 2005 21:38:46 -0000 1.3 @@ -3,6 +3,7 @@ Date/Time/DateTime: add TimeSpan add/sub operators add TimeZone/TimeZoneDb +add Factory and/or Plugins registry IO: ZLibIOFilter: add zlib "deflate" streaming (currently only supports "raw" streaming) @@ -23,6 +24,7 @@ Add Inet6Socket, Inet6Address Add IPXSocket, IPXAddress Add AppleTalkSocket, AppleTalkAddress +HTTPClient: add ability to send arbitrarily-sized payloads, a-la POST requests. XML: Add XMLParser, HTMLParser, DOM @@ -35,3 +37,7 @@ NetIO: IOManager, ProtocolHandler, ... +s11n/SIO: +Add s11n proxy for Util::Ext::Prefs. +(Re)implement expat Serializer on top of the new XML parser(s). +Invent RPC-over-s11n (Marc/stephan). |
From: stephan b. <sg...@us...> - 2005-01-17 21:37:14
|
Update of /cvsroot/pclasses/pclasses2/toc/make In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18657/toc/make Modified Files: DOXYGEN.make Log Message: Removed the latex dir from clean-up, because we don't generate latex in this tree. Index: DOXYGEN.make =================================================================== RCS file: /cvsroot/pclasses/pclasses2/toc/make/DOXYGEN.make,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- DOXYGEN.make 22 Dec 2004 19:04:24 -0000 1.1 +++ DOXYGEN.make 17 Jan 2005 21:36:27 -0000 1.2 @@ -75,7 +75,7 @@ $(DOXYGEN_BIN) @echo HTML output is in $(DOXYGEN_HTML_OUTDIR). clean-doxygen: - -rm -fr $(DOXYGEN_HTML_OUTDIR) latex + -rm -fr $(DOXYGEN_HTML_OUTDIR) doxygen_finaldest = $(INSTALL_DOCS_DEST)/$(DOXYGEN_INSTALL_DIRNAME) install-doxygen: doxygen @echo "Installing HTML docs to $(doxygen_finaldest)" |
From: stephan b. <sg...@us...> - 2005-01-17 21:32:37
|
Update of /cvsroot/pclasses/pclasses2/src/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17900/src/Util Modified Files: Prefs.cpp Log Message: - Added some default ctors, for upcoming s11n support. - Fixed a potential mem leak in setStore(). Index: Prefs.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Util/Prefs.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Prefs.cpp 28 Dec 2004 23:02:13 -0000 1.3 +++ Prefs.cpp 17 Jan 2005 21:32:11 -0000 1.4 @@ -7,8 +7,10 @@ namespace P { namespace Ext { - -Prefs::Section::Section(const std::string& name) { +Prefs::Section::Section(){ +} + +Prefs::Section::Section(const std::string& name) : _name(name){ } @@ -100,7 +102,7 @@ Prefs::~Prefs() { if(_store) delete _store; - clear(); + clear(); } @@ -143,11 +145,10 @@ void Prefs::setStore(PrefsStore* store) { + delete this->_store; _store = store; } } } - - |
From: stephan b. <sg...@us...> - 2005-01-17 21:32:37
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17900/include/pclasses/Util Modified Files: Prefs.h Log Message: - Added some default ctors, for upcoming s11n support. - Fixed a potential mem leak in setStore(). Index: Prefs.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Util/Prefs.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Prefs.h 28 Dec 2004 23:02:13 -0000 1.3 +++ Prefs.h 17 Jan 2005 21:32:10 -0000 1.4 @@ -21,6 +21,8 @@ //! Entries consist of a value and a name. class Entry { public: + //! Default ctor needed for s11n... + Entry(); //! Constructs a new Entry. Entry(const std::string& name, const Variant& value) : _name(name), _value(value) {} @@ -35,7 +37,7 @@ //! Returns the value of this entry const Variant& value() { return _value; } - + //! Sets the value of this entry void setValue(const Variant& value) { _value = value; } @@ -50,11 +52,17 @@ //! Sections have a name and hold subsections and entries class Section { public: + //! Default ctor needed for s11n... + Section(); //! Constructs a new Section. - Section(const std::string& name); + explicit Section(const std::string& name); //! Destructor. - virtual ~Section(); +// dev note: stephan removed +// virtualness because this +// class has no virtual +// methods. + ~Section(); //! Returns the name of this section. const std::string& name() const {return _name;} @@ -72,6 +80,10 @@ Entry* entry(const std::string& name); //! Needs to be created with new + /** + Ownership of entry is + transfered to this object. + */ void addEntry(Entry* entry); //! removes all entries with name. @@ -80,10 +92,10 @@ //! Returns a list of subsections const std::list<Section*>& sections() const {return _sections;} - //! Finds section by name. Returns 0 if not found. + //! Finds section by name. Returns 0 if not found. Ownership does not change. Section* section(const std::string& name); - //! Needs to be created with new. + //! Needs to be created with new. This object takes ownership of section. void addSection(Section* section); //! removes all sections with name @@ -103,8 +115,18 @@ virtual void save() throw(P::IO::IOError); Section& root(); const Section& root() const; + /** + Ownership does not change by calling this + function. + */ PrefsStore* store(); const PrefsStore* store() const; + /** + Transfers ownership of store to this + object. If this object previously had a + store object associated with it, that + object IS DELETED. + */ void setStore(PrefsStore* store); private: |
From: Christian P. <cp...@us...> - 2005-01-17 09:38:31
|
Update of /cvsroot/pclasses/pclasses2/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9901/test Modified Files: HTTPClientTest.cpp Log Message: Index: HTTPClientTest.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/test/HTTPClientTest.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- HTTPClientTest.cpp 7 Jan 2005 13:46:21 -0000 1.1 +++ HTTPClientTest.cpp 17 Jan 2005 09:38:19 -0000 1.2 @@ -20,10 +20,8 @@ #include "Test.h" #include "pclasses/IO/URL.h" -#include "pclasses/IO/ZLibIOFilter.h" #include "pclasses/Net/HTTPClient.h" #include "pclasses/Net/InetAddress.h" -#include <limits.h> namespace P { @@ -35,7 +33,7 @@ cl.open(Net::Socket::Inet); std::cerr << "Connecting to 192.168.1.1..." << std::endl; - cl.connect(Net::InetAddress("217.160.172.188"), 80); + cl.connect(Net::InetAddress("192.168.1.1"), 80); std::cerr << "Sending request ..." << std::endl; @@ -46,9 +44,9 @@ Net::HTTPResponse resp = cl.readResponse(); std::cerr << "Response: " - << resp.protocol() << ' ' - << resp.responseCode() << ' ' - << resp.response() + << resp.protocolVersion() << ' ' + << resp.statusCode() << ' ' + << resp.reason() << std::endl; while(!resp.eof()) |
From: Christian P. <cp...@us...> - 2005-01-17 00:18:54
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/Net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4586/include/pclasses/Net Modified Files: HTTPClient.h Log Message: Renamed some methods. Index: HTTPClient.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/Net/HTTPClient.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- HTTPClient.h 14 Jan 2005 14:58:04 -0000 1.2 +++ HTTPClient.h 17 Jan 2005 00:18:44 -0000 1.3 @@ -107,6 +107,13 @@ class HTTPClient; +//! HTTP Response +/*! + Why is HTTPResponse a IODevice ? + HTTPResponse hides underlying protocol details such as + chunked-transfer-encoding from the client when reading a + response body. +*/ class HTTPResponse: public IO::IODevice { public: HTTPResponse(HTTPClient& client, const std::string& protoVer, @@ -138,6 +145,7 @@ bool _chunkedEncoding; }; +//! Hypertext-Transfer-Protocol client class class HTTPClient: public StreamSocket { public: HTTPClient(); |
From: Christian P. <cp...@us...> - 2005-01-16 01:59:31
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16276/src/System Modified Files: Makefile.am Log Message: Added ThreadKey.h, ThreadKey.posix.cpp Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/Makefile.am,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile.am 11 Jan 2005 14:56:28 -0000 1.7 +++ Makefile.am 16 Jan 2005 01:59:18 -0000 1.8 @@ -1,16 +1,16 @@ if WITH_POSIX_THREADS Thread_Sources = CriticalSection.generic.cpp Mutex.posix.cpp \ - Condition.posix.cpp Thread.posix.cpp + Condition.posix.cpp Thread.posix.cpp ThreadKey.posix.cpp endif if WITH_SOLARIS_THREADS Thread_Sources = CriticalSection.generic.cpp Mutex.solaris.cpp \ - Condition.solaris.cpp Thread.solaris.cpp + Condition.solaris.cpp Thread.solaris.cpp ThreadKey.solaris.cpp endif if WITH_WIN32_THREADS Thread_Sources = CriticalSection.win32.cpp Mutex.win32.cpp \ - Condition.win32.cpp Thread.win32.cpp + Condition.win32.cpp Thread.win32.cpp ThreadKey.win32.cpp endif if WITH_SYSV_SHAREDMEM |
From: Christian P. <cp...@us...> - 2005-01-16 01:59:30
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16276/include/pclasses/System Modified Files: Makefile.am Log Message: Added ThreadKey.h, ThreadKey.posix.cpp Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 16 Jan 2005 00:08:09 -0000 1.5 +++ Makefile.am 16 Jan 2005 01:59:18 -0000 1.6 @@ -4,4 +4,4 @@ METASOURCES = AUTO pclasses_system_include_HEADERS = SystemError.h SharedMemory.h CriticalSection.h Mutex.h \ Condition.h Semaphore.h Thread.h SharedLib.h File.h FileInfo.h \ - Directory.h SystemClock.h ProcessIO.h Process.h + Directory.h SystemClock.h ProcessIO.h Process.h ThreadKey.h |
From: Christian P. <cp...@us...> - 2005-01-16 01:58:26
|
Update of /cvsroot/pclasses/pclasses2/src/App In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16210/src/App Modified Files: LogChannel.cpp Log Message: Use ThreadKey. LogChannel should now be thread-safe. Index: LogChannel.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/App/LogChannel.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- LogChannel.cpp 10 Jan 2005 02:38:56 -0000 1.1 +++ LogChannel.cpp 16 Jan 2005 01:58:15 -0000 1.2 @@ -19,6 +19,7 @@ ***************************************************************************/ #include "pclasses/System/SystemClock.h" +#include "pclasses/System/ThreadKey.h" #include "pclasses/App/LogTarget.h" #include "pclasses/App/LogChannel.h" #include "pclasses/App/LogMessage.h" @@ -38,6 +39,8 @@ class LogStreamBuffer: public std::streambuf { public: + typedef System::ThreadKey<LogStreamState> StreamStateThreadKey; + LogStreamBuffer(LogChannel& chan); ~LogStreamBuffer(); @@ -50,12 +53,12 @@ private: LogStreamState* state(); - LogChannel& _channel; - LogStreamState* _state; //@fixme _state must be a thread-local variable! + LogChannel& _channel; + StreamStateThreadKey _state; }; LogStreamBuffer::LogStreamBuffer(LogChannel& chan) -: _channel(chan), _state(0) +: _channel(chan) { } @@ -66,14 +69,16 @@ LogStreamState* LogStreamBuffer::state() { - if(!_state) + LogStreamState* s = _state; + if(!s) { - _state = new LogStreamState; - _state->empty = true; - _state->level = LogMessage::Info; + s = new LogStreamState; + s->empty = true; + s->level = LogMessage::Info; + _state = s; } - return _state; + return s; } void LogStreamBuffer::setMessageLevel(LogMessage::Level l) |
From: Christian P. <cp...@us...> - 2005-01-16 01:57:31
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16078/include/pclasses/System Modified Files: ThreadKey.h Log Message: Fixed const qualifier Index: ThreadKey.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/ThreadKey.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ThreadKey.h 16 Jan 2005 01:48:58 -0000 1.1 +++ ThreadKey.h 16 Jan 2005 01:57:16 -0000 1.2 @@ -36,10 +36,10 @@ class ThreadKeyImpl: public NonCopyable { public: ThreadKeyImpl() throw(SystemError); - ~ThreadKeyImpl(); + ~ThreadKeyImpl() throw(); void set(void* ptr) throw(); - void* get() throw(); + void* get() const throw(); private: unsigned long _handle; @@ -50,7 +50,8 @@ class ThreadKey: private ThreadKeyImpl { public: inline ThreadKey() throw(SystemError) - : ThreadKeyImpl() {} + : ThreadKeyImpl() + {} inline ThreadKey(const ThreadKey& k) throw(SystemError) : ThreadKeyImpl() @@ -65,13 +66,13 @@ return *this; } - inline ThreadKey& operator=(const Type* val) throw() + inline ThreadKey& operator=(Type* val) throw() { set(static_cast<void*>(val)); return *this; } - inline operator Type* () const throw() + inline operator Type* () throw() { return (Type*)get(); } }; |
From: Christian P. <cp...@us...> - 2005-01-16 01:57:31
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16078/src/System Modified Files: ThreadKey.posix.cpp Log Message: Fixed const qualifier Index: ThreadKey.posix.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/System/ThreadKey.posix.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- ThreadKey.posix.cpp 16 Jan 2005 01:48:59 -0000 1.1 +++ ThreadKey.posix.cpp 16 Jan 2005 01:57:17 -0000 1.2 @@ -36,7 +36,7 @@ _handle = h; } -ThreadKeyImpl::~ThreadKeyImpl() +ThreadKeyImpl::~ThreadKeyImpl() throw() { pthread_key_delete(_handle); } @@ -46,7 +46,7 @@ pthread_setspecific(_handle, ptr); } -void* ThreadKeyImpl::get() throw() +void* ThreadKeyImpl::get() const throw() { return pthread_getspecific(_handle); } |
From: Christian P. <cp...@us...> - 2005-01-16 01:49:08
|
Update of /cvsroot/pclasses/pclasses2/src/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14650/src/System Added Files: ThreadKey.posix.cpp Log Message: Added System::ThreadKey. Thread-local-storage pointer variable. --- NEW FILE: ThreadKey.posix.cpp --- /*************************************************************************** * Copyright (C) 2005 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include "pclasses/System/ThreadKey.h" #include <pthread.h> #include <errno.h> namespace P { namespace System { ThreadKeyImpl::ThreadKeyImpl() throw(SystemError) { pthread_key_t h; int ret = pthread_key_create(&h, 0); if(ret != 0) throw SystemError(ret, "Could not create thread-key", P_SOURCEINFO); _handle = h; } ThreadKeyImpl::~ThreadKeyImpl() { pthread_key_delete(_handle); } void ThreadKeyImpl::set(void* ptr) throw() { pthread_setspecific(_handle, ptr); } void* ThreadKeyImpl::get() throw() { return pthread_getspecific(_handle); } } // !namespace System } // !namespace P |
From: Christian P. <cp...@us...> - 2005-01-16 01:49:07
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14650/include/pclasses/System Added Files: ThreadKey.h Log Message: Added System::ThreadKey. Thread-local-storage pointer variable. --- NEW FILE: ThreadKey.h --- /*************************************************************************** * Copyright (C) 2005 by Christian Prochnow * * cp...@se... * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU Library General Public License as * * published by the Free Software Foundation; either version 2 of the * * License, or (at your option) any later version. * * * * This program is distributed in the hope that it will be useful, * * but WITHOUT ANY WARRANTY; without even the implied warranty of * * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * * GNU General Public License for more details. * * * * You should have received a copy of the GNU Library General Public * * License along with this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include <pclasses/NonCopyable.h> #include <pclasses/System/SystemError.h> #ifndef P_System_ThreadKey_h #define P_System_ThreadKey_h namespace P { namespace System { //! Thread-specific storage class /*! This class should not be used directly, instead you should use the ThreadKey template class. */ class ThreadKeyImpl: public NonCopyable { public: ThreadKeyImpl() throw(SystemError); ~ThreadKeyImpl(); void set(void* ptr) throw(); void* get() throw(); private: unsigned long _handle; }; //! Thread-specific storage template class template <class Type> class ThreadKey: private ThreadKeyImpl { public: inline ThreadKey() throw(SystemError) : ThreadKeyImpl() {} inline ThreadKey(const ThreadKey& k) throw(SystemError) : ThreadKeyImpl() { set(k.get()); } inline ~ThreadKey() throw() {} inline ThreadKey& operator=(const ThreadKey& k) throw() { set(k.get()); return *this; } inline ThreadKey& operator=(const Type* val) throw() { set(static_cast<void*>(val)); return *this; } inline operator Type* () const throw() { return (Type*)get(); } }; } // !namespace System } // !namespace P #endif |
From: Christian P. <cp...@us...> - 2005-01-16 01:46:06
|
Update of /cvsroot/pclasses/pclasses2/src/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14258/src/Unicode Modified Files: Makefile.am Log Message: Fixed unicodedata generation in Makefile.am Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/Makefile.am,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile.am 15 Jan 2005 23:08:45 -0000 1.5 +++ Makefile.am 16 Jan 2005 01:45:56 -0000 1.6 @@ -1,10 +1,12 @@ noinst_HEADERS = unicodedata.h unicodedata_db.h unicodedata_extra_db.h -unicodedata-clean: +unicodedata_db: unicodedata_db.h unicodedata_extra_db.h + +unicodedata_db-clean: rm -f unicodedata_db.h rm -f unicodedata_extra_db.h -unicodedata: unicodedata-clean +unicodedata_db.h unicodedata_extra_db.h: wget --passive-ftp http://www.unicode.org/Public/UNIDATA/UnicodeData.txt awk -f $(top_srcdir)/src/Unicode/unicodedata.awk UnicodeData.txt >unicodedata_db.h rm -f UnicodeData.txt @@ -19,4 +21,6 @@ libpclasses_unicode_la_LIBADD = $(top_builddir)/src/libpclasses.la -all: unicodedata +all: unicodedata_db + +clean: unicodedata_db-clean |
From: Christian P. <cp...@us...> - 2005-01-16 00:33:37
|
Update of /cvsroot/pclasses/pclasses2/include/pclasses/System In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31990/include/pclasses/System Modified Files: Thread.h Log Message: Thread is NonCopyable. Index: Thread.h =================================================================== RCS file: /cvsroot/pclasses/pclasses2/include/pclasses/System/Thread.h,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -d -r1.1.1.1 -r1.2 --- Thread.h 22 Dec 2004 17:54:41 -0000 1.1.1.1 +++ Thread.h 16 Jan 2005 00:33:27 -0000 1.2 @@ -22,13 +22,14 @@ #define P_System_Thread_h #include <pclasses/Exception.h> +#include <pclasses/NonCopyable.h> #include <pclasses/System/SystemError.h> namespace P { namespace System { -class Thread { +class Thread: public NonCopyable { public: Thread(bool detached) throw(); virtual ~Thread() throw(); |
From: stephan b. <sg...@us...> - 2005-01-16 00:30:00
|
Update of /cvsroot/pclasses/pclasses2/src/Unicode In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31236 Modified Files: Makefile.toc Log Message: added u{ctype,string}.cpp Index: Makefile.toc =================================================================== RCS file: /cvsroot/pclasses/pclasses2/src/Unicode/Makefile.toc,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile.toc 15 Jan 2005 23:16:38 -0000 1.10 +++ Makefile.toc 16 Jan 2005 00:29:50 -0000 1.11 @@ -13,7 +13,9 @@ SOURCES = Char.cpp \ String.cpp \ TextStream.cpp \ - unicodedata.cpp + uctype.cpp \ + unicodedata.cpp \ + ustring.cpp HEADERS = unicodedata.h @@ -25,10 +27,7 @@ # INSTALL_HEADERS_DEST = $(INSTALL_HEADERS_DEST_BASE)/Unicode ######################################################################## -OBJECTS = Char.o \ - String.o \ - TextStream.o \ - unicodedata.o +OBJECTS = $(patsubst %.cpp,%.o,$(SOURCES)) $(OBJECTS): $(SOURCES_UNICODE_GEN) |
From: Christian P. <cp...@us...> - 2005-01-16 00:19:44
|
Update of /cvsroot/pclasses/pclasses2/plugins/LogTarget/Console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28706/plugins/LogTarget/Console Modified Files: Makefile.am Log Message: Renamed from libplog_console.so.x.x.x to plog_console.so Index: Makefile.am =================================================================== RCS file: /cvsroot/pclasses/pclasses2/plugins/LogTarget/Console/Makefile.am,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile.am 10 Jan 2005 13:05:01 -0000 1.1 +++ Makefile.am 16 Jan 2005 00:19:33 -0000 1.2 @@ -1,9 +1,10 @@ INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include $(all_includes) METASOURCES = AUTO -lib_LTLIBRARIES = libplog_console.la +pkglib_LTLIBRARIES = plog_console.la -libplog_console_la_SOURCES = ConsoleLogTarget.cpp +plog_console_la_SOURCES = ConsoleLogTarget.cpp +plog_console_la_LDFLAGS = -module -avoid-version -libplog_console_la_LIBADD = $(top_builddir)/src/libpclasses.la \ +plog_console_la_LIBADD = $(top_builddir)/src/libpclasses.la \ $(top_builddir)/src/App/libpclasses_app.la |
From: Christian P. <cp...@us...> - 2005-01-16 00:19:04
|
Update of /cvsroot/pclasses/pclasses2 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28594 Modified Files: configure.in Log Message: Check for return type of signal handlers. Index: configure.in =================================================================== RCS file: /cvsroot/pclasses/pclasses2/configure.in,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- configure.in 11 Jan 2005 14:53:46 -0000 1.5 +++ configure.in 16 Jan 2005 00:18:54 -0000 1.6 @@ -38,6 +38,11 @@ AC_C_BIGENDIAN dnl +dnl check for return type of signal handlers +dnl +AC_RETSIGTYPE + +dnl dnl check for needed basic pod-types dnl AC_CHECK_SIZEOF(char) @@ -205,6 +210,7 @@ include/pclasses/Unicode/Makefile \ include/pclasses/IO/Makefile \ include/pclasses/System/Makefile \ + include/pclasses/Plugin/Makefile \ include/pclasses/Net/Makefile \ include/pclasses/Util/Makefile \ include/pclasses/XML/Makefile \ |