mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-06 08:41:11 +01:00
submitted 1.2.0
This commit is contained in:
parent
f476bd6b32
commit
2d4078f392
103
CHANGELOG
103
CHANGELOG
@ -1,9 +1,108 @@
|
|||||||
This is the changelog file for the C++ Portable Components.
|
This is the changelog file for POCO - the C++ Portable Components.
|
||||||
|
|
||||||
|
Release 1.2.0 (2006-08-29)
|
||||||
|
==========================
|
||||||
|
|
||||||
|
- DateTime fixes: Julian Day is no longer stored internally.
|
||||||
|
Times (hours, minutes, seconds, ...) are now always taken from an utcValue (if available) and not from the Julian day.
|
||||||
|
The Julian day is only used for calculating year, month and day (except when the Julian day is the only thing we have)
|
||||||
|
This helps us get rid of rounding errors that the Julian Day arithmetic introduced.- on Windows, UUIDGenerator no longer uses Netbios, but GetAdaptersInfo instead
|
||||||
|
- The main Makefile now has correct dependencies
|
||||||
|
- updated poco-doc.pl with latest version by Caleb Epstein
|
||||||
|
- fixed SF #1542722: InflatingInputStream: buffer error
|
||||||
|
- improved Windows UTF-8 support
|
||||||
|
- added Logger::names()
|
||||||
|
- added configure script and make install target
|
||||||
|
- XMLWriter bugfix: pretty-print bug with characters() and rawCharacters()
|
||||||
|
- improvements to build system: support builds outside of source tree
|
||||||
|
- added header doc conversion tool contributed by Caleb Epstein
|
||||||
|
- fixed SF #1542618 (build/config/Linux patch)
|
||||||
|
- bugfix: BinaryReader/BinaryWriter BOM is now 16 bits, as documented
|
||||||
|
- fixed SF #1542247 (Compiler warning from OptionCallback)
|
||||||
|
- fixed SF #1542253 (ServerApplication::handleOption doesn't call Application::handleOption)
|
||||||
|
- added Application::stopOptionsProcessing()
|
||||||
|
- updated samples
|
||||||
|
- Util::Application command line handling now supports:
|
||||||
|
* argument validation (Option::validator(); see Validator, IntValidator, RegExpValidator)
|
||||||
|
* binding of argument values to config properties (Option::binding())
|
||||||
|
* callbacks for arguments (Option::callback())
|
||||||
|
* checking of required parameters
|
||||||
|
- changed header file locations:
|
||||||
|
Foundation headers are now in Poco (#include "Poco/Foundation.h")
|
||||||
|
XML headers are now in Poco/XML, Poco/SAX and Poco/DOM (#include "Poco/XML/XML.h")
|
||||||
|
Util headers are now in Poco/Util (#include "Poco/Util/Util.h")
|
||||||
|
etc.
|
||||||
|
Unfortunately, this change will break existing code. However, fixing the code is
|
||||||
|
a matter of a few global search/replace operations and can be done quickly.
|
||||||
|
On the plus side, POCO is now a much better citizen when used with other
|
||||||
|
libraries.
|
||||||
|
- changed namespaces:
|
||||||
|
Foundation is now Poco
|
||||||
|
XML is now Poco::XML
|
||||||
|
Util is now Poco::Util
|
||||||
|
Net is now Poco::Net
|
||||||
|
- removed namespace macros
|
||||||
|
- fixed some warnings reported by gcc -Wall -Wextra
|
||||||
|
- fixed AutoPtr and LayeredConfiguration documentation
|
||||||
|
- improved StreamSocket::receiveBytes() doc
|
||||||
|
- added Pipe and PipeStream classes
|
||||||
|
- added support for I/O redirection (pipes) to Process::launch()
|
||||||
|
- added LogStream class (ostream interface to Logger)
|
||||||
|
- improved Makefiles (no more double-building if clean all is specified)
|
||||||
|
- added CppUnit and DateTime testsuite contributions by Andrew Marlow
|
||||||
|
- improved Cygwin and minimal MinGW support
|
||||||
|
- FileChannel: gzip compression if archived files now runs in a background thread (SF #1537481)
|
||||||
|
- POCO now compiles with large (64-bit) file support on Linux (SF #1536634)
|
||||||
|
- added format() function, which provides typesafe sprintf-like functionality (SF #1327621)
|
||||||
|
- added File::isLink()
|
||||||
|
- bugfix: dangling symbolic links in a directory no longer cause recursive remove to fail with file not found error
|
||||||
|
- added Void class (useful as argument to ActiveMethod)
|
||||||
|
- ActiveResult now supports exceptions
|
||||||
|
- bugfix: Timezone::utcOffset() and Timezone::dst() returned wrong values on Unix platforms (SF #1535428)
|
||||||
|
- added ActiveDispatcher class
|
||||||
|
- added ActiveStarter class, which is a policy used by ActiveMethod for starting methods
|
||||||
|
- ActiveRunnable moved to its own header file
|
||||||
|
- ThreadPool: added startWithPriority(), which allows for running threads with a different priority
|
||||||
|
- added error handling to dir sample
|
||||||
|
- added additional test case to HTTPServer test suite- HTMLForm: should now work with request methods other than POST and GET (all non-POST requests are treated the same as GET)
|
||||||
|
- clarified HTMLForm documentation
|
||||||
|
- HTMLForm bugfix: uploaded files no longer end up in value; PartHandler is called instead
|
||||||
|
- NameValueCollection: added get(name, defaultValue)
|
||||||
|
- added HTTPFormServer sample
|
||||||
|
- added Foundation::HashTable and SimpleHashTable
|
||||||
|
- added Net::HTTPSessionFactory
|
||||||
|
- improvements to AutoPtr and SharedPtr
|
||||||
|
- improvements to namespaces handling in XMLWriter
|
||||||
|
- Foundation Cache: fixed add implementation to match the docu: a 2nd add will now simply overwrite existing entries
|
||||||
|
- added DateTime::isValid()
|
||||||
|
- added Exception::rethrow() (virtual, must be overridden by all subclasses)
|
||||||
|
- Timer can now use a user-supplied ThreadPool
|
||||||
|
- added rethrow() to exception classes
|
||||||
|
- Net: made some constructors explicit
|
||||||
|
- Net: added SocketAddress constructor to HTTPClientSession
|
||||||
|
- Net: added HTTPSession::networkException() to check for exceptions swallowed by stream classes
|
||||||
|
- Net: added single string argument constructor to SocketAddress.
|
||||||
|
- Net: improved HTTPClientSession error handling (no more "Invalid HTTP version string" exceptions when the server prematurely closes the connection due to too much load)
|
||||||
|
- Net: improved HTTPSession error handling. Exceptions while sending and receiving data are stored for later retrieval and no longer get lost since streambufs swallow them.
|
||||||
|
- Net: added HTTPLoadTest sample
|
||||||
|
- fixed a bug when opening logfiles on Unix platforms causing an existing logfile to be truncated
|
||||||
|
- bugfix: log file purge intervals given in months did not work, due to a stupid typo
|
||||||
|
- added RawSocket and ICMP classes
|
||||||
|
- UUID: fixed a doc formatting bug
|
||||||
|
- NetworkInterface::list() now includes loopback interface on Windows (SF #1460309)
|
||||||
|
- made Exception::message() and Exception::nested() inline
|
||||||
|
- added Net::UnsupportedRedirectException
|
||||||
|
- HTTPStreamFactory throws an UnsupportedRedirectException if it encounters a redirect to https
|
||||||
|
- HTTP: fixed bad 100 Continue handling in client and server code
|
||||||
|
- added CONTRIBUTORS file
|
||||||
|
|
||||||
|
|
||||||
Release 1.1.2 (2006-07-07)
|
Release 1.1.2 (2006-07-07)
|
||||||
==========================
|
==========================
|
||||||
|
|
||||||
- Changed license to Boost license
|
- Changed license to Boost license
|
||||||
|
- DBlite and NetSSL have been removed from the Boost-licensed release.
|
||||||
|
Please contact Applied Informatics (info@appinf.com) if you're interested in them.
|
||||||
|
|
||||||
|
|
||||||
Release 1.1.1 (2006-04-03)
|
Release 1.1.1 (2006-04-03)
|
||||||
@ -367,4 +466,4 @@ building the libraries.
|
|||||||
|
|
||||||
|
|
||||||
--
|
--
|
||||||
$Id: //poco/1.1.0/dist/CHANGELOG#3 $
|
$Id: //poco/1.2/dist/CHANGELOG#1 $
|
||||||
|
9
CONTRIBUTORS
Normal file
9
CONTRIBUTORS
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
Guenter Obiltschnig <guenter.obiltschnig@appinf.com>
|
||||||
|
Alex Fabijanic <aleskx@gmail.com>
|
||||||
|
Peter Schojer <peter.schojer@appinf.com>
|
||||||
|
Claus Dabringer <claus.dabringer@appinf.com>
|
||||||
|
Andrew Marlow (public@marlowa.plus.com)
|
||||||
|
Caleb Epstein (caleb.epstein@gmail.com)
|
||||||
|
|
||||||
|
--
|
||||||
|
$Id: //poco/1.2/dist/CONTRIBUTORS#1 $
|
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Makefile
|
# Makefile
|
||||||
#
|
#
|
||||||
# $Id: //poco/1.1.0/CppUnit/Makefile#1 $
|
# $Id: //poco/1.2/CppUnit/Makefile#1 $
|
||||||
#
|
#
|
||||||
# Makefile for Poco CppUnit
|
# Makefile for Poco CppUnit
|
||||||
#
|
#
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WinTestRunner.h
|
// WinTestRunner.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/include/WinTestRunner/WinTestRunner.h#1 $
|
||||||
//
|
//
|
||||||
// Application shell for CppUnit's TestRunner dialog.
|
// Application shell for CppUnit's TestRunner dialog.
|
||||||
//
|
//
|
||||||
@ -18,17 +18,12 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_VECTOR_INCLUDED
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#define STD_VECTOR_INCLUDED
|
|
||||||
#endif
|
|
||||||
#include <afxwin.h>
|
#include <afxwin.h>
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class Test;
|
class Test;
|
||||||
@ -61,7 +56,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // WinTestRunner_H_INCLUDED
|
#endif // WinTestRunner_H_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ActiveTest.cpp
|
// ActiveTest.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/ActiveTest.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ActiveTest.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#include "ActiveTest.h"
|
#include "ActiveTest.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
// Spawn a thread to a test
|
// Spawn a thread to a test
|
||||||
@ -40,5 +40,5 @@ UINT ActiveTest::threadFunction(LPVOID thisInstance)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ActiveTest.h
|
// ActiveTest.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/ActiveTest.h#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ActiveTest.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,16 +9,12 @@
|
|||||||
#define ActiveTest_INCLUDED
|
#define ActiveTest_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestDecorator_INCLUDED
|
|
||||||
#include "CppUnit/TestDecorator.h"
|
#include "CppUnit/TestDecorator.h"
|
||||||
#endif
|
|
||||||
#include <afxmt.h>
|
#include <afxmt.h>
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
/* A Microsoft-specific active test
|
/* A Microsoft-specific active test
|
||||||
@ -85,7 +81,7 @@ inline void ActiveTest::run()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // ActiveTest_INCLUDED
|
#endif // ActiveTest_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DLLMain.cpp
|
// DLLMain.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/DLLMain.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/DLLMain.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// GUITestResult.cpp
|
// GUITestResult.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/GUITestResult.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/GUITestResult.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#include "GUITestResult.h"
|
#include "GUITestResult.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
void GUITestResult::addError(Test *test, CppUnitException *e)
|
void GUITestResult::addError(Test *test, CppUnitException *e)
|
||||||
@ -39,5 +39,5 @@ void GUITestResult::endTest(Test *test)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// GUITestResult.h
|
// GUITestResult.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/GUITestResult.h#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/GUITestResult.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,16 +9,12 @@
|
|||||||
#define GuiTestResult_INCLUDED
|
#define GuiTestResult_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestResult_INCLUDED
|
|
||||||
#include "CppUnit/TestResult.h"
|
#include "CppUnit/TestResult.h"
|
||||||
#endif
|
|
||||||
#include <afxmt.h>
|
#include <afxmt.h>
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class TestRunnerDlg;
|
class TestRunnerDlg;
|
||||||
@ -80,7 +76,7 @@ inline void GUITestResult::stop()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // GuiTestResult_INCLUDED
|
#endif // GuiTestResult_INCLUDED
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
//
|
//
|
||||||
// ProgressBar.cpp
|
// ProgressBar.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/ProgressBar.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ProgressBar.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#include "ProgressBar.h"
|
#include "ProgressBar.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
// Paint the progress bar in response to a paint message
|
// Paint the progress bar in response to a paint message
|
||||||
@ -137,4 +137,4 @@ void ProgressBar::reset ()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ProgressBar.h
|
// ProgressBar.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/ProgressBar.h#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/ProgressBar.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,13 +9,11 @@
|
|||||||
#define ProgressBar_INCLUDED
|
#define ProgressBar_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#include <afxwin.h>
|
#include <afxwin.h>
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
/* A Simple ProgressBar for test execution display
|
/* A Simple ProgressBar for test execution display
|
||||||
@ -70,7 +68,7 @@ inline COLORREF ProgressBar::getStatusColor()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // ProgressBar_INCLUDED
|
#endif // ProgressBar_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestRunnerDlg.cpp
|
// TestRunnerDlg.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/TestRunnerDlg.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -17,7 +17,7 @@
|
|||||||
#include "TestRunnerDlg.h"
|
#include "TestRunnerDlg.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
TestRunnerDlg::TestRunnerDlg(CWnd* pParent): CDialog(TestRunnerDlg::IDD, pParent)
|
TestRunnerDlg::TestRunnerDlg(CWnd* pParent): CDialog(TestRunnerDlg::IDD, pParent)
|
||||||
@ -421,4 +421,4 @@ void TestRunnerDlg::addTest(Test* pTest, int level)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestRunnerDlg.h
|
// TestRunnerDlg.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/TestRunnerDlg.h#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/TestRunnerDlg.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,27 +9,16 @@
|
|||||||
#define TestRunnerDlg_INCLUDED
|
#define TestRunnerDlg_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_CppUnitException_INCLUDED
|
|
||||||
#include "CppUnit/CppUnitException.h"
|
#include "CppUnit/CppUnitException.h"
|
||||||
#endif
|
|
||||||
#ifndef ActiveTest_INCLUDED
|
|
||||||
#include "ActiveTest.h"
|
#include "ActiveTest.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_VECTOR_INCLUDED
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#define STD_VECTOR_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef IDD_DIALOG_TESTRUNNER
|
|
||||||
#include "../res/Resource.h"
|
#include "../res/Resource.h"
|
||||||
#endif
|
|
||||||
#include <afxwin.h>
|
#include <afxwin.h>
|
||||||
#include "afxwin.h"
|
#include "afxwin.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class ProgressBar;
|
class ProgressBar;
|
||||||
@ -96,7 +85,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // TestRunnerDlg_INCLUDED
|
#endif // TestRunnerDlg_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// WinTestRunner.cpp
|
// WinTestRunner.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/WinTestRunner/src/WinTestRunner.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/WinTestRunner/src/WinTestRunner.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#include "TestRunnerDlg.h"
|
#include "TestRunnerDlg.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
WinTestRunner::WinTestRunner()
|
WinTestRunner::WinTestRunner()
|
||||||
@ -61,4 +61,4 @@ void WinTestRunnerApp::TestMain()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CppUnit.h
|
// CppUnit.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/CppUnit.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/CppUnit.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -27,7 +27,7 @@
|
|||||||
// CppUnit_API functions as being imported from a DLL, wheras this DLL sees symbols
|
// CppUnit_API functions as being imported from a DLL, wheras this DLL sees symbols
|
||||||
// defined with this macro as being exported.
|
// defined with this macro as being exported.
|
||||||
//
|
//
|
||||||
#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(POCO_DLL)
|
#if defined(_WIN32) && defined(POCO_DLL)
|
||||||
#if defined(CppUnit_EXPORTS)
|
#if defined(CppUnit_EXPORTS)
|
||||||
#define CppUnit_API __declspec(dllexport)
|
#define CppUnit_API __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
@ -41,13 +41,6 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//
|
|
||||||
// Macros to declare the namespace
|
|
||||||
//
|
|
||||||
#define CppUnit_BEGIN namespace CppUnit {
|
|
||||||
#define CppUnit_END }
|
|
||||||
|
|
||||||
|
|
||||||
// Turn off some annoying warnings
|
// Turn off some annoying warnings
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#pragma warning(disable:4786) // identifier truncation warning
|
#pragma warning(disable:4786) // identifier truncation warning
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CppUnitException.h
|
// CppUnitException.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/CppUnitException.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/CppUnitException.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,20 +9,12 @@
|
|||||||
#define CppUnit_CppUnitException_INCLUDED
|
#define CppUnit_CppUnitException_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_EXCEPTION_INCLUDED
|
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#define STD_EXCEPTION_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_STRING_INCLUDED
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#define STD_STRING_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class CppUnit_API CppUnitException: public std::exception
|
class CppUnit_API CppUnitException: public std::exception
|
||||||
@ -33,6 +25,15 @@ public:
|
|||||||
CppUnitException(const std::string& message = "",
|
CppUnitException(const std::string& message = "",
|
||||||
long lineNumber = CPPUNIT_UNKNOWNLINENUMBER,
|
long lineNumber = CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
const std::string& fileName = CPPUNIT_UNKNOWNFILENAME);
|
const std::string& fileName = CPPUNIT_UNKNOWNFILENAME);
|
||||||
|
CppUnitException(const std::string& message,
|
||||||
|
long lineNumber,
|
||||||
|
long data1lineNumber,
|
||||||
|
const std::string& fileName);
|
||||||
|
CppUnitException(const std::string& message,
|
||||||
|
long lineNumber,
|
||||||
|
long data1lineNumber,
|
||||||
|
long data2lineNumber,
|
||||||
|
const std::string& fileName);
|
||||||
CppUnitException(const CppUnitException& other);
|
CppUnitException(const CppUnitException& other);
|
||||||
virtual ~CppUnitException() throw();
|
virtual ~CppUnitException() throw();
|
||||||
|
|
||||||
@ -41,6 +42,8 @@ public:
|
|||||||
const char* what() const throw ();
|
const char* what() const throw ();
|
||||||
|
|
||||||
long lineNumber() const;
|
long lineNumber() const;
|
||||||
|
long data1LineNumber() const;
|
||||||
|
long data2LineNumber() const;
|
||||||
const std::string& fileName() const;
|
const std::string& fileName() const;
|
||||||
|
|
||||||
static const std::string CPPUNIT_UNKNOWNFILENAME;
|
static const std::string CPPUNIT_UNKNOWNFILENAME;
|
||||||
@ -49,18 +52,33 @@ public:
|
|||||||
private:
|
private:
|
||||||
std::string _message;
|
std::string _message;
|
||||||
long _lineNumber;
|
long _lineNumber;
|
||||||
|
long _data1lineNumber;
|
||||||
|
long _data2lineNumber;
|
||||||
std::string _fileName;
|
std::string _fileName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
inline CppUnitException::CppUnitException(const CppUnitException& other): exception (other)
|
inline CppUnitException::CppUnitException(const CppUnitException& other): exception (other)
|
||||||
{
|
{
|
||||||
_message = other._message;
|
_message = other._message;
|
||||||
_lineNumber = other._lineNumber;
|
_lineNumber = other._lineNumber;
|
||||||
_fileName = other._fileName;
|
_data1lineNumber = other._data1lineNumber;
|
||||||
|
_data2lineNumber = other._data2lineNumber;
|
||||||
|
_fileName = other._fileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _fileName(fileName)
|
|
||||||
|
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(CPPUNIT_UNKNOWNLINENUMBER), _fileName(fileName)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline CppUnitException::CppUnitException (const std::string& message, long lineNumber, long data1lineNumber, long data2lineNumber, const std::string& fileName): _message(message), _lineNumber(lineNumber), _data1lineNumber(data1lineNumber), _data2lineNumber(data2lineNumber), _fileName(fileName)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -78,6 +96,8 @@ inline CppUnitException& CppUnitException::operator = (const CppUnitException& o
|
|||||||
{
|
{
|
||||||
_message = other._message;
|
_message = other._message;
|
||||||
_lineNumber = other._lineNumber;
|
_lineNumber = other._lineNumber;
|
||||||
|
_data1lineNumber = other._data1lineNumber;
|
||||||
|
_data2lineNumber = other._data2lineNumber;
|
||||||
_fileName = other._fileName;
|
_fileName = other._fileName;
|
||||||
}
|
}
|
||||||
return *this;
|
return *this;
|
||||||
@ -96,6 +116,18 @@ inline long CppUnitException::lineNumber() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline long CppUnitException::data1LineNumber() const
|
||||||
|
{
|
||||||
|
return _data1lineNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
inline long CppUnitException::data2LineNumber() const
|
||||||
|
{
|
||||||
|
return _data2lineNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// The file in which the error occurred
|
// The file in which the error occurred
|
||||||
inline const std::string& CppUnitException::fileName() const
|
inline const std::string& CppUnitException::fileName() const
|
||||||
{
|
{
|
||||||
@ -103,8 +135,7 @@ inline const std::string& CppUnitException::fileName() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_CppUnitException_INCLUDED
|
#endif // CppUnit_CppUnitException_INCLUDED
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Guards.h
|
// Guards.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/Guards.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/Guards.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Orthodox.h
|
// Orthodox.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/Orthodox.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/Orthodox.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,15 +9,11 @@
|
|||||||
#define CppUnit_Orthodox_INCLUDED
|
#define CppUnit_Orthodox_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestCase_INCLUDED
|
|
||||||
#include "CppUnit/TestCase.h"
|
#include "CppUnit/TestCase.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -103,7 +99,7 @@ ClassUnderTest Orthodox<ClassUnderTest>::call(ClassUnderTest object)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_Orthodox_INCLUDED
|
#endif // CppUnit_Orthodox_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// RepeatedTest.h
|
// RepeatedTest.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/RepeatedTest.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/RepeatedTest.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,18 +9,12 @@
|
|||||||
#define CppUnit_RepeatedTest_INCLUDED
|
#define CppUnit_RepeatedTest_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "CppUnit/Guards.h"
|
#include "CppUnit/Guards.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestDecorator_INCLUDED
|
|
||||||
#include "CppUnit/TestDecorator.h"
|
#include "CppUnit/TestDecorator.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class Test;
|
class Test;
|
||||||
@ -53,14 +47,14 @@ private:
|
|||||||
// Counts the number of test cases that will be run by this test.
|
// Counts the number of test cases that will be run by this test.
|
||||||
inline RepeatedTest::countTestCases ()
|
inline RepeatedTest::countTestCases ()
|
||||||
{
|
{
|
||||||
return TestDecorator::countTestCases () * _timesRepeat;
|
return TestDecorator::countTestCases() * _timesRepeat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Returns the name of the test instance.
|
// Returns the name of the test instance.
|
||||||
inline std::string RepeatedTest::toString()
|
inline std::string RepeatedTest::toString()
|
||||||
{
|
{
|
||||||
return TestDecorator::toString () + " (repeated)";
|
return TestDecorator::toString() + " (repeated)";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -77,7 +71,7 @@ inline void RepeatedTest::run(TestResult *result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_RepeatedTest_INCLUDED
|
#endif // CppUnit_RepeatedTest_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Test.h
|
// Test.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/Test.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/Test.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,16 +9,11 @@
|
|||||||
#define CppUnit_Test_INCLUDED
|
#define CppUnit_Test_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_STRING_INCLUDED
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#define STD_STRING_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class TestResult;
|
class TestResult;
|
||||||
@ -64,7 +59,7 @@ inline std::string Test::toString()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_Test_INCLUDED
|
#endif // CppUnit_Test_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestCaller.h
|
// TestCaller.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestCaller.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestCaller.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,22 +9,13 @@
|
|||||||
#define CppUnit_TestCaller_INCLUDED
|
#define CppUnit_TestCaller_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "Guards.h"
|
#include "Guards.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestCase_INCLUDED
|
|
||||||
#include "TestCase.h"
|
#include "TestCase.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_MEMORY_INCLUDED
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#define STD_MEMORY_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -65,7 +56,10 @@ class TestCaller: public TestCase
|
|||||||
typedef void (Fixture::*TestMethod)();
|
typedef void (Fixture::*TestMethod)();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TestCaller(const std::string& name, TestMethod test): TestCase(name), _fixture(new Fixture(name)), _test(test)
|
TestCaller(const std::string& name, TestMethod test):
|
||||||
|
TestCase(name),
|
||||||
|
_test(test),
|
||||||
|
_fixture(new Fixture(name))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -91,7 +85,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#define CppUnit_addTest(suite, cls, mth) \
|
#define CppUnit_addTest(suite, cls, mth) \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestCase.h
|
// TestCase.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestCase.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestCase.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,29 +9,15 @@
|
|||||||
#define CppUnit_TestCase_INCLUDED
|
#define CppUnit_TestCase_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "CppUnit/Guards.h"
|
#include "CppUnit/Guards.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Test_INCLUDED
|
|
||||||
#include "CppUnit/Test.h"
|
#include "CppUnit/Test.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_CppUnitException_INCLUDED
|
|
||||||
#include "CppUnit/CppUnitException.h"
|
#include "CppUnit/CppUnitException.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_STRING_INCLUDED
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#define STD_STRING_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_TYPEINFO_INCLUDED
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#define STD_TYPEINFO_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class TestResult;
|
class TestResult;
|
||||||
@ -123,6 +109,19 @@ protected:
|
|||||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||||
|
|
||||||
|
void loop1assertImplementation(bool condition,
|
||||||
|
const std::string& conditionExpression = "",
|
||||||
|
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
|
long dataLineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
|
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||||
|
|
||||||
|
void loop2assertImplementation(bool condition,
|
||||||
|
const std::string& conditionExpression = "",
|
||||||
|
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
|
long data1LineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
|
long data2LineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
|
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||||
|
|
||||||
void assertEquals(long expected,
|
void assertEquals(long expected,
|
||||||
long actual,
|
long actual,
|
||||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
@ -150,9 +149,9 @@ protected:
|
|||||||
std::string notEqualsMessage(const std::string& expected, const std::string& actual);
|
std::string notEqualsMessage(const std::string& expected, const std::string& actual);
|
||||||
|
|
||||||
void assertNotNull(const void* pointer,
|
void assertNotNull(const void* pointer,
|
||||||
const std::string& pointerExpression = "",
|
const std::string& pointerExpression = "",
|
||||||
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
long lineNumber = CppUnitException::CPPUNIT_UNKNOWNLINENUMBER,
|
||||||
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
const std::string& fileName = CppUnitException::CPPUNIT_UNKNOWNFILENAME);
|
||||||
|
|
||||||
void assertNull(const void* pointer,
|
void assertNull(const void* pointer,
|
||||||
const std::string& pointerExpression = "",
|
const std::string& pointerExpression = "",
|
||||||
@ -222,6 +221,12 @@ inline std::string TestCase::toString()
|
|||||||
#define assert(condition) \
|
#define assert(condition) \
|
||||||
(this->assertImplementation((condition), (#condition), __LINE__, __FILE__))
|
(this->assertImplementation((condition), (#condition), __LINE__, __FILE__))
|
||||||
|
|
||||||
|
#define loop_1_assert(data1line, condition) \
|
||||||
|
(this->loop1assertImplementation((condition), (#condition), __LINE__, data1line, __FILE__))
|
||||||
|
|
||||||
|
#define loop_2_assert(data1line, data2line, condition) \
|
||||||
|
(this->loop2assertImplementation((condition), (#condition), __LINE__, data1line, data2line, __FILE__))
|
||||||
|
|
||||||
#define assertEqualDelta(expected, actual, delta) \
|
#define assertEqualDelta(expected, actual, delta) \
|
||||||
(this->assertEquals((expected), (actual), (delta), __LINE__, __FILE__))
|
(this->assertEquals((expected), (actual), (delta), __LINE__, __FILE__))
|
||||||
|
|
||||||
@ -238,7 +243,7 @@ inline std::string TestCase::toString()
|
|||||||
(this->fail(msg, __LINE__, __FILE__))
|
(this->fail(msg, __LINE__, __FILE__))
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_TestCase_INCLUDED
|
#endif // CppUnit_TestCase_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestDecorator.h
|
// TestDecorator.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestDecorator.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestDecorator.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,18 +9,12 @@
|
|||||||
#define CppUnit_TestDecorator_INCLUDED
|
#define CppUnit_TestDecorator_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "CppUnit/Guards.h"
|
#include "CppUnit/Guards.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Test_INCLUDED
|
|
||||||
#include "CppUnit/Test.h"
|
#include "CppUnit/Test.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class TestResult;
|
class TestResult;
|
||||||
@ -52,7 +46,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_TestDecorator_INCLUDED
|
#endif // CppUnit_TestDecorator_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestFailure.h
|
// TestFailure.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestFailure.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestFailure.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,18 +9,12 @@
|
|||||||
#define CppUnit_TestFailure_INCLUDED
|
#define CppUnit_TestFailure_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_CppUnitException_INCLUDED
|
|
||||||
#include "CppUnit/CppUnitException.h"
|
#include "CppUnit/CppUnitException.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "CppUnit/Guards.h"
|
#include "CppUnit/Guards.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class Test;
|
class Test;
|
||||||
@ -84,7 +78,7 @@ inline CppUnitException* TestFailure::thrownException()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_TestFailure_INCLUDED
|
#endif // CppUnit_TestFailure_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestResult.h
|
// TestResult.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestResult.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestResult.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,22 +9,13 @@
|
|||||||
#define CppUnit_TestResult_INCLUDED
|
#define CppUnit_TestResult_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "CppUnit/Guards.h"
|
#include "CppUnit/Guards.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestFailure_INCLUDED
|
|
||||||
#include "CppUnit/TestFailure.h"
|
#include "CppUnit/TestFailure.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_VECTOR_INCLUDED
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#define STD_VECTOR_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class CppUnitException;
|
class CppUnitException;
|
||||||
@ -234,7 +225,7 @@ inline void TestResult::setSynchronizationObject(SynchronizationObject* syncObje
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_TestResult_INCLUDED
|
#endif // CppUnit_TestResult_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestRunner.h
|
// TestRunner.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestRunner.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestRunner.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,20 +9,12 @@
|
|||||||
#define CppUnit_TestRunner_INCLUDED
|
#define CppUnit_TestRunner_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_VECTOR_INCLUDED
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#define STD_VECTOR_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_STRING_INCLUDED
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#define STD_STRING_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class Test;
|
class Test;
|
||||||
@ -65,7 +57,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#define CppUnitMain(testCase) \
|
#define CppUnitMain(testCase) \
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestSetup.h
|
// TestSetup.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestSetup.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestSetup.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,18 +9,12 @@
|
|||||||
#define CppUnit_TestSetup_INCLUDED
|
#define CppUnit_TestSetup_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "CppUnit/Guards.h"
|
#include "CppUnit/Guards.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestDecorator_INCLUDED
|
|
||||||
#include "CppUnit/TestDecorator.h"
|
#include "CppUnit/TestDecorator.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class Test;
|
class Test;
|
||||||
@ -57,7 +51,7 @@ inline void TestSetup::run(TestResult* result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_TestSetup_INCLUDED
|
#endif // CppUnit_TestSetup_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestSuite.h
|
// TestSuite.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TestSuite.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TestSuite.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,26 +9,14 @@
|
|||||||
#define CppUnit_TestSuite_INCLUDED
|
#define CppUnit_TestSuite_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Guards_INCLUDED
|
|
||||||
#include "CppUnit/Guards.h"
|
#include "CppUnit/Guards.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_Test_INCLUDED
|
|
||||||
#include "CppUnit/Test.h"
|
#include "CppUnit/Test.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_VECTOR_INCLUDED
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#define STD_VECTOR_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_STRING_INCLUDED
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#define STD_STRING_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class TestResult;
|
class TestResult;
|
||||||
@ -104,7 +92,7 @@ inline const std::vector<Test*> TestSuite::tests() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_TestSuite_INCLUDED
|
#endif // CppUnit_TestSuite_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TextTestResult.h
|
// TextTestResult.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/TextTestResult.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/TextTestResult.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,19 +9,12 @@
|
|||||||
#define CppUnit_TextTestResult_INCLUDED
|
#define CppUnit_TextTestResult_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef CppUnit_TestResult_INCLUDED
|
|
||||||
#include "CppUnit/TestResult.h"
|
#include "CppUnit/TestResult.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_OSTREAM_INCLUDED
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#define STD_OSTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
class CppUnit_API TextTestResult: public TestResult
|
class CppUnit_API TextTestResult: public TestResult
|
||||||
@ -48,7 +41,7 @@ inline std::ostream& operator<< (std::ostream& stream, TextTestResult& result)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_TextTestResult_INCLUDED
|
#endif // CppUnit_TextTestResult_INCLUDED
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// estring.h
|
// estring.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/include/CppUnit/estring.h#1 $
|
// $Id: //poco/1.2/CppUnit/include/CppUnit/estring.h#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,20 +9,12 @@
|
|||||||
#define CppUnit_estring_INCLUDED
|
#define CppUnit_estring_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef CppUnit_CppUnit_INCLUDED
|
|
||||||
#include "CppUnit/CppUnit.h"
|
#include "CppUnit/CppUnit.h"
|
||||||
#endif
|
|
||||||
#ifndef STD_STRING_INCLUDED
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#define STD_STRING_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_STDIO_INCLUDED
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define STD_STDIO_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
// Create a std::string from a const char pointer
|
// Create a std::string from a const char pointer
|
||||||
@ -75,7 +67,7 @@ inline std::string estring(const void* ptr)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
|
||||||
|
|
||||||
#endif // CppUnit_estring_INCLUDED
|
#endif // CppUnit_estring_INCLUDED
|
||||||
|
@ -1,18 +1,18 @@
|
|||||||
//
|
//
|
||||||
// CppUnitException.cpp
|
// CppUnitException.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/CppUnitException.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/CppUnitException.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#include "CppUnit/CppUnitException.h"
|
#include "CppUnit/CppUnitException.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
const std::string CppUnitException::CPPUNIT_UNKNOWNFILENAME = "<unknown>";
|
const std::string CppUnitException::CPPUNIT_UNKNOWNFILENAME = "<unknown>";
|
||||||
const int CppUnitException::CPPUNIT_UNKNOWNLINENUMBER = -1;
|
const int CppUnitException::CPPUNIT_UNKNOWNLINENUMBER = -1;
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestCase.cpp
|
// TestCase.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/TestCase.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/TestCase.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -16,7 +16,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
// Create a default TestResult
|
// Create a default TestResult
|
||||||
@ -34,6 +34,20 @@ void TestCase::assertImplementation(bool condition, const std::string& condition
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TestCase::loop1assertImplementation(bool condition, const std::string& conditionExpression, long lineNumber, long data1lineNumber, const std::string& fileName)
|
||||||
|
{
|
||||||
|
if (!condition)
|
||||||
|
throw CppUnitException(conditionExpression, lineNumber, data1lineNumber, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TestCase::loop2assertImplementation(bool condition, const std::string& conditionExpression, long lineNumber, long data1lineNumber, long data2lineNumber, const std::string& fileName)
|
||||||
|
{
|
||||||
|
if (!condition)
|
||||||
|
throw CppUnitException(conditionExpression, lineNumber, data1lineNumber, data2lineNumber, fileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Check for a failed equality assertion
|
// Check for a failed equality assertion
|
||||||
void TestCase::assertEquals(long expected, long actual, long lineNumber, const std::string& fileName)
|
void TestCase::assertEquals(long expected, long actual, long lineNumber, const std::string& fileName)
|
||||||
{
|
{
|
||||||
@ -165,4 +179,4 @@ std::string TestCase::notEqualsMessage(const std::string& expected, const std::s
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
//
|
//
|
||||||
// TestDecorator.cpp
|
// TestDecorator.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/TestDecorator.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/TestDecorator.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#include "CppUnit/TestDecorator.h"
|
#include "CppUnit/TestDecorator.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
TestDecorator::TestDecorator(Test* test)
|
TestDecorator::TestDecorator(Test* test)
|
||||||
@ -40,4 +40,4 @@ std::string TestDecorator::toString()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestFailure.cpp
|
// TestFailure.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/TestFailure.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/TestFailure.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#include "CppUnit/Test.h"
|
#include "CppUnit/Test.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
// Returns a short description of the failure.
|
// Returns a short description of the failure.
|
||||||
@ -19,4 +19,4 @@ std::string TestFailure::toString()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
//
|
//
|
||||||
// TestResult.cpp
|
// TestResult.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/TestResult.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/TestResult.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#include "CppUnit/TestResult.h"
|
#include "CppUnit/TestResult.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
// Destroys a test result
|
// Destroys a test result
|
||||||
@ -26,4 +26,4 @@ TestResult::~TestResult()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestRunner.cpp
|
// TestRunner.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/TestRunner.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/TestRunner.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
TestRunner::TestRunner()
|
TestRunner::TestRunner()
|
||||||
@ -178,4 +178,4 @@ Test* TestRunner::find(const std::string& name, Test* pTest, const std::string&
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TestSuite.cpp
|
// TestSuite.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/TestSuite.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/TestSuite.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -9,7 +9,7 @@
|
|||||||
#include "CppUnit/TestResult.h"
|
#include "CppUnit/TestResult.h"
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
// Deletes all tests in the suite.
|
// Deletes all tests in the suite.
|
||||||
@ -46,4 +46,4 @@ int TestSuite::countTestCases()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// TextTestResult.cpp
|
// TextTestResult.cpp
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/CppUnit/src/TextTestResult.cpp#1 $
|
// $Id: //poco/1.2/CppUnit/src/TextTestResult.cpp#1 $
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -13,7 +13,7 @@
|
|||||||
#include <iomanip>
|
#include <iomanip>
|
||||||
|
|
||||||
|
|
||||||
CppUnit_BEGIN
|
namespace CppUnit {
|
||||||
|
|
||||||
|
|
||||||
void TextTestResult::addError(Test* test, CppUnitException* e)
|
void TextTestResult::addError(Test* test, CppUnitException* e)
|
||||||
@ -42,6 +42,7 @@ void TextTestResult::printErrors(std::ostream& stream)
|
|||||||
if (testErrors() != 0)
|
if (testErrors() != 0)
|
||||||
{
|
{
|
||||||
stream << "\n";
|
stream << "\n";
|
||||||
|
|
||||||
if (testErrors() == 1)
|
if (testErrors() == 1)
|
||||||
stream << "There was " << testErrors() << " error: " << std::endl;
|
stream << "There was " << testErrors() << " error: " << std::endl;
|
||||||
else
|
else
|
||||||
@ -57,7 +58,27 @@ void TextTestResult::printErrors(std::ostream& stream)
|
|||||||
<< ": "
|
<< ": "
|
||||||
<< failure->failedTest()->toString() << "\n"
|
<< failure->failedTest()->toString() << "\n"
|
||||||
<< " \"" << (e ? e->what() : "") << "\"\n"
|
<< " \"" << (e ? e->what() : "") << "\"\n"
|
||||||
<< " in \"" << (e ? e->fileName() : std::string()) << "\", line " << (e ? e->lineNumber() : 0) << "\n";
|
<< " in \""
|
||||||
|
<< (e ? e->fileName() : std::string())
|
||||||
|
<< "\", line ";
|
||||||
|
if (e == 0)
|
||||||
|
{
|
||||||
|
stream << "0";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stream << e->lineNumber();
|
||||||
|
if (e->data2LineNumber() != CppUnitException::CPPUNIT_UNKNOWNLINENUMBER)
|
||||||
|
{
|
||||||
|
stream << " data lines " << e->data1LineNumber()
|
||||||
|
<< ", " << e->data2LineNumber();
|
||||||
|
}
|
||||||
|
else if (e->data1LineNumber() != CppUnitException::CPPUNIT_UNKNOWNLINENUMBER)
|
||||||
|
{
|
||||||
|
stream << " data line " << e->data1LineNumber();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stream << "\n";
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -85,11 +106,31 @@ void TextTestResult::printFailures(std::ostream& stream)
|
|||||||
<< ": "
|
<< ": "
|
||||||
<< failure->failedTest()->toString() << "\n"
|
<< failure->failedTest()->toString() << "\n"
|
||||||
<< " \"" << (e ? e->what() : "") << "\"\n"
|
<< " \"" << (e ? e->what() : "") << "\"\n"
|
||||||
<< " in \"" << (e ? e->fileName() : std::string()) << "\", line " << (e ? e->lineNumber() : 0) << "\n";
|
<< " in \""
|
||||||
|
<< (e ? e->fileName() : std::string())
|
||||||
|
<< "\", line ";
|
||||||
|
if (e == 0)
|
||||||
|
{
|
||||||
|
stream << "0";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
stream << e->lineNumber();
|
||||||
|
if (e->data2LineNumber() != CppUnitException::CPPUNIT_UNKNOWNLINENUMBER)
|
||||||
|
{
|
||||||
|
stream << " data lines "
|
||||||
|
<< e->data1LineNumber()
|
||||||
|
<< ", " << e->data2LineNumber();
|
||||||
|
}
|
||||||
|
else if (e->data1LineNumber() != CppUnitException::CPPUNIT_UNKNOWNLINENUMBER)
|
||||||
|
{
|
||||||
|
stream << " data line " << e->data1LineNumber();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stream << "\n";
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -130,4 +171,4 @@ std::string TextTestResult::shortName(const std::string& testName)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
CppUnit_END
|
} // namespace CppUnit
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,7 +1,7 @@
|
|||||||
#
|
#
|
||||||
# Makefile
|
# Makefile
|
||||||
#
|
#
|
||||||
# $Id: //poco/1.1.0/Foundation/Makefile#1 $
|
# $Id: //poco/1.2/Foundation/Makefile#1 $
|
||||||
#
|
#
|
||||||
# Makefile for Poco Foundation
|
# Makefile for Poco Foundation
|
||||||
#
|
#
|
||||||
@ -15,7 +15,7 @@ objects = ArchiveStrategy ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder
|
|||||||
Environment Event EventArgs ErrorHandler Exception FPEnvironment File Glob \
|
Environment Event EventArgs ErrorHandler Exception FPEnvironment File Glob \
|
||||||
FileChannel Formatter FormattingChannel HexBinaryDecoder LineEndingConverter \
|
FileChannel Formatter FormattingChannel HexBinaryDecoder LineEndingConverter \
|
||||||
HexBinaryEncoder InflatingStream Latin1Encoding Latin9Encoding LogFile Logger \
|
HexBinaryEncoder InflatingStream Latin1Encoding Latin9Encoding LogFile Logger \
|
||||||
LoggingFactory LoggingRegistry NamedEvent NamedMutex NullChannel \
|
LoggingFactory LoggingRegistry LogStream NamedEvent NamedMutex NullChannel \
|
||||||
MemoryPool MD2Engine MD4Engine MD5Engine Manifest Message Mutex \
|
MemoryPool MD2Engine MD4Engine MD5Engine Manifest Message Mutex \
|
||||||
NestedDiagnosticContext Notification NotificationCenter \
|
NestedDiagnosticContext Notification NotificationCenter \
|
||||||
NotificationQueue NullStream NumberFormatter NumberParser Observer \
|
NotificationQueue NullStream NumberFormatter NumberParser Observer \
|
||||||
@ -24,17 +24,18 @@ objects = ArchiveStrategy ASCIIEncoding AsyncChannel Base64Decoder Base64Encoder
|
|||||||
SHA1Engine Semaphore SharedLibrary SimpleFileChannel \
|
SHA1Engine Semaphore SharedLibrary SimpleFileChannel \
|
||||||
SignalHandler SplitterChannel Stopwatch StreamChannel StreamConverter StreamCopier \
|
SignalHandler SplitterChannel Stopwatch StreamChannel StreamConverter StreamCopier \
|
||||||
StreamTokenizer String StringTokenizer SynchronizedObject SyslogChannel \
|
StreamTokenizer String StringTokenizer SynchronizedObject SyslogChannel \
|
||||||
Task TaskManager TaskNotification TeeStream \
|
Task TaskManager TaskNotification TeeStream HashStatistic\
|
||||||
TemporaryFile TextConverter TextEncoding TextIterator Thread ThreadLocal \
|
TemporaryFile TextConverter TextEncoding TextIterator Thread ThreadLocal \
|
||||||
ThreadPool Timer Timespan Timestamp Timezone Token URI \
|
ThreadPool ActiveDispatcher Timer Timespan Timestamp Timezone Token URI \
|
||||||
FileStreamFactory URIStreamFactory URIStreamOpener UTF16Encoding Windows1252Encoding \
|
FileStreamFactory URIStreamFactory URIStreamOpener UTF16Encoding Windows1252Encoding \
|
||||||
UTF8Encoding UnicodeConverter UUID UUIDGenerator \
|
UTF8Encoding UnicodeConverter UUID UUIDGenerator Void Format \
|
||||||
|
Pipe PipeImpl PipeStream \
|
||||||
adler32 chartables compress crc32 \
|
adler32 chartables compress crc32 \
|
||||||
deflate get gzio infback inffast inflate inftrees maketables pcre study \
|
deflate get gzio infback inffast inflate inftrees maketables pcre study \
|
||||||
trees zutil
|
trees zutil
|
||||||
|
|
||||||
target = PocoFoundation
|
target = PocoFoundation
|
||||||
target_version = 1
|
target_version = $(LIBVERSION)
|
||||||
target_libs =
|
target_libs =
|
||||||
|
|
||||||
include $(POCO_BASE)/build/rules/lib
|
include $(POCO_BASE)/build/rules/lib
|
||||||
|
@ -36,6 +36,7 @@ Glob
|
|||||||
FileChannel
|
FileChannel
|
||||||
Formatter
|
Formatter
|
||||||
FormattingChannel
|
FormattingChannel
|
||||||
|
HashStatistic
|
||||||
HexBinaryDecoder
|
HexBinaryDecoder
|
||||||
HexBinaryEncoder
|
HexBinaryEncoder
|
||||||
InflatingStream
|
InflatingStream
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ASCIIEncoding.h
|
// ASCIIEncoding.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ASCIIEncoding.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ASCIIEncoding.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Text
|
// Package: Text
|
||||||
@ -40,15 +40,11 @@
|
|||||||
#define Foundation_ASCIIEncoding_INCLUDED
|
#define Foundation_ASCIIEncoding_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/TextEncoding.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_TextEncoding_INCLUDED
|
|
||||||
#include "Foundation/TextEncoding.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API ASCIIEncoding: public TextEncoding
|
class Foundation_API ASCIIEncoding: public TextEncoding
|
||||||
@ -66,7 +62,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ASCIIEncoding_INCLUDED
|
#endif // Foundation_ASCIIEncoding_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AbstractCache.h
|
// AbstractCache.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AbstractCache.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AbstractCache.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Cache
|
// Package: Cache
|
||||||
@ -40,20 +40,19 @@
|
|||||||
#define Foundation_AbstractCache_INCLUDED
|
#define Foundation_AbstractCache_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/KeyValueArgs.h"
|
#include "Poco/KeyValueArgs.h"
|
||||||
#include "Foundation/ValidArgs.h"
|
#include "Poco/ValidArgs.h"
|
||||||
#include "Foundation/ScopedLock.h"
|
#include "Poco/Mutex.h"
|
||||||
#include "Foundation/Mutex.h"
|
#include "Poco/Exception.h"
|
||||||
#include "Foundation/Exception.h"
|
#include "Poco/BasicEvent.h"
|
||||||
#include "Foundation/BasicEvent.h"
|
#include "Poco/EventArgs.h"
|
||||||
#include "Foundation/EventArgs.h"
|
#include "Poco/Delegate.h"
|
||||||
#include "Foundation/Delegate.h"
|
#include "Poco/SharedPtr.h"
|
||||||
#include "Foundation/SharedPtr.h"
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <set>
|
#include <set>
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TKey, class TValue, class TStrategy>
|
template <class TKey, class TValue, class TStrategy>
|
||||||
@ -235,7 +234,7 @@ protected:
|
|||||||
typename std::set<TKey>::const_iterator it = delMe.begin();
|
typename std::set<TKey>::const_iterator it = delMe.begin();
|
||||||
typename std::set<TKey>::const_iterator endIt = delMe.end();
|
typename std::set<TKey>::const_iterator endIt = delMe.end();
|
||||||
|
|
||||||
for (it; it != endIt; ++it)
|
for (; it != endIt; ++it)
|
||||||
{
|
{
|
||||||
doRemove(*it);
|
doRemove(*it);
|
||||||
}
|
}
|
||||||
@ -252,7 +251,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AbstractDelegate.h
|
// AbstractDelegate.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AbstractDelegate.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AbstractDelegate.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Events
|
// Package: Events
|
||||||
@ -40,10 +40,10 @@
|
|||||||
#define Foundation_AbstractDelegate_INCLUDED
|
#define Foundation_AbstractDelegate_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TArgs>
|
template <class TArgs>
|
||||||
@ -73,7 +73,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AbstractEvent.h
|
// AbstractEvent.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AbstractEvent.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AbstractEvent.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Events
|
// Package: Events
|
||||||
@ -40,16 +40,15 @@
|
|||||||
#define Foundation_AbstractFoundation_INCLUDED
|
#define Foundation_AbstractFoundation_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/SingletonHolder.h"
|
#include "Poco/SingletonHolder.h"
|
||||||
#include "Foundation/SharedPtr.h"
|
#include "Poco/SharedPtr.h"
|
||||||
#include "Foundation/ActiveResult.h"
|
#include "Poco/ActiveResult.h"
|
||||||
#include "Foundation/ActiveMethod.h"
|
#include "Poco/ActiveMethod.h"
|
||||||
#include "Foundation/ScopedLock.h"
|
#include "Poco/Mutex.h"
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TArgs, class TStrategy, class TDelegate>
|
template <class TArgs, class TStrategy, class TDelegate>
|
||||||
@ -71,7 +70,7 @@ class AbstractEvent
|
|||||||
/// class MyData
|
/// class MyData
|
||||||
/// {
|
/// {
|
||||||
/// public:
|
/// public:
|
||||||
/// Foundation::BasicEvent<int> AgeChanged;
|
/// Poco::BasicEvent<int> AgeChanged;
|
||||||
///
|
///
|
||||||
/// MyData();
|
/// MyData();
|
||||||
/// ...
|
/// ...
|
||||||
@ -136,15 +135,15 @@ class AbstractEvent
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AbstractEvent():
|
AbstractEvent():
|
||||||
_enabled(true),
|
_executeAsync(this, &AbstractEvent::executeAsyncImpl),
|
||||||
_executeAsync(this, &AbstractEvent::executeAsyncImpl)
|
_enabled(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractEvent(const TStrategy& strat):
|
AbstractEvent(const TStrategy& strat):
|
||||||
_enabled(true),
|
_executeAsync(this, &AbstractEvent::executeAsyncImpl),
|
||||||
_strategy(strat),
|
_strategy(strat),
|
||||||
_executeAsync(this, &AbstractEvent::executeAsyncImpl)
|
_enabled(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -181,7 +180,7 @@ public:
|
|||||||
/// the next notify. If one of the delegates throws an exception, the notify
|
/// the next notify. If one of the delegates throws an exception, the notify
|
||||||
/// method is immediately aborted and the exception is reported to the caller.
|
/// method is immediately aborted and the exception is reported to the caller.
|
||||||
{
|
{
|
||||||
Foundation::SharedPtr<TStrategy> ptrStrat;
|
SharedPtr<TStrategy> ptrStrat;
|
||||||
bool enabled = false;
|
bool enabled = false;
|
||||||
|
|
||||||
{
|
{
|
||||||
@ -202,7 +201,7 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Foundation::ActiveResult<TArgs> notifyAsync(const void* pSender, const TArgs& args)
|
ActiveResult<TArgs> notifyAsync(const void* pSender, const TArgs& args)
|
||||||
/// Sends a notification to all registered delegates. The order is
|
/// Sends a notification to all registered delegates. The order is
|
||||||
/// determined by the TStrategy. This method is not blocking and will
|
/// determined by the TStrategy. This method is not blocking and will
|
||||||
/// immediately return. The delegates are invoked in a seperate thread.
|
/// immediately return. The delegates are invoked in a seperate thread.
|
||||||
@ -223,13 +222,13 @@ public:
|
|||||||
// make a copy of the strategy here to guarantee that
|
// make a copy of the strategy here to guarantee that
|
||||||
// between notifyAsync and the execution of the method no changes can occur
|
// between notifyAsync and the execution of the method no changes can occur
|
||||||
|
|
||||||
params.ptrStrat = Foundation::SharedPtr<TStrategy>(new TStrategy(_strategy));
|
params.ptrStrat = SharedPtr<TStrategy>(new TStrategy(_strategy));
|
||||||
params.pSender = pSender;
|
params.pSender = pSender;
|
||||||
params.args = args;
|
params.args = args;
|
||||||
params.enabled = _enabled;
|
params.enabled = _enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
Foundation::ActiveResult<TArgs> result = _executeAsync(params);
|
ActiveResult<TArgs> result = _executeAsync(params);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,12 +263,12 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
struct NotifyAsyncParams
|
struct NotifyAsyncParams
|
||||||
{
|
{
|
||||||
Foundation::SharedPtr<TStrategy> ptrStrat;
|
SharedPtr<TStrategy> ptrStrat;
|
||||||
const void* pSender;
|
const void* pSender;
|
||||||
TArgs args;
|
TArgs args;
|
||||||
bool enabled;
|
bool enabled;
|
||||||
};
|
};
|
||||||
Foundation::ActiveMethod<TArgs, NotifyAsyncParams, AbstractEvent> _executeAsync;
|
ActiveMethod<TArgs, NotifyAsyncParams, AbstractEvent> _executeAsync;
|
||||||
|
|
||||||
TArgs executeAsyncImpl(const NotifyAsyncParams& par)
|
TArgs executeAsyncImpl(const NotifyAsyncParams& par)
|
||||||
{
|
{
|
||||||
@ -287,7 +286,7 @@ protected:
|
|||||||
TStrategy _strategy; /// The strategy used to notify observers.
|
TStrategy _strategy; /// The strategy used to notify observers.
|
||||||
bool _enabled; /// Stores if an event is enabled. Notfies on disabled events have no effect
|
bool _enabled; /// Stores if an event is enabled. Notfies on disabled events have no effect
|
||||||
/// but it is possible to change the observers.
|
/// but it is possible to change the observers.
|
||||||
mutable Foundation::FastMutex _mutex;
|
mutable FastMutex _mutex;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AbstractEvent(const AbstractEvent& other);
|
AbstractEvent(const AbstractEvent& other);
|
||||||
@ -295,7 +294,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AbstractPriorityDelegate.h
|
// AbstractPriorityDelegate.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AbstractPriorityDelegate.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AbstractPriorityDelegate.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Events
|
// Package: Events
|
||||||
@ -40,10 +40,10 @@
|
|||||||
#define Foundation_AbstractPriorityDelegate_INCLUDED
|
#define Foundation_AbstractPriorityDelegate_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TArgs>
|
template <class TArgs>
|
||||||
@ -73,7 +73,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AbstractStrategy.h
|
// AbstractStrategy.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AbstractStrategy.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AbstractStrategy.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Cache
|
// Package: Cache
|
||||||
@ -40,12 +40,12 @@
|
|||||||
#define Foundation_AbstractStrategy_INCLUDED
|
#define Foundation_AbstractStrategy_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/KeyValueArgs.h"
|
#include "Poco/KeyValueArgs.h"
|
||||||
#include "Foundation/ValidArgs.h"
|
#include "Poco/ValidArgs.h"
|
||||||
#include "Foundation/EventArgs.h"
|
#include "Poco/EventArgs.h"
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TKey, class TValue>
|
template <class TKey, class TValue>
|
||||||
@ -85,7 +85,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
137
Foundation/include/Poco/ActiveDispatcher.h
Normal file
137
Foundation/include/Poco/ActiveDispatcher.h
Normal file
@ -0,0 +1,137 @@
|
|||||||
|
//
|
||||||
|
// ActiveDispatcher.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.2/Foundation/include/Poco/ActiveDispatcher.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Foundation
|
||||||
|
// Package: Threading
|
||||||
|
// Module: ActiveObjects
|
||||||
|
//
|
||||||
|
// Definition of the ActiveDispatcher class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Foundation_ActiveDispatcher_INCLUDED
|
||||||
|
#define Foundation_ActiveDispatcher_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
#include "Poco/Runnable.h"
|
||||||
|
#include "Poco/Thread.h"
|
||||||
|
#include "Poco/ActiveStarter.h"
|
||||||
|
#include "Poco/NotificationQueue.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
class Foundation_API ActiveDispatcher: protected Runnable
|
||||||
|
/// This class is used to implement an active object
|
||||||
|
/// with strictly serialized method execution.
|
||||||
|
///
|
||||||
|
/// An active object, with is an ordinary object
|
||||||
|
/// containing ActiveMethod members, executes all
|
||||||
|
/// active methods in their own thread.
|
||||||
|
/// This behavior does not fit the "classic"
|
||||||
|
/// definition of an active object, which serializes
|
||||||
|
/// the execution of active methods (in other words,
|
||||||
|
/// only one active method can be running at any given
|
||||||
|
/// time).
|
||||||
|
///
|
||||||
|
/// Using this class as a base class, the serializing
|
||||||
|
/// behavior for active objects can be implemented.
|
||||||
|
///
|
||||||
|
/// The following example shows how this is done:
|
||||||
|
///
|
||||||
|
/// class ActiveObject: public ActiveDispatcher
|
||||||
|
/// {
|
||||||
|
/// public:
|
||||||
|
/// ActiveObject():
|
||||||
|
/// exampleActiveMethod(this, &ActiveObject::exampleActiveMethodImpl)
|
||||||
|
/// {
|
||||||
|
/// }
|
||||||
|
///
|
||||||
|
/// ActiveMethod<std::string, std::string, ActiveObject, ActiveStarter<ActiveDispatcher> > exampleActiveMethod;
|
||||||
|
///
|
||||||
|
/// protected:
|
||||||
|
/// std::string exampleActiveMethodImpl(const std::string& arg)
|
||||||
|
/// {
|
||||||
|
/// ...
|
||||||
|
/// }
|
||||||
|
/// };
|
||||||
|
///
|
||||||
|
/// The only things different from the example in
|
||||||
|
/// ActiveMethod is that the ActiveObject in this case
|
||||||
|
/// inherits from ActiveDispatcher, and that the ActiveMethod
|
||||||
|
/// template for exampleActiveMethod has an additional parameter,
|
||||||
|
/// specifying the specialized ActiveStarter for ActiveDispatcher.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ActiveDispatcher();
|
||||||
|
/// Creates the ActiveDispatcher.
|
||||||
|
|
||||||
|
ActiveDispatcher(Thread::Priority prio);
|
||||||
|
/// Creates the ActiveDispatcher and sets
|
||||||
|
/// the priority of its thread.
|
||||||
|
|
||||||
|
virtual ~ActiveDispatcher();
|
||||||
|
/// Destroys the ActiveDispatcher.
|
||||||
|
|
||||||
|
void start(Runnable* pRunnable);
|
||||||
|
/// Adds the Runnable to the dispatch queue.
|
||||||
|
|
||||||
|
void cancel();
|
||||||
|
/// Cancels all queued methods.
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void run();
|
||||||
|
void stop();
|
||||||
|
|
||||||
|
private:
|
||||||
|
Thread _thread;
|
||||||
|
NotificationQueue _queue;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
template <>
|
||||||
|
class ActiveStarter<ActiveDispatcher>
|
||||||
|
/// A specialization of ActiveStarter
|
||||||
|
/// for ActiveDispatcher.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void start(ActiveDispatcher* pOwner, Runnable* pRunnable)
|
||||||
|
{
|
||||||
|
pOwner->start(pRunnable);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Foundation_ActiveDispatcher_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ActiveMethod.h
|
// ActiveMethod.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ActiveMethod.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ActiveMethod.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Threading
|
// Package: Threading
|
||||||
@ -40,75 +40,16 @@
|
|||||||
#define Foundation_ActiveMethod_INCLUDED
|
#define Foundation_ActiveMethod_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/ActiveResult.h"
|
||||||
#endif
|
#include "Poco/ActiveRunnable.h"
|
||||||
#ifndef Foundation_ActiveResult_INCLUDED
|
#include "Poco/ActiveStarter.h"
|
||||||
#include "Foundation/ActiveResult.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Runnable_INCLUDED
|
|
||||||
#include "Foundation/Runnable.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_ThreadPool_INCLUDED
|
|
||||||
#include "Foundation/ThreadPool.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Exception_INCLUDED
|
|
||||||
#include "Foundation/Exception.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class ResultType, class ArgType, class OwnerType>
|
template <class ResultType, class ArgType, class OwnerType, class StarterType = ActiveStarter<OwnerType> >
|
||||||
class ActiveRunnable: public Runnable
|
|
||||||
/// This class is used by ActiveMethod.
|
|
||||||
/// See the ActiveMethod class for more information.
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
typedef ResultType (OwnerType::*Callback)(const ArgType&);
|
|
||||||
typedef ActiveResult<ResultType> ActiveResultType;
|
|
||||||
|
|
||||||
ActiveRunnable(OwnerType* pOwner, Callback method, const ArgType& arg, const ActiveResultType& result):
|
|
||||||
_pOwner(pOwner),
|
|
||||||
_method(method),
|
|
||||||
_arg(arg),
|
|
||||||
_result(result)
|
|
||||||
{
|
|
||||||
poco_check_ptr (pOwner);
|
|
||||||
}
|
|
||||||
|
|
||||||
void run()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
_result.data() = (_pOwner->*_method)(_arg);
|
|
||||||
}
|
|
||||||
catch (Exception& e)
|
|
||||||
{
|
|
||||||
_result.error(e.message());
|
|
||||||
}
|
|
||||||
catch (std::exception& e)
|
|
||||||
{
|
|
||||||
_result.error(e.what());
|
|
||||||
}
|
|
||||||
catch (...)
|
|
||||||
{
|
|
||||||
_result.error("unknown exception");
|
|
||||||
}
|
|
||||||
_result.notify();
|
|
||||||
delete this;
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
OwnerType* _pOwner;
|
|
||||||
Callback _method;
|
|
||||||
ArgType _arg;
|
|
||||||
ActiveResultType _result;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
template <class ResultType, class ArgType, class OwnerType>
|
|
||||||
class ActiveMethod
|
class ActiveMethod
|
||||||
/// An active method is a method that, when called, executes
|
/// An active method is a method that, when called, executes
|
||||||
/// in its own thread. ActiveMethod's take exactly one
|
/// in its own thread. ActiveMethod's take exactly one
|
||||||
@ -141,6 +82,15 @@ class ActiveMethod
|
|||||||
/// ...
|
/// ...
|
||||||
/// result.wait();
|
/// result.wait();
|
||||||
/// std::cout << result.data() << std::endl;
|
/// std::cout << result.data() << std::endl;
|
||||||
|
///
|
||||||
|
/// The way an ActiveMethod is started can be changed by passing a StarterType
|
||||||
|
/// template argument with a corresponding class. The default ActiveStarter
|
||||||
|
/// starts the method in its own thread, obtained from a thread pool.
|
||||||
|
///
|
||||||
|
/// For an alternative implementation of StarterType, see ActiveDispatcher.
|
||||||
|
///
|
||||||
|
/// For methods that do not require an argument or a return value, the Void
|
||||||
|
/// class can be used.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef ResultType (OwnerType::*Callback)(const ArgType&);
|
typedef ResultType (OwnerType::*Callback)(const ArgType&);
|
||||||
@ -160,7 +110,7 @@ public:
|
|||||||
{
|
{
|
||||||
ActiveResultType result(new ActiveResultHolder<ResultType>());
|
ActiveResultType result(new ActiveResultHolder<ResultType>());
|
||||||
ActiveRunnableType* pRunnable = new ActiveRunnableType(_pOwner, _method, arg, result);
|
ActiveRunnableType* pRunnable = new ActiveRunnableType(_pOwner, _method, arg, result);
|
||||||
ThreadPool::defaultPool().start(*pRunnable);
|
StarterType::start(_pOwner, pRunnable);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -174,7 +124,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ActiveMethod_INCLUDED
|
#endif // Foundation_ActiveMethod_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ActiveResult.h
|
// ActiveResult.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ActiveResult.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ActiveResult.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Threading
|
// Package: Threading
|
||||||
@ -40,21 +40,14 @@
|
|||||||
#define Foundation_ActiveResult_INCLUDED
|
#define Foundation_ActiveResult_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Mutex.h"
|
||||||
#endif
|
#include "Poco/Event.h"
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
#include "Poco/RefCountedObject.h"
|
||||||
#include "Foundation/Mutex.h"
|
#include "Poco/Exception.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Event_INCLUDED
|
|
||||||
#include "Foundation/Event.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_RefCountedObject_INCLUDED
|
|
||||||
#include "Foundation/RefCountedObject.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class ResultType>
|
template <class ResultType>
|
||||||
@ -67,7 +60,7 @@ class ActiveResultHolder: public RefCountedObject
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ActiveResultHolder():
|
ActiveResultHolder():
|
||||||
_failed(false),
|
_pExc(0),
|
||||||
_event(false)
|
_event(false)
|
||||||
/// Creates an ActiveResultHolder.
|
/// Creates an ActiveResultHolder.
|
||||||
{
|
{
|
||||||
@ -111,34 +104,51 @@ public:
|
|||||||
/// Returns true if the active method failed (and threw an exception).
|
/// Returns true if the active method failed (and threw an exception).
|
||||||
/// Information about the exception can be obtained by calling error().
|
/// Information about the exception can be obtained by calling error().
|
||||||
{
|
{
|
||||||
return _failed;
|
return _pExc != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& error() const
|
std::string error() const
|
||||||
/// If the active method threw an exception, a textual representation
|
/// If the active method threw an exception, a textual representation
|
||||||
/// of the exception is returned. An empty string is returned if the
|
/// of the exception is returned. An empty string is returned if the
|
||||||
/// active method completed successfully.
|
/// active method completed successfully.
|
||||||
{
|
{
|
||||||
return _error;
|
if (_pExc)
|
||||||
|
return _pExc->message();
|
||||||
|
else
|
||||||
|
return std::string();
|
||||||
|
}
|
||||||
|
|
||||||
|
Exception* exception() const
|
||||||
|
/// If the active method threw an exception, a clone of the exception
|
||||||
|
/// object is returned, otherwise null.
|
||||||
|
{
|
||||||
|
return _pExc;
|
||||||
|
}
|
||||||
|
|
||||||
|
void error(const Exception& exc)
|
||||||
|
/// Sets the exception.
|
||||||
|
{
|
||||||
|
delete _pExc;
|
||||||
|
_pExc = exc.clone();
|
||||||
}
|
}
|
||||||
|
|
||||||
void error(const std::string& msg)
|
void error(const std::string& msg)
|
||||||
/// Sets the failed flag and the exception message.
|
/// Sets the exception.
|
||||||
{
|
{
|
||||||
_error = msg;
|
delete _pExc;
|
||||||
_failed = true;
|
_pExc = new UnhandledException(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
~ActiveResultHolder()
|
~ActiveResultHolder()
|
||||||
{
|
{
|
||||||
|
delete _pExc;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ResultType _data;
|
ResultType _data;
|
||||||
std::string _error;
|
Exception* _pExc;
|
||||||
bool _failed;
|
Event _event;
|
||||||
Event _event;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -225,14 +235,21 @@ public:
|
|||||||
return _pHolder->failed();
|
return _pHolder->failed();
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::string& error() const
|
std::string error() const
|
||||||
/// If the active method threw an exception, a textual representation
|
/// If the active method threw an exception, a textual representation
|
||||||
/// of the exception is returned. An empty string is returned if the
|
/// of the exception is returned. An empty string is returned if the
|
||||||
/// active method completed successfully.
|
/// active method completed successfully.
|
||||||
{
|
{
|
||||||
return _pHolder->error();
|
return _pHolder->error();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Exception* exception() const
|
||||||
|
/// If the active method threw an exception, a clone of the exception
|
||||||
|
/// object is returned, otherwise null.
|
||||||
|
{
|
||||||
|
return _pHolder->exception();
|
||||||
|
}
|
||||||
|
|
||||||
void notify()
|
void notify()
|
||||||
/// Notifies the invoking thread that the result became available.
|
/// Notifies the invoking thread that the result became available.
|
||||||
/// For internal use only.
|
/// For internal use only.
|
||||||
@ -252,6 +269,12 @@ public:
|
|||||||
{
|
{
|
||||||
_pHolder->error(msg);
|
_pHolder->error(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void error(const Exception& exc)
|
||||||
|
/// Sets the failed flag and the exception message.
|
||||||
|
{
|
||||||
|
_pHolder->error(exc);
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ActiveResult();
|
ActiveResult();
|
||||||
@ -260,7 +283,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ActiveResult_INCLUDED
|
#endif // Foundation_ActiveResult_INCLUDED
|
103
Foundation/include/Poco/ActiveRunnable.h
Normal file
103
Foundation/include/Poco/ActiveRunnable.h
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
//
|
||||||
|
// ActiveRunnable.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.2/Foundation/include/Poco/ActiveRunnable.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Foundation
|
||||||
|
// Package: Threading
|
||||||
|
// Module: ActiveObjects
|
||||||
|
//
|
||||||
|
// Definition of the ActiveRunnable class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Foundation_ActiveRunnable_INCLUDED
|
||||||
|
#define Foundation_ActiveRunnable_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
#include "Poco/ActiveResult.h"
|
||||||
|
#include "Poco/Runnable.h"
|
||||||
|
#include "Poco/Exception.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
template <class ResultType, class ArgType, class OwnerType>
|
||||||
|
class ActiveRunnable: public Runnable
|
||||||
|
/// This class is used by ActiveMethod.
|
||||||
|
/// See the ActiveMethod class for more information.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
typedef ResultType (OwnerType::*Callback)(const ArgType&);
|
||||||
|
typedef ActiveResult<ResultType> ActiveResultType;
|
||||||
|
|
||||||
|
ActiveRunnable(OwnerType* pOwner, Callback method, const ArgType& arg, const ActiveResultType& result):
|
||||||
|
_pOwner(pOwner),
|
||||||
|
_method(method),
|
||||||
|
_arg(arg),
|
||||||
|
_result(result)
|
||||||
|
{
|
||||||
|
poco_check_ptr (pOwner);
|
||||||
|
}
|
||||||
|
|
||||||
|
void run()
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
_result.data() = (_pOwner->*_method)(_arg);
|
||||||
|
}
|
||||||
|
catch (Exception& e)
|
||||||
|
{
|
||||||
|
_result.error(e);
|
||||||
|
}
|
||||||
|
catch (std::exception& e)
|
||||||
|
{
|
||||||
|
_result.error(e.what());
|
||||||
|
}
|
||||||
|
catch (...)
|
||||||
|
{
|
||||||
|
_result.error("unknown exception");
|
||||||
|
}
|
||||||
|
_result.notify();
|
||||||
|
delete this;
|
||||||
|
}
|
||||||
|
|
||||||
|
private:
|
||||||
|
OwnerType* _pOwner;
|
||||||
|
Callback _method;
|
||||||
|
ArgType _arg;
|
||||||
|
ActiveResultType _result;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Foundation_ActiveRunnable_INCLUDED
|
71
Foundation/include/Poco/ActiveStarter.h
Normal file
71
Foundation/include/Poco/ActiveStarter.h
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
//
|
||||||
|
// ActiveStarter.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.2/Foundation/include/Poco/ActiveStarter.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Foundation
|
||||||
|
// Package: Threading
|
||||||
|
// Module: ActiveObjects
|
||||||
|
//
|
||||||
|
// Definition of the ActiveStarter class.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Foundation_ActiveStarter_INCLUDED
|
||||||
|
#define Foundation_ActiveStarter_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
#include "Poco/Foundation.h"
|
||||||
|
#include "Poco/ThreadPool.h"
|
||||||
|
|
||||||
|
|
||||||
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
class Runnable;
|
||||||
|
|
||||||
|
|
||||||
|
template <class OwnerType>
|
||||||
|
class ActiveStarter
|
||||||
|
/// The default implementation of the StarterType
|
||||||
|
/// policy for ActiveMethod. It starts the method
|
||||||
|
/// in its own thread, obtained from the default
|
||||||
|
/// thread pool.
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void start(OwnerType* pOwner, Runnable* pRunnable)
|
||||||
|
{
|
||||||
|
ThreadPool::defaultPool().start(*pRunnable);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Foundation_ActiveStarter_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Activity.h
|
// Activity.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Activity.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Activity.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Threading
|
// Package: Threading
|
||||||
@ -40,24 +40,14 @@
|
|||||||
#define Foundation_Activity_INCLUDED
|
#define Foundation_Activity_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/RunnableAdapter.h"
|
||||||
#endif
|
#include "Poco/ThreadPool.h"
|
||||||
#ifndef Foundation_RunnableAdapter_INCLUDED
|
#include "Poco/Event.h"
|
||||||
#include "Foundation/RunnableAdapter.h"
|
#include "Poco/Mutex.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_ThreadPool_INCLUDED
|
|
||||||
#include "Foundation/ThreadPool.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Event_INCLUDED
|
|
||||||
#include "Foundation/Event.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
@ -222,7 +212,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Activity_INCLUDED
|
#endif // Foundation_Activity_INCLUDED
|
@ -1,24 +1,36 @@
|
|||||||
//
|
//
|
||||||
// Any.h
|
// Any.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Any.h#1 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Any.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
// Module: Any
|
// Module: Any
|
||||||
//
|
//
|
||||||
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
|
// Copyright Kevlin Henney, 2000, 2001, 2002. All rights reserved.
|
||||||
|
// Extracted from Boost 1.33.1 lib and adapted for poco: Peter Schojer/AppliedInformatics 2006-02-02
|
||||||
//
|
//
|
||||||
// Distributed under the Boost Software License, Version 1.0. (See
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
// accompanying file LICENSE_1_0.txt or copy at
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
// http://www.boost.org/LICENSE_1_0.txt)
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
// what: variant type boost::any
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
// who: contributed by Kevlin Henney,
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
// with features contributed and bugs found by
|
// do so, all subject to the following:
|
||||||
// Ed Brey, Mark Rodgers, Peter Dimov, and James Curran
|
//
|
||||||
// when: July 2001
|
// The copyright notices in the Software and this entire statement, including
|
||||||
// where: tested with BCC 5.5, MSVC 6.0, and g++ 2.95
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
// modified: extracted from Boost 1.33.1 lib and adapted for poco: Peter Schojer/AppliedInformatics 2006-02-02
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
@ -26,12 +38,12 @@
|
|||||||
#define Foundation_Any_INCLUDED
|
#define Foundation_Any_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/Exception.h"
|
#include "Poco/Exception.h"
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Any
|
class Any
|
||||||
@ -39,7 +51,7 @@ class Any
|
|||||||
/// of the internally stored data.
|
/// of the internally stored data.
|
||||||
///
|
///
|
||||||
/// Code taken from the Boost 1.33.1 library. Original copyright by Kevlin Henney. Modified for Poco
|
/// Code taken from the Boost 1.33.1 library. Original copyright by Kevlin Henney. Modified for Poco
|
||||||
/// by Applied Informatics. This file is under the BOOST license, see http://www.boost.org/LICENSE_1_0.txt
|
/// by Applied Informatics.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Any():
|
Any():
|
||||||
@ -77,7 +89,7 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
Any& operator = (const ValueType& rhs)
|
Any& operator = (const ValueType& rhs)
|
||||||
/// Assignment operator for all types != Any.
|
/// Assignment operator for all types != Any.
|
||||||
///
|
///
|
||||||
@ -123,7 +135,7 @@ private:
|
|||||||
virtual Placeholder* clone() const = 0;
|
virtual Placeholder* clone() const = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
class Holder: public Placeholder
|
class Holder: public Placeholder
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -146,17 +158,17 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
friend ValueType* AnyCast(Any*);
|
friend ValueType* AnyCast(Any*);
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
friend ValueType* UnsafeAnyCast(Any*);
|
friend ValueType* UnsafeAnyCast(Any*);
|
||||||
|
|
||||||
Placeholder* _content;
|
Placeholder* _content;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
ValueType* AnyCast(Any* operand)
|
ValueType* AnyCast(Any* operand)
|
||||||
/// AnyCast operator used to extract the ValueType from an Any*. Will return a pointer
|
/// AnyCast operator used to extract the ValueType from an Any*. Will return a pointer
|
||||||
/// to the stored value.
|
/// to the stored value.
|
||||||
@ -171,7 +183,7 @@ ValueType* AnyCast(Any* operand)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
const ValueType* AnyCast(const Any* operand)
|
const ValueType* AnyCast(const Any* operand)
|
||||||
/// AnyCast operator used to extract a const ValueType pointer from an const Any*. Will return a const pointer
|
/// AnyCast operator used to extract a const ValueType pointer from an const Any*. Will return a const pointer
|
||||||
/// to the stored value.
|
/// to the stored value.
|
||||||
@ -184,43 +196,41 @@ const ValueType* AnyCast(const Any* operand)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
ValueType AnyCast(const Any& operand)
|
ValueType AnyCast(const Any& operand)
|
||||||
/// AnyCast operator used to extract a copy of the ValueType from an const Any&.
|
/// AnyCast operator used to extract a copy of the ValueType from an const Any&.
|
||||||
///
|
///
|
||||||
/// Example Usage:
|
/// Example Usage:
|
||||||
/// MyType tmp = AnyCast<MyType>(anAny).
|
/// MyType tmp = AnyCast<MyType>(anAny).
|
||||||
/// Will throw a Foundation::BadCastException if the cast fails.
|
/// Will throw a BadCastException if the cast fails.
|
||||||
/// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& = ...
|
/// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& = ...
|
||||||
/// Some compilers will accept this code although a copy is returned. Use the RefAnyCast in
|
/// Some compilers will accept this code although a copy is returned. Use the RefAnyCast in
|
||||||
/// these cases.
|
/// these cases.
|
||||||
{
|
{
|
||||||
ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand));
|
ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand));
|
||||||
if(!result)
|
if (!result) throw BadCastException("Failed to convert between const Any types");
|
||||||
throw BadCastException("Failed to convert between const Any types");
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
ValueType AnyCast(Any& operand)
|
ValueType AnyCast(Any& operand)
|
||||||
/// AnyCast operator used to extract a copy of the ValueType from an Any&.
|
/// AnyCast operator used to extract a copy of the ValueType from an Any&.
|
||||||
///
|
///
|
||||||
/// Example Usage:
|
/// Example Usage:
|
||||||
/// MyType tmp = AnyCast<MyType>(anAny).
|
/// MyType tmp = AnyCast<MyType>(anAny).
|
||||||
/// Will throw a Foundation::BadCastException if the cast fails.
|
/// Will throw a BadCastException if the cast fails.
|
||||||
/// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& tmp = ...
|
/// Dont use an AnyCast in combination with references, i.e. MyType& tmp = ... or const MyType& tmp = ...
|
||||||
/// Some compilers will accept this code although a copy is returned. Use the RefAnyCast in
|
/// Some compilers will accept this code although a copy is returned. Use the RefAnyCast in
|
||||||
/// these cases.
|
/// these cases.
|
||||||
{
|
{
|
||||||
ValueType* result = AnyCast<ValueType>(&operand);
|
ValueType* result = AnyCast<ValueType>(&operand);
|
||||||
if(!result)
|
if (!result) throw BadCastException("Failed to convert between Any types");
|
||||||
throw BadCastException("Failed to convert between Any types");
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
const ValueType& RefAnyCast(const Any & operand)
|
const ValueType& RefAnyCast(const Any & operand)
|
||||||
/// AnyCast operator used to return a const reference to the internal data.
|
/// AnyCast operator used to return a const reference to the internal data.
|
||||||
///
|
///
|
||||||
@ -228,13 +238,12 @@ const ValueType& RefAnyCast(const Any & operand)
|
|||||||
/// const MyType& tmp = RefAnyCast<MyType>(anAny);
|
/// const MyType& tmp = RefAnyCast<MyType>(anAny);
|
||||||
{
|
{
|
||||||
ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand));
|
ValueType* result = AnyCast<ValueType>(const_cast<Any*>(&operand));
|
||||||
if(!result)
|
if (!result) throw BadCastException("RefAnyCast: Failed to convert between const Any types");
|
||||||
throw BadCastException("RefAnyCast: Failed to convert between const Any types");
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
ValueType& RefAnyCast(Any& operand)
|
ValueType& RefAnyCast(Any& operand)
|
||||||
/// AnyCast operator used to return a reference to the internal data.
|
/// AnyCast operator used to return a reference to the internal data.
|
||||||
///
|
///
|
||||||
@ -242,13 +251,12 @@ ValueType& RefAnyCast(Any& operand)
|
|||||||
/// MyType& tmp = RefAnyCast<MyType>(anAny);
|
/// MyType& tmp = RefAnyCast<MyType>(anAny);
|
||||||
{
|
{
|
||||||
ValueType* result = AnyCast<ValueType>(&operand);
|
ValueType* result = AnyCast<ValueType>(&operand);
|
||||||
if(!result)
|
if (!result) throw BadCastException("RefAnyCast: Failed to convert between Any types");
|
||||||
throw BadCastException("RefAnyCast: Failed to convert between Any types");
|
|
||||||
return *result;
|
return *result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
ValueType* UnsafeAnyCast(Any* operand)
|
ValueType* UnsafeAnyCast(Any* operand)
|
||||||
/// The "unsafe" versions of AnyCast are not part of the
|
/// The "unsafe" versions of AnyCast are not part of the
|
||||||
/// public interface and may be removed at any time. They are
|
/// public interface and may be removed at any time. They are
|
||||||
@ -260,7 +268,7 @@ ValueType* UnsafeAnyCast(Any* operand)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
template<typename ValueType>
|
template <typename ValueType>
|
||||||
const ValueType* UnsafeAnyCast(const Any* operand)
|
const ValueType* UnsafeAnyCast(const Any* operand)
|
||||||
/// The "unsafe" versions of AnyCast are not part of the
|
/// The "unsafe" versions of AnyCast are not part of the
|
||||||
/// public interface and may be removed at any time. They are
|
/// public interface and may be removed at any time. They are
|
||||||
@ -272,7 +280,7 @@ const ValueType* UnsafeAnyCast(const Any* operand)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ArchiveStrategy.h
|
// ArchiveStrategy.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ArchiveStrategy.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ArchiveStrategy.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Logging
|
// Package: Logging
|
||||||
@ -40,21 +40,16 @@
|
|||||||
#define Foundation_ArchiveStrategy_INCLUDED
|
#define Foundation_ArchiveStrategy_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/LogFile.h"
|
||||||
#endif
|
#include "Poco/File.h"
|
||||||
#ifndef Foundation_LogFile_INCLUDED
|
#include "Poco/DateTimeFormatter.h"
|
||||||
#include "Foundation/LogFile.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_File_INCLUDED
|
|
||||||
#include "Foundation/File.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_DateTimeFormatter_INCLUDED
|
|
||||||
#include "Foundation/DateTimeFormatter.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
|
class ArchiveCompressor;
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API ArchiveStrategy
|
class Foundation_API ArchiveStrategy
|
||||||
@ -85,6 +80,7 @@ private:
|
|||||||
ArchiveStrategy& operator = (const ArchiveStrategy&);
|
ArchiveStrategy& operator = (const ArchiveStrategy&);
|
||||||
|
|
||||||
bool _compress;
|
bool _compress;
|
||||||
|
ArchiveCompressor* _pCompressor;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -127,7 +123,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ArchiveStrategy_INCLUDED
|
#endif // Foundation_ArchiveStrategy_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AsyncChannel.h
|
// AsyncChannel.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AsyncChannel.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AsyncChannel.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Logging
|
// Package: Logging
|
||||||
@ -40,27 +40,15 @@
|
|||||||
#define Foundation_AsyncChannel_INCLUDED
|
#define Foundation_AsyncChannel_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Channel.h"
|
||||||
#endif
|
#include "Poco/Thread.h"
|
||||||
#ifndef Foundation_Channel_INCLUDED
|
#include "Poco/Mutex.h"
|
||||||
#include "Foundation/Channel.h"
|
#include "Poco/Runnable.h"
|
||||||
#endif
|
#include "Poco/NotificationQueue.h"
|
||||||
#ifndef Foundation_Thread_INCLUDED
|
|
||||||
#include "Foundation/Thread.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Runnable_INCLUDED
|
|
||||||
#include "Foundation/Runnable.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_NotificationQueue_INCLUDED
|
|
||||||
#include "Foundation/NotificationQueue.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API AsyncChannel: public Channel, public Runnable
|
class Foundation_API AsyncChannel: public Channel, public Runnable
|
||||||
@ -116,7 +104,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_AsyncChannel_INCLUDED
|
#endif // Foundation_AsyncChannel_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AutoPtr.h
|
// AutoPtr.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AutoPtr.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AutoPtr.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,19 +40,12 @@
|
|||||||
#define Foundation_AutoPtr_INCLUDED
|
#define Foundation_AutoPtr_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Exception.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Exception_INCLUDED
|
|
||||||
#include "Foundation/Exception.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_ALGORITHM_INCLUDED
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#define STD_ALGORITHM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
@ -71,7 +64,8 @@ class AutoPtr
|
|||||||
/// void release()
|
/// void release()
|
||||||
/// that decrements the reference count by one, and,
|
/// that decrements the reference count by one, and,
|
||||||
/// if the reference count reaches zero, deletes the
|
/// if the reference count reaches zero, deletes the
|
||||||
/// class.
|
/// object.
|
||||||
|
///
|
||||||
/// AutoPtr works in the following way:
|
/// AutoPtr works in the following way:
|
||||||
/// If an AutoPtr is assigned an ordinary pointer to
|
/// If an AutoPtr is assigned an ordinary pointer to
|
||||||
/// an object (via the constructor or the assignment operator),
|
/// an object (via the constructor or the assignment operator),
|
||||||
@ -86,6 +80,7 @@ class AutoPtr
|
|||||||
/// and the * operator. An attempt to dereference a null
|
/// and the * operator. An attempt to dereference a null
|
||||||
/// AutoPtr results in a NullPointerException being thrown.
|
/// AutoPtr results in a NullPointerException being thrown.
|
||||||
/// AutoPtr also implements all relational operators.
|
/// AutoPtr also implements all relational operators.
|
||||||
|
/// Note that AutoPtr allows casting of its encapsulated data types.
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
AutoPtr(): _ptr(0)
|
AutoPtr(): _ptr(0)
|
||||||
@ -155,6 +150,21 @@ public:
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template <class Other>
|
||||||
|
AutoPtr < Other > cast()
|
||||||
|
/// Casts the AutoPtr via a dynamic cast to the given type.
|
||||||
|
/// Returns an AutoPtr containing NULL if the cast fails.
|
||||||
|
/// Example: (assume class Sub: public Super)
|
||||||
|
/// AutoPtr < Super > super(new Sub());
|
||||||
|
/// AutoPtr < Sub > sub = super.cast<Sub>();
|
||||||
|
/// poco_assert (sub.get());
|
||||||
|
{
|
||||||
|
Other* pOther = dynamic_cast <Other*>(_ptr);
|
||||||
|
if (pOther)
|
||||||
|
pOther->duplicate();
|
||||||
|
return AutoPtr < Other > (pOther);
|
||||||
|
}
|
||||||
|
|
||||||
C* operator -> ()
|
C* operator -> ()
|
||||||
{
|
{
|
||||||
if (_ptr)
|
if (_ptr)
|
||||||
@ -315,7 +325,7 @@ inline void swap(AutoPtr<C>& p1, AutoPtr<C>& p2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_AutoPtr_INCLUDED
|
#endif // Foundation_AutoPtr_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// AutoReleasePool.h
|
// AutoReleasePool.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/AutoReleasePool.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/AutoReleasePool.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_AutoReleasePool_INCLUDED
|
#define Foundation_AutoReleasePool_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_LIST_INCLUDED
|
|
||||||
#include <list>
|
#include <list>
|
||||||
#define STD_LIST_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
@ -107,7 +102,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_AutoReleasePool_INCLUDED
|
#endif // Foundation_AutoReleasePool_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Base64Decoder.h
|
// Base64Decoder.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Base64Decoder.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Base64Decoder.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,19 +40,12 @@
|
|||||||
#define Foundation_Base64Decoder_INCLUDED
|
#define Foundation_Base64Decoder_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/UnbufferedStreamBuf.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_UnbufferedStreamBuf_INCLUDED
|
|
||||||
#include "Foundation/UnbufferedStreamBuf.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_ISTREAM_INCLUDED
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#define STD_ISTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API Base64DecoderBuf: public UnbufferedStreamBuf
|
class Foundation_API Base64DecoderBuf: public UnbufferedStreamBuf
|
||||||
@ -103,7 +96,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Base64Decoder_INCLUDED
|
#endif // Foundation_Base64Decoder_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Base64Encoder.h
|
// Base64Encoder.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Base64Encoder.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Base64Encoder.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,19 +40,12 @@
|
|||||||
#define Foundation_Base64Encoder_INCLUDED
|
#define Foundation_Base64Encoder_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/UnbufferedStreamBuf.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_UnbufferedStreamBuf_INCLUDED
|
|
||||||
#include "Foundation/UnbufferedStreamBuf.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_OSTREAM_INCLUDED
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#define STD_OSTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API Base64EncoderBuf: public UnbufferedStreamBuf
|
class Foundation_API Base64EncoderBuf: public UnbufferedStreamBuf
|
||||||
@ -113,7 +106,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Base64Encoder_INCLUDED
|
#endif // Foundation_Base64Encoder_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// BasicEvent.h
|
// BasicEvent.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/BasicEvent.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/BasicEvent.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Events
|
// Package: Events
|
||||||
@ -40,13 +40,13 @@
|
|||||||
#define Foundation_BasicEvent_INCLUDED
|
#define Foundation_BasicEvent_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/AbstractEvent.h"
|
#include "Poco/AbstractEvent.h"
|
||||||
#include "Foundation/DefaultStrategy.h"
|
#include "Poco/DefaultStrategy.h"
|
||||||
#include "Foundation/AbstractDelegate.h"
|
#include "Poco/AbstractDelegate.h"
|
||||||
#include "Foundation/CompareFunctions.h"
|
#include "Poco/CompareFunctions.h"
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TArgs>
|
template <class TArgs>
|
||||||
@ -82,7 +82,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// BinaryReader.h
|
// BinaryReader.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/BinaryReader.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/BinaryReader.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_BinaryReader_INCLUDED
|
#define Foundation_BinaryReader_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_ISTREAM_INCLUDED
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#define STD_ISTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API BinaryReader
|
class Foundation_API BinaryReader
|
||||||
@ -186,7 +181,7 @@ inline BinaryReader::StreamByteOrder BinaryReader::byteOrder() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_BinaryReader_INCLUDED
|
#endif // Foundation_BinaryReader_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// BinaryWriter.h
|
// BinaryWriter.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/BinaryWriter.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/BinaryWriter.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_BinaryWriter_INCLUDED
|
#define Foundation_BinaryWriter_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_OSTREAM_INCLUDED
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#define STD_OSTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API BinaryWriter
|
class Foundation_API BinaryWriter
|
||||||
@ -198,7 +193,7 @@ inline BinaryWriter::StreamByteOrder BinaryWriter::byteOrder() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_BinaryWriter_INCLUDED
|
#endif // Foundation_BinaryWriter_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Buffer.h
|
// Buffer.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Buffer.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Buffer.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_Buffer_INCLUDED
|
#define Foundation_Buffer_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -125,7 +123,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Buffer_INCLUDED
|
#endif // Foundation_Buffer_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// BufferAllocator.h
|
// BufferAllocator.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/BufferAllocator.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/BufferAllocator.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_BufferAllocator_INCLUDED
|
#define Foundation_BufferAllocator_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_IOS_INCLUDED
|
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#define STD_IOS_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <typename ch>
|
template <typename ch>
|
||||||
@ -72,7 +67,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_BufferAllocator_INCLUDED
|
#endif // Foundation_BufferAllocator_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// BufferedBidirectionalStreamBuf.h
|
// BufferedBidirectionalStreamBuf.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/BufferedBidirectionalStreamBuf.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/BufferedBidirectionalStreamBuf.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,30 +40,15 @@
|
|||||||
#define Foundation_BufferedBidirectionalStreamBuf_INCLUDED
|
#define Foundation_BufferedBidirectionalStreamBuf_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/BufferAllocator.h"
|
||||||
#endif
|
#include "Poco/StreamUtil.h"
|
||||||
#ifndef Foundation_BufferAllocator_INCLUDED
|
|
||||||
#include "Foundation/BufferAllocator.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_StreamUtil_INCLUDED
|
|
||||||
#include "Foundation/StreamUtil.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_STREAMBUF_INCLUDED
|
|
||||||
#include <streambuf>
|
#include <streambuf>
|
||||||
#define STD_STREAMBUF_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_IOSFWD_INCLUDED
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#define STD_IOSFWD_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_IOS_INCLUDED
|
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#define STD_IOS_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template<typename ch, typename tr, typename ba = BufferAllocator<ch> >
|
template<typename ch, typename tr, typename ba = BufferAllocator<ch> >
|
||||||
@ -186,7 +171,7 @@ private:
|
|||||||
typedef BasicBufferedBidirectionalStreamBuf<char, std::char_traits<char> > BufferedBidirectionalStreamBuf;
|
typedef BasicBufferedBidirectionalStreamBuf<char, std::char_traits<char> > BufferedBidirectionalStreamBuf;
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_BufferedBidirectionalStreamBuf_INCLUDED
|
#endif // Foundation_BufferedBidirectionalStreamBuf_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// BufferedStreamBuf.h
|
// BufferedStreamBuf.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/BufferedStreamBuf.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/BufferedStreamBuf.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,30 +40,15 @@
|
|||||||
#define Foundation_BufferedStreamBuf_INCLUDED
|
#define Foundation_BufferedStreamBuf_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/BufferAllocator.h"
|
||||||
#endif
|
#include "Poco/StreamUtil.h"
|
||||||
#ifndef Foundation_BufferAllocator_INCLUDED
|
|
||||||
#include "Foundation/BufferAllocator.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_StreamUtil_INCLUDED
|
|
||||||
#include "Foundation/StreamUtil.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_STREAMBUF_INCLUDED
|
|
||||||
#include <streambuf>
|
#include <streambuf>
|
||||||
#define STD_STREAMBUF_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_IOSFWD_INCLUDED
|
|
||||||
#include <iosfwd>
|
#include <iosfwd>
|
||||||
#define STD_IOSFWD_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_IOS_INCLUDED
|
|
||||||
#include <ios>
|
#include <ios>
|
||||||
#define STD_IOS_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <typename ch, typename tr, typename ba = BufferAllocator<ch> >
|
template <typename ch, typename tr, typename ba = BufferAllocator<ch> >
|
||||||
@ -183,7 +168,7 @@ private:
|
|||||||
typedef BasicBufferedStreamBuf<char, std::char_traits<char> > BufferedStreamBuf;
|
typedef BasicBufferedStreamBuf<char, std::char_traits<char> > BufferedStreamBuf;
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_BufferedStreamBuf_INCLUDED
|
#endif // Foundation_BufferedStreamBuf_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Bugcheck.h
|
// Bugcheck.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Bugcheck.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Bugcheck.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_Bugcheck_INCLUDED
|
#define Foundation_Bugcheck_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_STRING_INCLUDED
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#define STD_STRING_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API Bugcheck
|
class Foundation_API Bugcheck
|
||||||
@ -95,37 +90,37 @@ protected:
|
|||||||
// useful macros (these automatically supply line number and file name)
|
// useful macros (these automatically supply line number and file name)
|
||||||
//
|
//
|
||||||
#if defined(_DEBUG)
|
#if defined(_DEBUG)
|
||||||
#define poco_assert_dbg(cond) if (!(cond)) Foundation::Bugcheck::assertion(#cond, __FILE__, __LINE__); else (void) 0
|
#define poco_assert_dbg(cond) if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LINE__); else (void) 0
|
||||||
#else
|
#else
|
||||||
#define poco_assert_dbg(cond)
|
#define poco_assert_dbg(cond)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#define poco_assert(cond) \
|
#define poco_assert(cond) \
|
||||||
if (!(cond)) Foundation::Bugcheck::assertion(#cond, __FILE__, __LINE__); else (void) 0
|
if (!(cond)) Poco::Bugcheck::assertion(#cond, __FILE__, __LINE__); else (void) 0
|
||||||
|
|
||||||
|
|
||||||
#define poco_check_ptr(ptr) \
|
#define poco_check_ptr(ptr) \
|
||||||
if (!(ptr)) Foundation::Bugcheck::nullPointer(#ptr, __FILE__, __LINE__); else (void) 0
|
if (!(ptr)) Poco::Bugcheck::nullPointer(#ptr, __FILE__, __LINE__); else (void) 0
|
||||||
|
|
||||||
|
|
||||||
#define poco_bugcheck() \
|
#define poco_bugcheck() \
|
||||||
Foundation::Bugcheck::bugcheck(__FILE__, __LINE__)
|
Poco::Bugcheck::bugcheck(__FILE__, __LINE__)
|
||||||
|
|
||||||
|
|
||||||
#define poco_bugcheck_msg(msg) \
|
#define poco_bugcheck_msg(msg) \
|
||||||
Foundation::Bugcheck::bugcheck(msg, __FILE__, __LINE__)
|
Poco::Bugcheck::bugcheck(msg, __FILE__, __LINE__)
|
||||||
|
|
||||||
|
|
||||||
#define poco_debugger() \
|
#define poco_debugger() \
|
||||||
Foundation::Bugcheck::debugger(__FILE__, __LINE__)
|
Poco::Bugcheck::debugger(__FILE__, __LINE__)
|
||||||
|
|
||||||
|
|
||||||
#define poco_debugger_msg(msg) \
|
#define poco_debugger_msg(msg) \
|
||||||
Foundation::Bugcheck::debugger(msg, __FILE__, __LINE__)
|
Poco::Bugcheck::debugger(msg, __FILE__, __LINE__)
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Bugcheck_INCLUDED
|
#endif // Foundation_Bugcheck_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ByteOrder.h
|
// ByteOrder.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ByteOrder.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ByteOrder.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -38,15 +38,11 @@
|
|||||||
#define Foundation_ByteOrder_INCLUDED
|
#define Foundation_ByteOrder_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Types.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Types_INCLUDED
|
|
||||||
#include "Foundation/Types.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API ByteOrder
|
class Foundation_API ByteOrder
|
||||||
@ -225,7 +221,7 @@ POCO_IMPLEMENT_BYTEORDER_LIT(toLittleEndian)
|
|||||||
POCO_IMPLEMENT_BYTEORDER_LIT(fromLittleEndian)
|
POCO_IMPLEMENT_BYTEORDER_LIT(fromLittleEndian)
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ByteOrder_INCLUDED
|
#endif // Foundation_ByteOrder_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Channel.h
|
// Channel.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Channel.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Channel.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Logging
|
// Package: Logging
|
||||||
@ -40,21 +40,13 @@
|
|||||||
#define Foundation_Channel_INCLUDED
|
#define Foundation_Channel_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Configurable.h"
|
||||||
#endif
|
#include "Poco/Mutex.h"
|
||||||
#ifndef Foundation_Configurable_INCLUDED
|
#include "Poco/RefCountedObject.h"
|
||||||
#include "Foundation/Configurable.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_RefCountedObject_INCLUDED
|
|
||||||
#include "Foundation/RefCountedObject.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Message;
|
class Message;
|
||||||
@ -98,7 +90,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Channel_INCLUDED
|
#endif // Foundation_Channel_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ClassLibrary.h
|
// ClassLibrary.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ClassLibrary.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ClassLibrary.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: SharedLibrary
|
// Package: SharedLibrary
|
||||||
@ -40,16 +40,9 @@
|
|||||||
#define Foundation_ClassLibrary_INCLUDED
|
#define Foundation_ClassLibrary_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Manifest.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Manifest_INCLUDED
|
|
||||||
#include "Foundation/Manifest.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_TYPEINFO_INCLUDED
|
|
||||||
#include <typeinfo>
|
#include <typeinfo>
|
||||||
#define STD_TYPEINFO_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if defined(_WIN32)
|
#if defined(_WIN32)
|
||||||
@ -64,7 +57,7 @@
|
|||||||
//
|
//
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
bool POCO_LIBRARY_API pocoBuildManifest(Foundation::ManifestBase* pManifest);
|
bool POCO_LIBRARY_API pocoBuildManifest(Poco::ManifestBase* pManifest);
|
||||||
void POCO_LIBRARY_API pocoInitializeLibrary();
|
void POCO_LIBRARY_API pocoInitializeLibrary();
|
||||||
void POCO_LIBRARY_API pocoUninitializeLibrary();
|
void POCO_LIBRARY_API pocoUninitializeLibrary();
|
||||||
}
|
}
|
||||||
@ -82,15 +75,15 @@ extern "C"
|
|||||||
// POCO_END_MANIFEST
|
// POCO_END_MANIFEST
|
||||||
//
|
//
|
||||||
#define POCO_BEGIN_MANIFEST(base) \
|
#define POCO_BEGIN_MANIFEST(base) \
|
||||||
bool pocoBuildManifest(Foundation::ManifestBase* pManifest_) \
|
bool pocoBuildManifest(Poco::ManifestBase* pManifest_) \
|
||||||
{ \
|
{ \
|
||||||
typedef base _Base; \
|
typedef base _Base; \
|
||||||
typedef Foundation::Manifest<_Base> _Manifest; \
|
typedef Poco::Manifest<_Base> _Manifest; \
|
||||||
std::string requiredType(typeid(_Manifest).name()); \
|
std::string requiredType(typeid(_Manifest).name()); \
|
||||||
std::string actualType(pManifest_->className()); \
|
std::string actualType(pManifest_->className()); \
|
||||||
if (requiredType == actualType) \
|
if (requiredType == actualType) \
|
||||||
{ \
|
{ \
|
||||||
Foundation::Manifest<_Base>* pManifest = static_cast<_Manifest*>(pManifest_);
|
Poco::Manifest<_Base>* pManifest = static_cast<_Manifest*>(pManifest_);
|
||||||
|
|
||||||
|
|
||||||
#define POCO_END_MANIFEST \
|
#define POCO_END_MANIFEST \
|
||||||
@ -101,11 +94,11 @@ extern "C"
|
|||||||
|
|
||||||
|
|
||||||
#define POCO_EXPORT_CLASS(cls) \
|
#define POCO_EXPORT_CLASS(cls) \
|
||||||
pManifest->insert(new Foundation::MetaObject<cls, _Base>(#cls));
|
pManifest->insert(new Poco::MetaObject<cls, _Base>(#cls));
|
||||||
|
|
||||||
|
|
||||||
#define POCO_EXPORT_SINGLETON(cls) \
|
#define POCO_EXPORT_SINGLETON(cls) \
|
||||||
pManifest->insert(new Foundation::MetaSingleton<cls, _Base>(#cls));
|
pManifest->insert(new Poco::MetaSingleton<cls, _Base>(#cls));
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ClassLibrary_INCLUDED
|
#endif // Foundation_ClassLibrary_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ClassLoader.h
|
// ClassLoader.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ClassLoader.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ClassLoader.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: SharedLibrary
|
// Package: SharedLibrary
|
||||||
@ -40,31 +40,16 @@
|
|||||||
#define Foundation_ClassLoader_INCLUDED
|
#define Foundation_ClassLoader_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/MetaObject.h"
|
||||||
#endif
|
#include "Poco/Manifest.h"
|
||||||
#ifndef Foundation_MetaObject_INCLUDED
|
#include "Poco/SharedLibrary.h"
|
||||||
#include "Foundation/MetaObject.h"
|
#include "Poco/Mutex.h"
|
||||||
#endif
|
#include "Poco/Exception.h"
|
||||||
#ifndef Foundation_Manifest_INCLUDED
|
|
||||||
#include "Foundation/Manifest.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_SharedLibrary_INCLUDED
|
|
||||||
#include "Foundation/SharedLibrary.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Exception_INCLUDED
|
|
||||||
#include "Foundation/Exception.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_MAP_INCLUDED
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#define STD_MAP_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class Base>
|
template <class Base>
|
||||||
@ -367,7 +352,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ClassLoader_INCLUDED
|
#endif // Foundation_ClassLoader_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CompareFunctions.h
|
// CompareFunctions.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/CompareFunctions.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/CompareFunctions.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Events
|
// Package: Events
|
||||||
@ -40,11 +40,11 @@
|
|||||||
#define Foundation_CompareFunctions_INCLUDED
|
#define Foundation_CompareFunctions_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
@ -57,7 +57,7 @@ struct p_less: std::binary_function<T, T, bool>
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
55
Foundation/include/Poco/Config.h
Normal file
55
Foundation/include/Poco/Config.h
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
//
|
||||||
|
// Config.h
|
||||||
|
//
|
||||||
|
// $Id: //poco/1.2/Foundation/include/Poco/Config.h#1 $
|
||||||
|
//
|
||||||
|
// Library: Foundation
|
||||||
|
// Package: Core
|
||||||
|
// Module: Foundation
|
||||||
|
//
|
||||||
|
// Feature configuration for the POCO libraries.
|
||||||
|
//
|
||||||
|
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
|
||||||
|
// and Contributors.
|
||||||
|
//
|
||||||
|
// Permission is hereby granted, free of charge, to any person or organization
|
||||||
|
// obtaining a copy of the software and accompanying documentation covered by
|
||||||
|
// this license (the "Software") to use, reproduce, display, distribute,
|
||||||
|
// execute, and transmit the Software, and to prepare derivative works of the
|
||||||
|
// Software, and to permit third-parties to whom the Software is furnished to
|
||||||
|
// do so, all subject to the following:
|
||||||
|
//
|
||||||
|
// The copyright notices in the Software and this entire statement, including
|
||||||
|
// the above license grant, this restriction and the following disclaimer,
|
||||||
|
// must be included in all copies of the Software, in whole or in part, and
|
||||||
|
// all derivative works of the Software, unless such copies or derivative
|
||||||
|
// works are solely in the form of machine-executable object code generated by
|
||||||
|
// a source language processor.
|
||||||
|
//
|
||||||
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
// FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
|
||||||
|
// SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
|
||||||
|
// FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
|
||||||
|
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef Foundation_Config_INCLUDED
|
||||||
|
#define Foundation_Config_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
|
// Define to enable Windows Unicode (UTF-8) support.
|
||||||
|
#undef POCO_WIN32_UTF8
|
||||||
|
|
||||||
|
|
||||||
|
// Define to disable FPEnvironment support
|
||||||
|
#undef POCO_NO_FPENVIRONMENT
|
||||||
|
|
||||||
|
|
||||||
|
// Define if std::wstring is not available
|
||||||
|
#undef POCO_NO_WSTRING
|
||||||
|
|
||||||
|
|
||||||
|
#endif // Foundation_Config_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Configurable.h
|
// Configurable.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Configurable.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Configurable.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Logging
|
// Package: Logging
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_Configurable_INCLUDED
|
#define Foundation_Configurable_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API Configurable
|
class Foundation_API Configurable
|
||||||
@ -81,7 +79,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Configurable_INCLUDED
|
#endif // Foundation_Configurable_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ConsoleChannel.h
|
// ConsoleChannel.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ConsoleChannel.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ConsoleChannel.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Logging
|
// Package: Logging
|
||||||
@ -40,22 +40,13 @@
|
|||||||
#define Foundation_ConsoleChannel_INCLUDED
|
#define Foundation_ConsoleChannel_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Channel.h"
|
||||||
#endif
|
#include "Poco/Mutex.h"
|
||||||
#ifndef Foundation_Channel_INCLUDED
|
|
||||||
#include "Foundation/Channel.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_OSTREAM_INCLUDED
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#define STD_OSTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API ConsoleChannel: public Channel
|
class Foundation_API ConsoleChannel: public Channel
|
||||||
@ -92,7 +83,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ConsoleChannel_INCLUDED
|
#endif // Foundation_ConsoleChannel_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// CountingStream.h
|
// CountingStream.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/CountingStream.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/CountingStream.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,23 +40,13 @@
|
|||||||
#define Foundation_CountingStream_INCLUDED
|
#define Foundation_CountingStream_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/UnbufferedStreamBuf.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_UnbufferedStreamBuf_INCLUDED
|
|
||||||
#include "Foundation/UnbufferedStreamBuf.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_ISTREAM_INCLUDED
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#define STD_ISTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_OSTREAM_INCLUDED
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#define STD_OSTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API CountingStreamBuf: public UnbufferedStreamBuf
|
class Foundation_API CountingStreamBuf: public UnbufferedStreamBuf
|
||||||
@ -245,7 +235,7 @@ inline int CountingIOS::getCurrentLineNumber() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_CountingStream_INCLUDED
|
#endif // Foundation_CountingStream_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DateTime.h
|
// DateTime.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DateTime.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DateTime.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: DateTime
|
// Package: DateTime
|
||||||
@ -40,18 +40,12 @@
|
|||||||
#define Foundation_DateTime_INCLUDED
|
#define Foundation_DateTime_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Timestamp.h"
|
||||||
#endif
|
#include "Poco/Timespan.h"
|
||||||
#ifndef Foundation_Timestamp_INCLUDED
|
|
||||||
#include "Foundation/Timestamp.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Timespan_INCLUDED
|
|
||||||
#include "Foundation/Timespan.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DateTime
|
class Foundation_API DateTime
|
||||||
@ -65,10 +59,21 @@ class Foundation_API DateTime
|
|||||||
/// collected and described by Peter Baum at
|
/// collected and described by Peter Baum at
|
||||||
/// http://vsg.cape.com/~pbaum/date/date0.htm
|
/// http://vsg.cape.com/~pbaum/date/date0.htm
|
||||||
///
|
///
|
||||||
/// Internally, this class stores a date/time in three
|
/// Internally, this class stores a date/time in two
|
||||||
/// forms for performance reasons. Only use this
|
/// forms (UTC and broken down) for performance reasons. Only use
|
||||||
/// class for conversions between date/time representations.
|
/// this class for conversions between date/time representations.
|
||||||
/// Use the Timestamp class for everything else.
|
/// Use the Timestamp class for everything else.
|
||||||
|
///
|
||||||
|
/// Notes:
|
||||||
|
/// * Zero is a valid year (in accordance with ISO 8601 and astronomical year numbering)
|
||||||
|
/// * Year zero (0) is a leap year
|
||||||
|
/// * Negative years (years preceding 1 BC) are not supported
|
||||||
|
///
|
||||||
|
/// For more information, please see:
|
||||||
|
/// * http://en.wikipedia.org/wiki/Gregorian_Calendar
|
||||||
|
/// * http://en.wikipedia.org/wiki/Julian_day
|
||||||
|
/// * http://en.wikipedia.org/wiki/UTC
|
||||||
|
/// * http://en.wikipedia.org/wiki/ISO_8601
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum Months
|
enum Months
|
||||||
@ -99,7 +104,7 @@ public:
|
|||||||
FRIDAY,
|
FRIDAY,
|
||||||
SATURDAY
|
SATURDAY
|
||||||
};
|
};
|
||||||
|
|
||||||
DateTime();
|
DateTime();
|
||||||
/// Creates a DateTime for the current date and time.
|
/// Creates a DateTime for the current date and time.
|
||||||
|
|
||||||
@ -210,7 +215,7 @@ public:
|
|||||||
/// Returns the microsecond (0 to 999)
|
/// Returns the microsecond (0 to 999)
|
||||||
|
|
||||||
double julianDay() const;
|
double julianDay() const;
|
||||||
/// Returns the julian day for the date.
|
/// Returns the julian day for the date and time.
|
||||||
|
|
||||||
Timestamp timestamp() const;
|
Timestamp timestamp() const;
|
||||||
/// Returns the date and time expressed as a Timestamp.
|
/// Returns the date and time expressed as a Timestamp.
|
||||||
@ -240,29 +245,37 @@ public:
|
|||||||
static int daysOfMonth(int year, int month);
|
static int daysOfMonth(int year, int month);
|
||||||
/// Returns the number of days in the given month
|
/// Returns the number of days in the given month
|
||||||
/// and year. Month is from 1 to 12.
|
/// and year. Month is from 1 to 12.
|
||||||
|
|
||||||
|
static bool isValid(int year, int month, int day, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0);
|
||||||
|
/// Checks if the given date and time is valid
|
||||||
|
/// (all arguments are within a proper range).
|
||||||
|
///
|
||||||
|
/// Returns true if all arguments are valid, false otherwise.
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static double toJulianDay(Timestamp::UtcTimeVal utcTime);
|
static double toJulianDay(Timestamp::UtcTimeVal utcTime);
|
||||||
/// Computes the Julian day for an UTC time.
|
/// Computes the Julian day for an UTC time.
|
||||||
|
|
||||||
static double toJulianDay(int year, int month, int day, int hour, int minute, int second, int millisecond, int microsecond);
|
static double toJulianDay(int year, int month, int day, int hour = 0, int minute = 0, int second = 0, int millisecond = 0, int microsecond = 0);
|
||||||
/// Computes the Julian day for a gregorian calendar date and time.
|
/// Computes the Julian day for a gregorian calendar date and time.
|
||||||
/// See <http://vsg.cape.com/~pbaum/date/jdimp.htm>, section 2.3.1 for the algorithm.
|
/// See <http://vsg.cape.com/~pbaum/date/jdimp.htm>, section 2.3.1 for the algorithm.
|
||||||
|
|
||||||
static Timestamp::UtcTimeVal toUtcTime(double julianDay);
|
static Timestamp::UtcTimeVal toUtcTime(double julianDay);
|
||||||
/// Computes the UTC time for a Julian day.
|
/// Computes the UTC time for a Julian day.
|
||||||
|
|
||||||
void computeGregorian();
|
void computeGregorian(double julianDay);
|
||||||
/// Computes the Gregorian date for the stored Julian day.
|
/// Computes the Gregorian date for the given Julian day.
|
||||||
/// See <http://vsg.cape.com/~pbaum/date/injdimp.htm>, section 3.3.1 for the algorithm.
|
/// See <http://vsg.cape.com/~pbaum/date/injdimp.htm>, section 3.3.1 for the algorithm.
|
||||||
|
|
||||||
|
void computeDaytime();
|
||||||
|
/// Extracts the daytime (hours, minutes, seconds, etc.) from the stored utcTime.
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void checkLimit(short& lower, short& higher, short limit);
|
void checkLimit(short& lower, short& higher, short limit);
|
||||||
void normalize();
|
void normalize();
|
||||||
///utility functions used to correct the overflow in computeGregorian
|
///utility functions used to correct the overflow in computeGregorian
|
||||||
|
|
||||||
Timestamp::UtcTimeVal _utcTime;
|
Timestamp::UtcTimeVal _utcTime;
|
||||||
double _julianDay;
|
|
||||||
short _year;
|
short _year;
|
||||||
short _month;
|
short _month;
|
||||||
short _day;
|
short _day;
|
||||||
@ -360,12 +373,6 @@ inline int DateTime::microsecond() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline double DateTime::julianDay() const
|
|
||||||
{
|
|
||||||
return _julianDay;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
inline bool DateTime::operator == (const DateTime& dateTime) const
|
inline bool DateTime::operator == (const DateTime& dateTime) const
|
||||||
{
|
{
|
||||||
return _utcTime == dateTime._utcTime;
|
return _utcTime == dateTime._utcTime;
|
||||||
@ -414,7 +421,7 @@ inline void swap(DateTime& d1, DateTime& d2)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DateTime_INCLUDED
|
#endif // Foundation_DateTime_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DateTimeFormat.h
|
// DateTimeFormat.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DateTimeFormat.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DateTimeFormat.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: DateTime
|
// Package: DateTime
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_DateTimeFormat_INCLUDED
|
#define Foundation_DateTimeFormat_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DateTimeFormat
|
class Foundation_API DateTimeFormat
|
||||||
@ -119,7 +117,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DateTimeFormat_INCLUDED
|
#endif // Foundation_DateTimeFormat_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DateTimeFormatter.h
|
// DateTimeFormatter.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DateTimeFormatter.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DateTimeFormatter.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: DateTime
|
// Package: DateTime
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_DateTimeFormatter_INCLUDED
|
#define Foundation_DateTimeFormatter_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class DateTime;
|
class DateTime;
|
||||||
@ -133,7 +131,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DateTimeFormatter_INCLUDED
|
#endif // Foundation_DateTimeFormatter_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DateTimeParser.h
|
// DateTimeParser.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DateTimeParser.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DateTimeParser.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: DateTime
|
// Package: DateTime
|
||||||
@ -40,15 +40,11 @@
|
|||||||
#define Foundation_DateTimeParser_INCLUDED
|
#define Foundation_DateTimeParser_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/DateTime.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_DateTime_INCLUDED
|
|
||||||
#include "Foundation/DateTime.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DateTimeParser
|
class Foundation_API DateTimeParser
|
||||||
@ -117,7 +113,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DateTimeParser_INCLUDED
|
#endif // Foundation_DateTimeParser_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Debugger.h
|
// Debugger.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Debugger.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Debugger.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_Debugger_INCLUDED
|
#define Foundation_Debugger_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API Debugger
|
class Foundation_API Debugger
|
||||||
@ -91,7 +89,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Debugger_INCLUDED
|
#endif // Foundation_Debugger_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DefaultStrategy.h
|
// DefaultStrategy.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DefaultStrategy.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DefaultStrategy.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Events
|
// Package: Events
|
||||||
@ -40,13 +40,13 @@
|
|||||||
#define Foundation_DefaultStrategy_INCLUDED
|
#define Foundation_DefaultStrategy_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/NotificationStrategy.h"
|
#include "Poco/NotificationStrategy.h"
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TArgs, class TDelegate, class TCompare>
|
template <class TArgs, class TDelegate, class TCompare>
|
||||||
@ -148,7 +148,7 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DeflatingStream.h
|
// DeflatingStream.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DeflatingStream.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DeflatingStream.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Streams
|
// Package: Streams
|
||||||
@ -40,26 +40,14 @@
|
|||||||
#define Foundation_DeflatingStream_INCLUDED
|
#define Foundation_DeflatingStream_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/BufferedStreamBuf.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_BufferedStreamBuf_INCLUDED
|
|
||||||
#include "Foundation/BufferedStreamBuf.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_ISTREAM_INCLUDED
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#define STD_ISTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_OSTREAM_INCLUDED
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#define STD_OSTREAM_INCLUDED
|
#include "Poco/zlib.h"
|
||||||
#endif
|
|
||||||
#ifndef ZLIB_H
|
|
||||||
#include "Foundation/zlib.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DeflatingStreamBuf: public BufferedStreamBuf
|
class Foundation_API DeflatingStreamBuf: public BufferedStreamBuf
|
||||||
@ -147,7 +135,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DeflatingStream_INCLUDED
|
#endif // Foundation_DeflatingStream_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Delegate.h
|
// Delegate.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Delegate.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Delegate.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Events
|
// Package: Events
|
||||||
@ -40,12 +40,12 @@
|
|||||||
#define Foundation_Delegate_INCLUDED
|
#define Foundation_Delegate_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/AbstractDelegate.h"
|
#include "Poco/AbstractDelegate.h"
|
||||||
#include "Foundation/Expire.h"
|
#include "Poco/Expire.h"
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class TObj, class TArgs>
|
template <class TObj, class TArgs>
|
||||||
@ -114,7 +114,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DigestEngine.h
|
// DigestEngine.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DigestEngine.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DigestEngine.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Crypt
|
// Package: Crypt
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_DigestEngine_INCLUDED
|
#define Foundation_DigestEngine_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_VECTOR_INCLUDED
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#define STD_VECTOR_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DigestEngine
|
class Foundation_API DigestEngine
|
||||||
@ -124,7 +119,7 @@ inline void DigestEngine::update(const std::string& data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DigestEngine_INCLUDED
|
#endif // Foundation_DigestEngine_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DigestStream.h
|
// DigestStream.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DigestStream.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DigestStream.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Crypt
|
// Package: Crypt
|
||||||
@ -40,26 +40,14 @@
|
|||||||
#define Foundation_DigestStream_INCLUDED
|
#define Foundation_DigestStream_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/BufferedStreamBuf.h"
|
||||||
#endif
|
#include "Poco/DigestEngine.h"
|
||||||
#ifndef Foundation_BufferedStreamBuf_INCLUDED
|
|
||||||
#include "Foundation/BufferedStreamBuf.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_DigestEngine_INCLUDED
|
|
||||||
#include "Foundation/DigestEngine.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_ISTREAM_INCLUDED
|
|
||||||
#include <istream>
|
#include <istream>
|
||||||
#define STD_ISTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_OSTREAM_INCLUDED
|
|
||||||
#include <ostream>
|
#include <ostream>
|
||||||
#define STD_OSTREAM_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DigestBuf: public BufferedStreamBuf
|
class Foundation_API DigestBuf: public BufferedStreamBuf
|
||||||
@ -128,7 +116,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DigestStream_INCLUDED
|
#endif // Foundation_DigestStream_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DirectoryIterator.h
|
// DirectoryIterator.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DirectoryIterator.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DirectoryIterator.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Filesystem
|
// Package: Filesystem
|
||||||
@ -40,18 +40,12 @@
|
|||||||
#define Foundation_DirectoryIterator_INCLUDED
|
#define Foundation_DirectoryIterator_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/File.h"
|
||||||
#endif
|
#include "Poco/Path.h"
|
||||||
#ifndef Foundation_File_INCLUDED
|
|
||||||
#include "Foundation/File.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Path_INCLUDED
|
|
||||||
#include "Foundation/Path.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class DirectoryIteratorImpl;
|
class DirectoryIteratorImpl;
|
||||||
@ -158,7 +152,7 @@ inline bool DirectoryIterator::operator != (const DirectoryIterator& iterator) c
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DirectoryIterator_INCLUDED
|
#endif // Foundation_DirectoryIterator_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DirectoryIterator_UNIX.h
|
// DirectoryIterator_UNIX.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DirectoryIterator_UNIX.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DirectoryIterator_UNIX.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Filesystem
|
// Package: Filesystem
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_DirectoryIterator_UNIX_INCLUDED
|
#define Foundation_DirectoryIterator_UNIX_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_DIRENT_INCLUDED
|
|
||||||
#include <dirent.h>
|
#include <dirent.h>
|
||||||
#define STD_DIRENT_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DirectoryIteratorImpl
|
class Foundation_API DirectoryIteratorImpl
|
||||||
@ -93,7 +88,7 @@ inline void DirectoryIteratorImpl::release()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DirectoryIterator_UNIX_INCLUDED
|
#endif // Foundation_DirectoryIterator_UNIX_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DirectoryIterator_VMS.h
|
// DirectoryIterator_VMS.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DirectoryIterator_VMS.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DirectoryIterator_VMS.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Filesystem
|
// Package: Filesystem
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_DirectoryIterator_VMS_INCLUDED
|
#define Foundation_DirectoryIterator_VMS_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef SYS_RMS_INCLUDED
|
|
||||||
#include <rms.h>
|
#include <rms.h>
|
||||||
#define SYS_RMS_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DirectoryIteratorImpl
|
class Foundation_API DirectoryIteratorImpl
|
||||||
@ -96,7 +91,7 @@ inline void DirectoryIteratorImpl::release()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DirectoryIterator_VMS_INCLUDED
|
#endif // Foundation_DirectoryIterator_VMS_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DirectoryIterator_WIN32.h
|
// DirectoryIterator_WIN32.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DirectoryIterator_WIN32.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DirectoryIterator_WIN32.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Filesystem
|
// Package: Filesystem
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_DirectoryIterator_WIN32_INCLUDED
|
#define Foundation_DirectoryIterator_WIN32_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_WINDOWS_INCLUDED
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define STD_WINDOWS_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DirectoryIteratorImpl
|
class Foundation_API DirectoryIteratorImpl
|
||||||
@ -94,7 +89,7 @@ inline void DirectoryIteratorImpl::release()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DirectoryIterator_WIN32_INCLUDED
|
#endif // Foundation_DirectoryIterator_WIN32_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DirectoryIterator_WIN32U.h
|
// DirectoryIterator_WIN32U.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DirectoryIterator_WIN32U.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DirectoryIterator_WIN32U.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Filesystem
|
// Package: Filesystem
|
||||||
@ -40,16 +40,11 @@
|
|||||||
#define Foundation_DirectoryIterator_WIN32U_INCLUDED
|
#define Foundation_DirectoryIterator_WIN32U_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_WINDOWS_INCLUDED
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#define STD_WINDOWS_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API DirectoryIteratorImpl
|
class Foundation_API DirectoryIteratorImpl
|
||||||
@ -94,7 +89,7 @@ inline void DirectoryIteratorImpl::release()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DirectoryIterator_WIN32U_INCLUDED
|
#endif // Foundation_DirectoryIterator_WIN32U_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// DynamicFactory.h
|
// DynamicFactory.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/DynamicFactory.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/DynamicFactory.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,29 +40,15 @@
|
|||||||
#define Foundation_DynamicFactory_INCLUDED
|
#define Foundation_DynamicFactory_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Instantiator.h"
|
||||||
#endif
|
#include "Poco/Exception.h"
|
||||||
#ifndef Foundation_Instantiator_INCLUDED
|
#include "Poco/Mutex.h"
|
||||||
#include "Foundation/Instantiator.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Exception_INCLUDED
|
|
||||||
#include "Foundation/Exception.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_MAP_INCLUDED
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#define STD_MAP_INCLUDED
|
|
||||||
#endif
|
|
||||||
#ifndef STD_MEMORY_INCLUDED
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#define STD_MEMORY_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
template <class Base>
|
template <class Base>
|
||||||
@ -166,7 +152,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_DynamicFactory_INCLUDED
|
#endif // Foundation_DynamicFactory_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Environment.h
|
// Environment.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Environment.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Environment.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_Environment_INCLUDED
|
#define Foundation_Environment_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API Environment
|
class Foundation_API Environment
|
||||||
@ -80,7 +78,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Environment_INCLUDED
|
#endif // Foundation_Environment_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Environment_UNIX.h
|
// Environment_UNIX.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Environment_UNIX.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Environment_UNIX.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,19 +40,12 @@
|
|||||||
#define Foundation_Environment_UNIX_INCLUDED
|
#define Foundation_Environment_UNIX_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Mutex.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
#ifndef STD_MAP_INCLUDED
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#define STD_MAP_INCLUDED
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API EnvironmentImpl
|
class Foundation_API EnvironmentImpl
|
||||||
@ -74,7 +67,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Environment_UNIX_INCLUDED
|
#endif // Foundation_Environment_UNIX_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Environment_VMS.h
|
// Environment_VMS.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Environment_VMS.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Environment_VMS.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,15 +40,11 @@
|
|||||||
#define Foundation_Environment_VMS_INCLUDED
|
#define Foundation_Environment_VMS_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Mutex.h"
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API EnvironmentImpl
|
class Foundation_API EnvironmentImpl
|
||||||
@ -72,7 +68,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Environment_VMS_INCLUDED
|
#endif // Foundation_Environment_VMS_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Environment_WIN32.h
|
// Environment_WIN32.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Environment_WIN32.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Environment_WIN32.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_Environment_WIN32_INCLUDED
|
#define Foundation_Environment_WIN32_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API EnvironmentImpl
|
class Foundation_API EnvironmentImpl
|
||||||
@ -61,7 +59,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Environment_WIN32_INCLUDED
|
#endif // Foundation_Environment_WIN32_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// Environment_WIN32U.h
|
// Environment_WIN32U.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/Environment_WIN32U.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/Environment_WIN32U.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Core
|
// Package: Core
|
||||||
@ -40,12 +40,10 @@
|
|||||||
#define Foundation_Environment_WIN32U_INCLUDED
|
#define Foundation_Environment_WIN32U_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API EnvironmentImpl
|
class Foundation_API EnvironmentImpl
|
||||||
@ -61,7 +59,7 @@ public:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_Environment_WIN32U_INCLUDED
|
#endif // Foundation_Environment_WIN32U_INCLUDED
|
@ -1,7 +1,7 @@
|
|||||||
//
|
//
|
||||||
// ErrorHandler.h
|
// ErrorHandler.h
|
||||||
//
|
//
|
||||||
// $Id: //poco/1.1.0/Foundation/include/Foundation/ErrorHandler.h#2 $
|
// $Id: //poco/1.2/Foundation/include/Poco/ErrorHandler.h#1 $
|
||||||
//
|
//
|
||||||
// Library: Foundation
|
// Library: Foundation
|
||||||
// Package: Threading
|
// Package: Threading
|
||||||
@ -40,18 +40,12 @@
|
|||||||
#define Foundation_ErrorHandler_INCLUDED
|
#define Foundation_ErrorHandler_INCLUDED
|
||||||
|
|
||||||
|
|
||||||
#ifndef Foundation_Foundation_INCLUDED
|
#include "Poco/Foundation.h"
|
||||||
#include "Foundation/Foundation.h"
|
#include "Poco/Exception.h"
|
||||||
#endif
|
#include "Poco/Mutex.h"
|
||||||
#ifndef Foundation_Exception_INCLUDED
|
|
||||||
#include "Foundation/Exception.h"
|
|
||||||
#endif
|
|
||||||
#ifndef Foundation_Mutex_INCLUDED
|
|
||||||
#include "Foundation/Mutex.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
Foundation_BEGIN
|
namespace Poco {
|
||||||
|
|
||||||
|
|
||||||
class Foundation_API ErrorHandler
|
class Foundation_API ErrorHandler
|
||||||
@ -78,7 +72,7 @@ public:
|
|||||||
/// Destroys the ErrorHandler.
|
/// Destroys the ErrorHandler.
|
||||||
|
|
||||||
virtual void exception(const Exception& exc);
|
virtual void exception(const Exception& exc);
|
||||||
/// Called when a Foundation::Exception (or a subclass)
|
/// Called when a Poco::Exception (or a subclass)
|
||||||
/// caused the thread to terminate.
|
/// caused the thread to terminate.
|
||||||
///
|
///
|
||||||
/// This method should not throw any exception - it would
|
/// This method should not throw any exception - it would
|
||||||
@ -97,7 +91,7 @@ public:
|
|||||||
|
|
||||||
virtual void exception();
|
virtual void exception();
|
||||||
/// Called when an exception that is neither a
|
/// Called when an exception that is neither a
|
||||||
/// Foundation::Exception nor a std::exception caused
|
/// Poco::Exception nor a std::exception caused
|
||||||
/// the thread to terminate.
|
/// the thread to terminate.
|
||||||
///
|
///
|
||||||
/// This method should not throw any exception - it would
|
/// This method should not throw any exception - it would
|
||||||
@ -142,7 +136,7 @@ inline ErrorHandler* ErrorHandler::get()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Foundation_END
|
} // namespace Poco
|
||||||
|
|
||||||
|
|
||||||
#endif // Foundation_ErrorHandler_INCLUDED
|
#endif // Foundation_ErrorHandler_INCLUDED
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user