1
0
mirror of https://github.com/VCMP-SqMod/SqMod.git synced 2025-06-19 16:47:14 +02:00

Major plugin refactor and cleanup.

Switched to POCO library for unified platform/library interface.
Deprecated the external module API. It was creating more problems than solving.
Removed most built-in libraries in favor of system libraries for easier maintenance.
Cleaned and secured code with help from static analyzers.
This commit is contained in:
Sandu Liviu Catalin
2021-01-30 08:51:39 +02:00
parent e0e34b4030
commit 4a6bfc086c
6219 changed files with 1209835 additions and 454916 deletions
CMakeLists.txt
cmake
module
Base
CMakeLists.txtCore.cppCore.hpp
Core
Entity
Library
Logger.cppLogger.hppMain.cpp
Misc
Register.cppSqBase.hpp
Sqrat
VCMP
Vendor
AES256
B64
CMakeLists.txt
CPR
CURL
CHANGES
CMake
CMakeLists.txtCOPYINGGIT-INFOMacOSX-FrameworkMakefile.amMakefile.distREADMEREADME.mdRELEASE-NOTESSECURITY.mdacinclude.m4appveyor.ymlbuildconfbuildconf.batconfigure.accurl-config.in
include
lib
CMakeLists.txtMakefile.amMakefile.incMakefile.m32Makefile.netwareMakefile.vxworksaltsvc.caltsvc.hamigaos.camigaos.harpa_telnet.hasyn-ares.casyn-thread.casyn.hbase64.cc-hyper.cc-hyper.hchecksrc.plconfig-amigaos.hconfig-dos.hconfig-mac.hconfig-os400.hconfig-plan9.hconfig-riscos.hconfig-tpf.hconfig-vxworks.hconfig-win32.hconfig-win32ce.hconncache.cconncache.hconnect.cconnect.hcontent_encoding.ccontent_encoding.hcookie.ccookie.hcurl_addrinfo.ccurl_addrinfo.hcurl_base64.hcurl_config.h.cmakecurl_ctype.ccurl_ctype.hcurl_des.ccurl_des.hcurl_endian.ccurl_endian.hcurl_fnmatch.ccurl_fnmatch.hcurl_get_line.ccurl_get_line.hcurl_gethostname.ccurl_gethostname.hcurl_gssapi.ccurl_gssapi.hcurl_hmac.hcurl_krb5.hcurl_ldap.hcurl_md4.hcurl_md5.hcurl_memory.hcurl_memrchr.ccurl_memrchr.hcurl_multibyte.ccurl_multibyte.hcurl_ntlm_core.ccurl_ntlm_core.hcurl_ntlm_wb.ccurl_ntlm_wb.hcurl_path.ccurl_path.hcurl_printf.hcurl_range.ccurl_range.hcurl_rtmp.ccurl_rtmp.hcurl_sasl.ccurl_sasl.hcurl_setup.hcurl_setup_once.hcurl_sha256.hcurl_sspi.ccurl_sspi.hcurl_threads.ccurl_threads.hcurlx.hdict.cdict.hdoh.cdoh.hdotdot.cdotdot.hdynbuf.cdynbuf.heasy.ceasygetopt.ceasyif.heasyoptions.ceasyoptions.hescape.cescape.hfile.cfile.hfileinfo.cfileinfo.hfirefox-db2pem.shformdata.cformdata.hftp.cftp.hftplistparser.cftplistparser.hgetenv.cgetinfo.cgetinfo.hgopher.cgopher.hhash.chash.hhmac.chostasyn.chostcheck.chostcheck.hhostip.chostip.hhostip4.chostip6.chostsyn.chsts.chsts.hhttp.chttp.hhttp2.chttp2.hhttp_aws_sigv4.chttp_aws_sigv4.hhttp_chunks.chttp_chunks.hhttp_digest.chttp_digest.hhttp_negotiate.chttp_negotiate.hhttp_ntlm.chttp_ntlm.hhttp_proxy.chttp_proxy.hidn_win32.cif2ip.cif2ip.himap.cimap.hinet_ntop.cinet_ntop.hinet_pton.cinet_pton.hkrb5.cldap.clibcurl.plistlibcurl.rclibcurl.vers.inllist.cllist.hmakefile.amigamakefile.djmd4.cmd5.cmemdebug.cmemdebug.hmime.cmime.hmk-ca-bundle.plmk-ca-bundle.vbsmprintf.cmqtt.cmqtt.hmulti.cmultihandle.hmultiif.hnetrc.cnetrc.hnon-ascii.cnon-ascii.hnonblock.cnonblock.hnwlib.cnwos.copenldap.coptiontable.plparsedate.cparsedate.hpingpong.cpingpong.hpop3.cpop3.hprogress.cprogress.hpsl.cpsl.hquic.hrand.crand.hrename.crename.hrtsp.crtsp.hselect.cselect.hsendf.csendf.hsetopt.csetopt.hsetup-os400.hsetup-vms.hsetup-win32.hsha256.cshare.cshare.hsigpipe.hslist.cslist.hsmb.csmb.hsmtp.csmtp.hsockaddr.hsocketpair.csocketpair.hsocks.csocks.hsocks_gssapi.csocks_sspi.cspeedcheck.cspeedcheck.hsplay.csplay.hstrcase.cstrcase.hstrdup.cstrdup.hstrerror.cstrerror.hstrtok.cstrtok.hstrtoofft.cstrtoofft.hsystem_win32.csystem_win32.htelnet.ctelnet.htftp.ctftp.htimeval.ctimeval.htransfer.ctransfer.hurl.curl.hurlapi-int.hurlapi.curldata.h
vauth
version.cversion_win32.cversion_win32.h
vquic
vssh
vtls
warnless.cwarnless.hwildcard.cwildcard.hx509asn1.cx509asn1.h
libcurl.pc.in
m4
maketgz
packages
plan9
scripts
src
winbuild
CivetWeb
ConcurrentQueue
Hash
MDBC
CMakeLists.txtCOPYING.LIBREADME
cmake
examples
include
libmariadb
mariadb_config
plugins
win-iconv
win
MaxmindDB
PUGIXML
SQLite
SimpleIni
SimpleSocket
TinyDir
Whirlpool
ZLib
CMakeLists.txtChangeLogFAQINDEXMakefileMakefile.inREADMEadler32.c
amiga
configure
contrib
README.contrib
ada
amd64
asm686
blast
delphi
dotzlib
gcc_gvmat64
infback9
inflate86
iostream
iostream2
iostream3
masmx64
masmx86
minizip
pascal
puff
testzlib
untgz
vstudio
crc32.c
doc
examples
gzclose.cgzlib.cgzread.cgzwrite.cmake_vms.com
msdos
nintendods
old
os400
qnx
test
treebuild.xmluncompr.c
watcom
win32
zconf.h.cmakeinzconf.h.inzconf.h.includedzlib.3zlib.3.pdfzlib.mapzlib.pc.cmakeinzlib.pc.inzlib2ansizutil.czutil.h
sdk
vendor
CMakeLists.txt
CPR
ConcurrentQueue
Fmt
POCO
ApacheConnector
CHANGELOGCMakeLists.txtCODE_OF_CONDUCT.mdCONTRIBUTING.mdCONTRIBUTORS
CppParser
CppUnit
Crypto
CMakeLists.txtCrypto.progenCrypto_VS90.slnCrypto_VS90.vcprojCrypto_vs140.slnCrypto_vs140.vcxprojCrypto_vs140.vcxproj.filtersCrypto_vs150.slnCrypto_vs150.vcxprojCrypto_vs150.vcxproj.filtersCrypto_vs160.slnCrypto_vs160.vcxprojCrypto_vs160.vcxproj.filtersMakefile
cmake
dependencies
include
samples
src
testsuite
Data
CMakeLists.txtData.progenData_VS90.slnData_VS90.vcprojData_vs140.slnData_vs140.vcxprojData_vs140.vcxproj.filtersData_vs150.slnData_vs150.vcxprojData_vs150.vcxproj.filtersData_vs160.slnData_vs160.vcxprojData_vs160.vcxproj.filtersMakefile
MySQL
ODBC
PostgreSQL
SQLite
cmake
dependencies
doc
include
samples
Binding
CMakeLists.txtMakefile
RecordSet
RowFormatter
Tuple
TypeHandler
WebNotifier
dependenciessamples.progensamples_vs140.slnsamples_vs150.slnsamples_vs160.slnsamples_vs90.sln
src
testsuite
Encodings
CMakeLists.txt
Compiler
Encodings.progenEncodings_vs140.slnEncodings_vs140.vcxprojEncodings_vs140.vcxproj.filtersEncodings_vs150.slnEncodings_vs150.vcxprojEncodings_vs150.vcxproj.filtersEncodings_vs160.slnEncodings_vs160.vcxprojEncodings_vs160.vcxproj.filtersEncodings_vs90.slnEncodings_vs90.vcprojMakefile
cmake
dependenciesgenerateEncodings.sh
include
samples
src
testsuite
Foundation
CMakeLists.txtFoundation_vs140.slnFoundation_vs140.vcxprojFoundation_vs140.vcxproj.filtersFoundation_vs150.slnFoundation_vs150.vcxprojFoundation_vs150.vcxproj.filtersFoundation_vs160.slnFoundation_vs160.vcxprojFoundation_vs160.vcxproj.filtersMakefile
cmake
extradirs
include
Poco
ASCIIEncoding.hAbstractCache.hAbstractDelegate.hAbstractEvent.hAbstractObserver.hAbstractPriorityDelegate.hAbstractStrategy.hAccessExpirationDecorator.hAccessExpireCache.hAccessExpireLRUCache.hAccessExpireStrategy.hActiveDispatcher.hActiveMethod.hActiveResult.hActiveRunnable.hActiveStarter.hActivity.hAlignment.hAny.hArchiveStrategy.hArray.hAscii.hAsyncChannel.hAtomicCounter.hAtomicFlag.hAutoPtr.hAutoReleasePool.hBase32Decoder.hBase32Encoder.hBase64Decoder.hBase64Encoder.hBasicEvent.hBinaryReader.hBinaryWriter.hBuffer.hBufferAllocator.hBufferedBidirectionalStreamBuf.hBufferedStreamBuf.hBugcheck.hByteOrder.hChannel.hChecksum.hClassLibrary.hClassLoader.hClock.hCondition.hConfig.hConfigurable.hConsoleChannel.hCountingStream.hDataURIStream.hDataURIStreamFactory.hDateTime.hDateTimeFormat.hDateTimeFormatter.hDateTimeParser.hDebugger.hDefaultStrategy.hDeflatingStream.hDelegate.hDigestEngine.hDigestStream.hDirectoryIterator.hDirectoryIteratorStrategy.hDirectoryIterator_UNIX.hDirectoryIterator_WIN32U.hDirectoryWatcher.h
Dynamic
DynamicAny.hDynamicAnyHolder.hDynamicFactory.hDynamicStruct.hEnvironment.hEnvironment_UNIX.hEnvironment_VX.hEnvironment_WIN32U.hEnvironment_WINCE.hError.hErrorHandler.hEvent.hEventArgs.hEventChannel.hEventLogChannel.hEvent_POSIX.hEvent_VX.hEvent_WIN32.hException.hExpirationDecorator.hExpire.hExpireCache.hExpireLRUCache.hExpireStrategy.hFIFOBuffer.hFIFOBufferStream.hFIFOEvent.hFIFOStrategy.hFPEnvironment.hFPEnvironment_C99.hFPEnvironment_DEC.hFPEnvironment_DUMMY.hFPEnvironment_QNX.hFPEnvironment_SUN.hFPEnvironment_WIN32.hFile.hFileChannel.hFileStream.hFileStreamFactory.hFileStream_POSIX.hFileStream_WIN32.hFile_UNIX.hFile_VX.hFile_WIN32U.hFile_WINCE.hFormat.hFormatter.hFormattingChannel.hFoundation.hFunctionDelegate.hFunctionPriorityDelegate.hGlob.hHMACEngine.hHash.hHashFunction.hHashMap.hHashSet.hHashStatistic.hHashTable.hHexBinaryDecoder.hHexBinaryEncoder.hInflatingStream.hInstantiator.hJSONString.hKeyValueArgs.hLRUCache.hLRUStrategy.hLatin1Encoding.hLatin2Encoding.hLatin9Encoding.hLineEndingConverter.hLinearHashTable.hListMap.hLocalDateTime.hLogFile.hLogFile_STD.hLogFile_WIN32U.hLogStream.hLogger.hLoggingFactory.hLoggingRegistry.hMD4Engine.hMD5Engine.hManifest.hMemoryPool.hMemoryStream.hMessage.hMetaObject.hMetaProgramming.hMutex.hMutex_POSIX.hMutex_VX.hMutex_WIN32.hMutex_WINCE.hNObserver.hNamedEvent.hNamedEvent_Android.hNamedEvent_UNIX.hNamedEvent_WIN32U.hNamedMutex.hNamedMutex_Android.hNamedMutex_UNIX.hNamedMutex_WIN32U.hNamedTuple.hNestedDiagnosticContext.hNotification.hNotificationCenter.hNotificationQueue.hNotificationStrategy.hNullChannel.hNullStream.hNullable.hNumberFormatter.hNumberParser.hNumericString.hObjectPool.hObserver.hOptional.hOrderedMap.hOrderedSet.hPBKDF2Engine.hPath.hPath_UNIX.hPath_WIN32U.hPath_WINCE.hPatternFormatter.hPipe.hPipeImpl.hPipeImpl_DUMMY.hPipeImpl_POSIX.hPipeImpl_WIN32.hPipeStream.hPlatform.hPlatform_POSIX.hPlatform_VX.hPlatform_WIN32.hPoco.hPriorityDelegate.hPriorityEvent.hPriorityExpire.hPriorityNotificationQueue.hPriorityStrategy.hProcess.hProcess_UNIX.hProcess_VX.hProcess_WIN32U.hProcess_WINCE.hPurgeStrategy.hRWLock.hRWLock_Android.hRWLock_POSIX.hRWLock_VX.hRWLock_WIN32.hRWLock_WINCE.hRandom.hRandomStream.hRecursiveDirectoryIterator.hRecursiveDirectoryIteratorImpl.hRefCountedObject.hRegularExpression.hRotateStrategy.hRunnable.hRunnableAdapter.hSHA1Engine.hSHA2Engine.hScopedLock.hScopedUnlock.hSemaphore.hSemaphore_POSIX.hSemaphore_VX.hSemaphore_WIN32.hSharedLibrary.hSharedLibrary_HPUX.hSharedLibrary_UNIX.hSharedLibrary_VX.hSharedLibrary_WIN32U.hSharedMemory.hSharedMemory_DUMMY.hSharedMemory_POSIX.hSharedMemory_WIN32.hSharedPtr.hSignalHandler.hSimpleFileChannel.hSimpleHashTable.hSingletonHolder.hSortedDirectoryIterator.hSplitterChannel.hStopwatch.hStrategyCollection.hStreamChannel.hStreamConverter.hStreamCopier.hStreamTokenizer.hStreamUtil.hString.hStringTokenizer.hSynchronizedObject.hSyslogChannel.hTask.hTaskManager.hTaskNotification.hTeeStream.hTemporaryFile.hTextBufferIterator.hTextConverter.hTextEncoding.hTextIterator.hThread.hThreadLocal.hThreadPool.hThreadTarget.hThread_POSIX.hThread_VX.hThread_WIN32.hThread_WINCE.hTimedNotificationQueue.hTimer.hTimespan.hTimestamp.hTimezone.hToken.hTuple.hTypeList.hTypes.hURI.hURIStreamFactory.hURIStreamOpener.hUTF16Encoding.hUTF32Encoding.hUTF8Encoding.hUTF8String.hUTFString.hUUID.hUUIDGenerator.hUnWindows.hUnbufferedStreamBuf.hUnicode.hUnicodeConverter.hUniqueAccessExpireCache.hUniqueAccessExpireLRUCache.hUniqueAccessExpireStrategy.hUniqueExpireCache.hUniqueExpireLRUCache.hUniqueExpireStrategy.hValidArgs.hVersion.hVoid.hWindows1250Encoding.hWindows1251Encoding.hWindows1252Encoding.hWindowsConsoleChannel.hordered_hash.hordered_map.hordered_set.hzconf.hzlib.h
samples
ActiveMethod
Activity
BinaryReaderWriter
CMakeLists.txt
DateTime
LineEndingConverter
LogRotation
Logger
Makefile
NotificationQueue
StringTokenizer
Timer
URI
base64decode
base64encode
deflate
dir
grep
hmacmd5
inflate
md5
samples.progensamples_vs140.slnsamples_vs150.slnsamples_vs160.slnsamples_vs90.sln
uuidgen
src
ASCIIEncoding.cppAbstractObserver.cppActiveDispatcher.cppArchiveStrategy.cppAscii.cppAsyncChannel.cppAtomicCounter.cppAtomicFlag.cppBase32Decoder.cppBase32Encoder.cppBase64Decoder.cppBase64Encoder.cppBinaryReader.cppBinaryWriter.cppBugcheck.cppByteOrder.cppChannel.cppChecksum.cppClock.cppCondition.cppConfigurable.cppConsoleChannel.cppCountingStream.cppDataURIStream.cppDataURIStreamFactory.cppDateTime.cppDateTimeFormat.cppDateTimeFormatter.cppDateTimeParser.cppDebugger.cppDeflatingStream.cppDigestEngine.cppDigestStream.cppDirectoryIterator.cppDirectoryIteratorStrategy.cppDirectoryIterator_UNIX.cppDirectoryIterator_WIN32U.cppDirectoryWatcher.cppEnvironment.cppEnvironment_UNIX.cppEnvironment_VX.cppEnvironment_WIN32U.cppEnvironment_WINCE.cppError.cppErrorHandler.cppEvent.cppEventArgs.cppEventChannel.cppEventLogChannel.cppEvent_POSIX.cppEvent_VX.cppEvent_WIN32.cppException.cppFIFOBufferStream.cppFPEnvironment.cppFPEnvironment_C99.cppFPEnvironment_DEC.cppFPEnvironment_DUMMY.cppFPEnvironment_QNX.cppFPEnvironment_SUN.cppFPEnvironment_WIN32.cppFile.cppFileChannel.cppFileStream.cppFileStreamFactory.cppFileStream_POSIX.cppFileStream_WIN32.cppFile_UNIX.cppFile_VX.cppFile_WIN32U.cppFile_WINCE.cppFormat.cppFormatter.cppFormattingChannel.cppGlob.cppHash.cppHashStatistic.cppHexBinaryDecoder.cppHexBinaryEncoder.cppInflatingStream.cppJSONString.cppLatin1Encoding.cppLatin2Encoding.cppLatin9Encoding.cppLineEndingConverter.cppLocalDateTime.cppLogFile.cppLogFile_STD.cppLogFile_WIN32U.cppLogStream.cppLogger.cppLoggingFactory.cppLoggingRegistry.cppMD4Engine.cppMD5Engine.cppMSG00001.binManifest.cppMemoryPool.cppMemoryStream.cppMessage.cppMutex.cppMutex_POSIX.cppMutex_VX.cppMutex_WIN32.cppMutex_WINCE.cppNamedEvent.cppNamedEvent_Android.cppNamedEvent_UNIX.cppNamedEvent_WIN32U.cppNamedMutex.cppNamedMutex_Android.cppNamedMutex_UNIX.cppNamedMutex_WIN32U.cppNestedDiagnosticContext.cppNotification.cppNotificationCenter.cppNotificationQueue.cppNullChannel.cppNullStream.cppNumberFormatter.cppNumberParser.cppNumericString.cppPath.cppPath_UNIX.cppPath_WIN32U.cppPath_WINCE.cppPatternFormatter.cppPipe.cppPipeImpl.cppPipeImpl_DUMMY.cppPipeImpl_POSIX.cppPipeImpl_WIN32.cppPipeStream.cppPriorityNotificationQueue.cppProcess.cppProcess_UNIX.cppProcess_VX.cppProcess_WIN32U.cppProcess_WINCE.cppPurgeStrategy.cppRWLock.cppRWLock_Android.cppRWLock_POSIX.cppRWLock_VX.cppRWLock_WIN32.cppRWLock_WINCE.cppRandom.cppRandomStream.cppRefCountedObject.cppRegularExpression.cppRotateStrategy.cppRunnable.cppSHA1Engine.cppSHA2Engine.cppSemaphore.cppSemaphore_POSIX.cppSemaphore_VX.cppSemaphore_WIN32.cppSharedLibrary.cppSharedLibrary_HPUX.cppSharedLibrary_UNIX.cppSharedLibrary_VX.cppSharedLibrary_WIN32U.cppSharedMemory.cppSharedMemory_DUMMY.cppSharedMemory_POSIX.cppSharedMemory_WIN32.cppSignalHandler.cppSimpleFileChannel.cppSortedDirectoryIterator.cppSplitterChannel.cppStopwatch.cppStreamChannel.cppStreamConverter.cppStreamCopier.cppStreamTokenizer.cppString.cppStringTokenizer.cppSynchronizedObject.cppSyslogChannel.cppTask.cppTaskManager.cppTaskNotification.cppTeeStream.cppTemporaryFile.cppTextBufferIterator.cppTextConverter.cppTextEncoding.cppTextIterator.cppThread.cppThreadLocal.cppThreadPool.cppThreadTarget.cppThread_POSIX.cppThread_VX.cppThread_WIN32.cppThread_WINCE.cppTimedNotificationQueue.cppTimer.cppTimespan.cppTimestamp.cppTimezone.cppTimezone_UNIX.cppTimezone_VX.cppTimezone_WIN32.cppTimezone_WINCE.cppToken.cppURI.cppURIStreamFactory.cppURIStreamOpener.cppUTF16Encoding.cppUTF32Encoding.cppUTF8Encoding.cppUTF8String.cppUUID.cppUUIDGenerator.cppUnicode.cppUnicodeConverter.cppVar.cppVarHolder.cppVarIterator.cppVoid.cppWindows1250Encoding.cppWindows1251Encoding.cppWindows1252Encoding.cppWindowsConsoleChannel.cppadler32.cbignum-dtoa.ccbignum-dtoa.hbignum.ccbignum.hcached-powers.cccached-powers.hcompress.ccrc32.ccrc32.hdeflate.cdeflate.hdiy-fp.ccdiy-fp.hdouble-conversion.ccdouble-conversion.hfast-dtoa.ccfast-dtoa.hfixed-dtoa.ccfixed-dtoa.hgzguts.hieee.hinfback.cinffast.cinffast.hinffixed.hinflate.cinflate.hinftrees.cinftrees.hpcre.hpcre_byte_order.cpcre_chartables.cpcre_compile.cpcre_config.cpcre_config.hpcre_dfa_exec.cpcre_exec.cpcre_fullinfo.cpcre_get.cpcre_globals.cpcre_internal.hpcre_jit_compile.cpcre_maketables.cpcre_newline.cpcre_ord2utf8.cpcre_refcount.cpcre_string_utils.cpcre_study.cpcre_tables.cpcre_ucd.cpcre_valid_utf8.cpcre_version.cpcre_xclass.cpocomsg.mcstrtod.ccstrtod.htrees.ctrees.hucp.hutils.hzconf.hzlib.hzutil.czutil.h
testsuite
CMakeLists.txtMakefileMakefile-DriverMakefile-TestAppMakefile-TestLibraryTestApp_vs140.vcxprojTestApp_vs140.vcxproj.filtersTestApp_vs150.vcxprojTestApp_vs150.vcxproj.filtersTestApp_vs160.vcxprojTestApp_vs160.vcxproj.filtersTestLibrary_vs140.vcxprojTestLibrary_vs140.vcxproj.filtersTestLibrary_vs150.vcxprojTestLibrary_vs150.vcxproj.filtersTestLibrary_vs160.vcxprojTestLibrary_vs160.vcxproj.filtersTestSuite_vs140.vcxprojTestSuite_vs140.vcxproj.filtersTestSuite_vs150.vcxprojTestSuite_vs150.vcxproj.filtersTestSuite_vs160.vcxprojTestSuite_vs160.vcxproj.filtersnonexistent.txt
src
ActiveDispatcherTest.cppActiveDispatcherTest.hActiveMethodTest.cppActiveMethodTest.hActivityTest.cppActivityTest.hAnyTest.cppAnyTest.hArrayTest.cppArrayTest.hAutoPtrTest.cppAutoPtrTest.hAutoReleasePoolTest.cppAutoReleasePoolTest.hBase32Test.cppBase32Test.hBase64Test.cppBase64Test.hBasicEventTest.cppBasicEventTest.hBinaryReaderWriterTest.cppBinaryReaderWriterTest.hByteOrderTest.cppByteOrderTest.hCacheTestSuite.cppCacheTestSuite.hChannelTest.cppChannelTest.hClassLoaderTest.cppClassLoaderTest.hClockTest.cppClockTest.hConditionTest.cppConditionTest.hCoreTest.cppCoreTest.hCoreTestSuite.cppCoreTestSuite.hCountingStreamTest.cppCountingStreamTest.hCryptTestSuite.cppCryptTestSuite.hDataURIStreamTest.cppDataURIStreamTest.hDateTimeFormatterTest.cppDateTimeFormatterTest.hDateTimeParserTest.cppDateTimeParserTest.hDateTimeTest.cppDateTimeTest.hDateTimeTestSuite.cppDateTimeTestSuite.hDigestStreamTest.cppDigestStreamTest.hDirectoryIteratorsTest.cppDirectoryIteratorsTest.hDirectoryWatcherTest.cppDirectoryWatcherTest.hDriver.cppDummyDelegate.cppDummyDelegate.hDynamicFactoryTest.cppDynamicFactoryTest.hDynamicTestSuite.cppDynamicTestSuite.hEventTestSuite.cppEventTestSuite.hExpireCacheTest.cppExpireCacheTest.hExpireLRUCacheTest.cppExpireLRUCacheTest.hFIFOBufferStreamTest.cppFIFOBufferStreamTest.hFIFOEventTest.cppFIFOEventTest.hFPETest.cppFPETest.hFileChannelTest.cppFileChannelTest.hFileStreamTest.cppFileStreamTest.hFileTest.cppFileTest.hFilesystemTestSuite.cppFilesystemTestSuite.hFormatTest.cppFormatTest.hFoundationTestSuite.cppFoundationTestSuite.hGlobTest.cppGlobTest.hHMACEngineTest.cppHMACEngineTest.hHashMapTest.cppHashMapTest.hHashSetTest.cppHashSetTest.hHashTableTest.cppHashTableTest.hHashingTestSuite.cppHashingTestSuite.hHexBinaryTest.cppHexBinaryTest.hLRUCacheTest.cppLRUCacheTest.hLineEndingConverterTest.cppLineEndingConverterTest.hLinearHashTableTest.cppLinearHashTableTest.hListMapTest.cppListMapTest.hLocalDateTimeTest.cppLocalDateTimeTest.hLogStreamTest.cppLogStreamTest.hLoggerTest.cppLoggerTest.hLoggingFactoryTest.cppLoggingFactoryTest.hLoggingRegistryTest.cppLoggingRegistryTest.hLoggingTestSuite.cppLoggingTestSuite.hMD4EngineTest.cppMD4EngineTest.hMD5EngineTest.cppMD5EngineTest.hManifestTest.cppManifestTest.hMemoryPoolTest.cppMemoryPoolTest.hMemoryStreamTest.cppMemoryStreamTest.hNDCTest.cppNDCTest.hNamedEventTest.cppNamedEventTest.hNamedMutexTest.cppNamedMutexTest.hNamedTuplesTest.cppNamedTuplesTest.hNotificationCenterTest.cppNotificationCenterTest.hNotificationQueueTest.cppNotificationQueueTest.hNotificationsTestSuite.cppNotificationsTestSuite.hNullStreamTest.cppNullStreamTest.hNumberFormatterTest.cppNumberFormatterTest.hNumberParserTest.cppNumberParserTest.hObjectPoolTest.cppObjectPoolTest.hOrderedContainersTest.cppOrderedContainersTest.hPBKDF2EngineTest.cppPBKDF2EngineTest.hPathTest.cppPathTest.hPatternFormatterTest.cppPatternFormatterTest.hPriorityEventTest.cppPriorityEventTest.hPriorityNotificationQueueTest.cppPriorityNotificationQueueTest.hProcessTest.cppProcessTest.hProcessesTestSuite.cppProcessesTestSuite.hRWLockTest.cppRWLockTest.hRandomStreamTest.cppRandomStreamTest.hRandomTest.cppRandomTest.hRegularExpressionTest.cppRegularExpressionTest.hSHA1EngineTest.cppSHA1EngineTest.hSHA2EngineTest.cppSHA2EngineTest.hSemaphoreTest.cppSemaphoreTest.hSharedLibraryTest.cppSharedLibraryTest.hSharedLibraryTestSuite.cppSharedLibraryTestSuite.hSharedMemoryTest.cppSharedMemoryTest.hSharedPtrTest.cppSharedPtrTest.hSimpleFileChannelTest.cppSimpleFileChannelTest.hSimpleHashTableTest.cppSimpleHashTableTest.hStopwatchTest.cppStopwatchTest.hStreamConverterTest.cppStreamConverterTest.hStreamCopierTest.cppStreamCopierTest.hStreamTokenizerTest.cppStreamTokenizerTest.hStreamsTestSuite.cppStreamsTestSuite.hStringTest.cppStringTest.hStringTokenizerTest.cppStringTokenizerTest.hTaskManagerTest.cppTaskManagerTest.hTaskTest.cppTaskTest.hTaskTestSuite.cppTaskTestSuite.hTeeStreamTest.cppTeeStreamTest.hTestApp.cppTestApp_WINCE.cppTestChannel.cppTestChannel.hTestLibrary.cppTestPlugin.cppTestPlugin.hTextBufferIteratorTest.cppTextBufferIteratorTest.hTextConverterTest.cppTextConverterTest.hTextEncodingTest.cppTextEncodingTest.hTextIteratorTest.cppTextIteratorTest.hTextTestSuite.cppTextTestSuite.hThreadLocalTest.cppThreadLocalTest.hThreadPoolTest.cppThreadPoolTest.hThreadTest.cppThreadTest.hThreadingTestSuite.cppThreadingTestSuite.hTimedNotificationQueueTest.cppTimedNotificationQueueTest.hTimerTest.cppTimerTest.hTimespanTest.cppTimespanTest.hTimestampTest.cppTimestampTest.hTimezoneTest.cppTimezoneTest.hTuplesTest.cppTuplesTest.hTypeListTest.cppTypeListTest.hURIStreamOpenerTest.cppURIStreamOpenerTest.hURITest.cppURITest.hURITestSuite.cppURITestSuite.hUTF8StringTest.cppUTF8StringTest.hUUIDGeneratorTest.cppUUIDGeneratorTest.hUUIDTest.cppUUIDTest.hUUIDTestSuite.cppUUIDTestSuite.hUnicodeConverterTest.cppUnicodeConverterTest.hUniqueExpireCacheTest.cppUniqueExpireCacheTest.hUniqueExpireLRUCacheTest.cppUniqueExpireLRUCacheTest.hVarTest.cppVarTest.hWinCEDriver.cppWinDriver.cppZLibTest.cppZLibTest.hordered_map_util.h
testlibrary.opt
wcelibcex-1.0
JSON
CMakeLists.txtJSON.progenJSON_vs140.slnJSON_vs140.vcxprojJSON_vs140.vcxproj.filtersJSON_vs150.slnJSON_vs150.vcxprojJSON_vs150.vcxproj.filtersJSON_vs160.slnJSON_vs160.vcxprojJSON_vs160.vcxproj.filtersJSON_vs90.slnJSON_vs90.vcprojMakefile
cmake
dependencies
include
samples
src
testsuite
CMakeLists.txtMakefileTestSuite.progenTestSuite_vs140.vcxprojTestSuite_vs140.vcxproj.filtersTestSuite_vs150.vcxprojTestSuite_vs150.vcxproj.filtersTestSuite_vs160.vcxprojTestSuite_vs160.vcxproj.filtersTestSuite_vs90.vcproj
data
invalid-unicode
encoded-surrogate-half
invalid-utf-8-after-backslash
invalid-utf-8-in-array
invalid-utf-8-in-bigger-int
invalid-utf-8-in-escape
invalid-utf-8-in-exponent
invalid-utf-8-in-identifier
invalid-utf-8-in-int
invalid-utf-8-in-real-after-e
invalid-utf-8-in-string
lone-invalid-utf-8
lone-utf-8-continuation-byte
not-in-unicode-range
overlong-3-byte-encoding
overlong-4-byte-encoding
overlong-ascii-encoding
restricted-utf-8
truncated-utf-8
invalid
apostrophe
ascii-unicode-identifier
brace-comma
bracket-comma
bracket-one-comma
double-closing-brace
double-closing-bracket
empty
escaped-null-byte-in-string
extra-comma-in-array
extra-comma-in-multiline-array
garbage-after-newline
garbage-at-the-end
integer-starting-with-zero
invalid-escape
invalid-identifier
invalid-negative-integer
invalid-negative-real
invalid-second-surrogate
lone-open-brace
lone-open-bracket
lone-second-surrogate
minus-sign-without-number
negative-integer-starting-with-zero
null-byte-in-string
null-byte-outside-string
null
object-apostrophes
object-garbage-at-end
object-in-unterminated-array
object-no-colon
object-no-value
object-unterminated-value
real-garbage-after-e
real-negative-overflow
real-positive-overflow
real-truncated-at-e
real-truncated-at-point
tab-character-in-string
too-big-negative-integer
too-big-positive-integer
truncated-unicode-surrogate
unicode-identifier
unterminated-array-and-object
unterminated-array
unterminated-empty-key
unterminated-key
unterminated-object-and-array
unterminated-string
valid
complex-array
complex-object
empty-array
empty-object-in-array
empty-object
empty-string
escaped-utf-control-char
false
negative-int
negative-one
negative-zero
null
one-byte-utf-8
real-capital-e-negative-exponent
real-capital-e-positive-exponent
real-capital-e
real-exponent
real-fraction-exponent
real-negative-exponent
real-positive-exponent
real-underflow
short-string
simple-ascii-string
simple-int-0
simple-int-1
simple-int-123
simple-object
simple-real
string-escapes
three-byte-utf-8
true
two-byte-utf-8
utf-8-string
utf-surrogate-four-byte-encoding
src
JWT
LICENSEMakefile
MongoDB
CMakeLists.txtMakefileMongoDB.progenMongoDB_vs140.slnMongoDB_vs140.vcxprojMongoDB_vs140.vcxproj.filtersMongoDB_vs150.slnMongoDB_vs150.vcxprojMongoDB_vs150.vcxproj.filtersMongoDB_vs160.slnMongoDB_vs160.vcxprojMongoDB_vs160.vcxproj.filtersMongoDB_vs90.slnMongoDB_vs90.vcproj
cmake
dependencies
include
samples
src
testsuite
NEWS
Net
CMakeLists.txtMakefileNet.progenNet_vs140.slnNet_vs140.vcxprojNet_vs140.vcxproj.filtersNet_vs150.slnNet_vs150.vcxprojNet_vs150.vcxproj.filtersNet_vs160.slnNet_vs160.vcxprojNet_vs160.vcxproj.filtersNet_vs90.slnNet_vs90.vcproj
cmake
dependencies
include
Poco
Net
AbstractHTTPRequestHandler.hDNS.hDatagramSocket.hDatagramSocketImpl.hDialogSocket.hEscapeHTMLStream.hFTPClientSession.hFTPStreamFactory.hFilePartSource.hHTMLForm.hHTTPAuthenticationParams.hHTTPBasicCredentials.hHTTPBasicStreamBuf.hHTTPBufferAllocator.hHTTPChunkedStream.hHTTPClientSession.hHTTPCookie.hHTTPCredentials.hHTTPDigestCredentials.hHTTPFixedLengthStream.hHTTPHeaderStream.hHTTPIOStream.hHTTPMessage.hHTTPNTLMCredentials.hHTTPRequest.hHTTPRequestHandler.hHTTPRequestHandlerFactory.hHTTPResponse.hHTTPServer.hHTTPServerConnection.hHTTPServerConnectionFactory.hHTTPServerParams.hHTTPServerRequest.hHTTPServerRequestImpl.hHTTPServerResponse.hHTTPServerResponseImpl.hHTTPServerSession.hHTTPSession.hHTTPSessionFactory.hHTTPSessionInstantiator.hHTTPStream.hHTTPStreamFactory.hHostEntry.hICMPClient.hICMPEventArgs.hICMPPacket.hICMPPacketImpl.hICMPSocket.hICMPSocketImpl.hICMPv4PacketImpl.hIPAddress.hIPAddressImpl.hMailMessage.hMailRecipient.hMailStream.hMediaType.hMessageHeader.hMultiSocketPoller.hMulticastSocket.hMultipartReader.hMultipartWriter.hNTLMCredentials.hNTPClient.hNTPEventArgs.hNTPPacket.hNameValueCollection.hNet.hNetException.hNetworkInterface.hNullPartHandler.hOAuth10Credentials.hOAuth20Credentials.hPOP3ClientSession.hParallelSocketAcceptor.hParallelSocketReactor.hPartHandler.hPartSource.hPartStore.hPollSet.hQuotedPrintableDecoder.hQuotedPrintableEncoder.hRawSocket.hRawSocketImpl.hRemoteSyslogChannel.hRemoteSyslogListener.hSMTPChannel.hSMTPClientSession.hSSPINTLMCredentials.hServerSocket.hServerSocketImpl.hSingleSocketPoller.hSocket.hSocketAcceptor.hSocketAddress.hSocketAddressImpl.hSocketConnector.hSocketDefs.hSocketImpl.hSocketNotification.hSocketNotifier.hSocketReactor.hSocketStream.hStreamSocket.hStreamSocketImpl.hStringPartSource.hTCPServer.hTCPServerConnection.hTCPServerConnectionFactory.hTCPServerDispatcher.hTCPServerParams.hUDPClient.hUDPHandler.hUDPServer.hUDPServerParams.hUDPSocketReader.hWebSocket.hWebSocketImpl.h
samples
CMakeLists.txt
EchoServer
HTTPFormServer
HTTPLoadTest
HTTPTimeServer
Mail
Makefile
Ping
SMTPLogger
TimeServer
WebSocketServer
dependencies
dict
download
httpget
ifconfig
samples.progensamples_vs140.slnsamples_vs150.slnsamples_vs160.slnsamples_vs90.sln
tcpserver
src
AbstractHTTPRequestHandler.cppDNS.cppDatagramSocket.cppDatagramSocketImpl.cppDialogSocket.cppEscapeHTMLStream.cppFTPClientSession.cppFTPStreamFactory.cppFilePartSource.cppHTMLForm.cppHTTPAuthenticationParams.cppHTTPBasicCredentials.cppHTTPBufferAllocator.cppHTTPChunkedStream.cppHTTPClientSession.cppHTTPCookie.cppHTTPCredentials.cppHTTPDigestCredentials.cppHTTPFixedLengthStream.cppHTTPHeaderStream.cppHTTPIOStream.cppHTTPMessage.cppHTTPNTLMCredentials.cppHTTPRequest.cppHTTPRequestHandler.cppHTTPRequestHandlerFactory.cppHTTPResponse.cppHTTPServer.cppHTTPServerConnection.cppHTTPServerConnectionFactory.cppHTTPServerParams.cppHTTPServerRequest.cppHTTPServerRequestImpl.cppHTTPServerResponse.cppHTTPServerResponseImpl.cppHTTPServerSession.cppHTTPSession.cppHTTPSessionFactory.cppHTTPSessionInstantiator.cppHTTPStream.cppHTTPStreamFactory.cppHostEntry.cppICMPClient.cppICMPEventArgs.cppICMPPacket.cppICMPPacketImpl.cppICMPSocket.cppICMPSocketImpl.cppICMPv4PacketImpl.cppIPAddress.cppIPAddressImpl.cppMailMessage.cppMailRecipient.cppMailStream.cppMediaType.cppMessageHeader.cppMulticastSocket.cppMultipartReader.cppMultipartWriter.cppNTLMCredentials.cppNTPClient.cppNTPEventArgs.cppNTPPacket.cppNameValueCollection.cppNet.cppNetException.cppNetworkInterface.cppNullPartHandler.cppOAuth10Credentials.cppOAuth20Credentials.cppPOP3ClientSession.cppPartHandler.cppPartSource.cppPartStore.cppPollSet.cppQuotedPrintableDecoder.cppQuotedPrintableEncoder.cppRawSocket.cppRawSocketImpl.cppRemoteSyslogChannel.cppRemoteSyslogListener.cppSMTPChannel.cppSMTPClientSession.cppSSPINTLMCredentials.cppServerSocket.cppServerSocketImpl.cppSocket.cppSocketAddress.cppSocketAddressImpl.cppSocketImpl.cppSocketNotification.cppSocketNotifier.cppSocketReactor.cppSocketStream.cppStreamSocket.cppStreamSocketImpl.cppStringPartSource.cppTCPServer.cppTCPServerConnection.cppTCPServerConnectionFactory.cppTCPServerDispatcher.cppTCPServerParams.cppUDPClient.cppUDPServerParams.cppWebSocket.cppWebSocketImpl.cpp
testsuite
CMakeLists.txtMakefileTestSuite.progenTestSuite_vs140.vcxprojTestSuite_vs140.vcxproj.filtersTestSuite_vs150.vcxprojTestSuite_vs150.vcxproj.filtersTestSuite_vs160.vcxprojTestSuite_vs160.vcxproj.filtersTestSuite_vs90.vcproj
src
DNSTest.cppDNSTest.hDatagramSocketTest.cppDatagramSocketTest.hDialogServer.cppDialogServer.hDialogSocketTest.cppDialogSocketTest.hDriver.cppEchoServer.cppEchoServer.hFTPClientSessionTest.cppFTPClientSessionTest.hFTPClientTestSuite.cppFTPClientTestSuite.hFTPStreamFactoryTest.cppFTPStreamFactoryTest.hHTMLFormTest.cppHTMLFormTest.hHTMLTestSuite.cppHTMLTestSuite.hHTTPClientSessionTest.cppHTTPClientSessionTest.hHTTPClientTestSuite.cppHTTPClientTestSuite.hHTTPCookieTest.cppHTTPCookieTest.hHTTPCredentialsTest.cppHTTPCredentialsTest.hHTTPRequestTest.cppHTTPRequestTest.hHTTPResponseTest.cppHTTPResponseTest.hHTTPServerTest.cppHTTPServerTest.hHTTPServerTestSuite.cppHTTPServerTestSuite.hHTTPStreamFactoryTest.cppHTTPStreamFactoryTest.hHTTPTestServer.cppHTTPTestServer.hHTTPTestSuite.cppHTTPTestSuite.hICMPClientTest.cppICMPClientTest.hICMPClientTestSuite.cppICMPClientTestSuite.hICMPSocketTest.cppICMPSocketTest.hIPAddressTest.cppIPAddressTest.hMailMessageTest.cppMailMessageTest.hMailStreamTest.cppMailStreamTest.hMailTestSuite.cppMailTestSuite.hMediaTypeTest.cppMediaTypeTest.hMessageHeaderTest.cppMessageHeaderTest.hMessagesTestSuite.cppMessagesTestSuite.hMulticastEchoServer.cppMulticastEchoServer.hMulticastSocketTest.cppMulticastSocketTest.hMultipartReaderTest.cppMultipartReaderTest.hMultipartWriterTest.cppMultipartWriterTest.hNTLMCredentialsTest.cppNTLMCredentialsTest.hNTPClientTest.cppNTPClientTest.hNTPClientTestSuite.cppNTPClientTestSuite.hNameValueCollectionTest.cppNameValueCollectionTest.hNetCoreTestSuite.cppNetCoreTestSuite.hNetTestSuite.cppNetTestSuite.hNetworkInterfaceTest.cppNetworkInterfaceTest.hOAuth10CredentialsTest.cppOAuth10CredentialsTest.hOAuth20CredentialsTest.cppOAuth20CredentialsTest.hOAuthTestSuite.cppOAuthTestSuite.hPOP3ClientSessionTest.cppPOP3ClientSessionTest.hPollSetTest.cppPollSetTest.hQuotedPrintableTest.cppQuotedPrintableTest.hRawSocketTest.cppRawSocketTest.hReactorTestSuite.cppReactorTestSuite.hSMTPClientSessionTest.cppSMTPClientSessionTest.hSocketAddressTest.cppSocketAddressTest.hSocketReactorTest.cppSocketReactorTest.hSocketStreamTest.cppSocketStreamTest.hSocketTest.cppSocketTest.hSocketsTestSuite.cppSocketsTestSuite.hSyslogTest.cppSyslogTest.hTCPServerTest.cppTCPServerTest.hTCPServerTestSuite.cppTCPServerTestSuite.hUDPEchoServer.cppUDPEchoServer.hUDPServerTest.cppUDPServerTest.hUDPServerTestSuite.cppUDPServerTestSuite.hWebSocketTest.cppWebSocketTest.hWebSocketTestSuite.cppWebSocketTestSuite.hWinCEDriver.cppWinDriver.cpp
NetSSL_OpenSSL
CMakeLists.txtMakefileNetSSL_OpenSSL.progenNetSSL_OpenSSL_vs140.slnNetSSL_OpenSSL_vs140.vcxprojNetSSL_OpenSSL_vs140.vcxproj.filtersNetSSL_OpenSSL_vs150.slnNetSSL_OpenSSL_vs150.vcxprojNetSSL_OpenSSL_vs150.vcxproj.filtersNetSSL_OpenSSL_vs160.slnNetSSL_OpenSSL_vs160.vcxprojNetSSL_OpenSSL_vs160.vcxproj.filtersNetSSL_OpenSSL_vs90.slnNetSSL_OpenSSL_vs90.vcproj
cmake
dependencies
doc
include
samples
src
testsuite
NetSSL_Win
CMakeLists.txtNetSSL_Win.progenNetSSL_Win_vs140.slnNetSSL_Win_vs140.vcxprojNetSSL_Win_vs140.vcxproj.filtersNetSSL_Win_vs150.slnNetSSL_Win_vs150.vcxprojNetSSL_Win_vs150.vcxproj.filtersNetSSL_Win_vs160.slnNetSSL_Win_vs160.vcxprojNetSSL_Win_vs160.vcxproj.filtersNetSSL_Win_vs90.slnNetSSL_Win_vs90.vcproj
cmake
doc
include
samples
src
testsuite
PDF
CMakeLists.txtMakefilePDF.progenPDF_vs140.slnPDF_vs140.vcxprojPDF_vs140.vcxproj.filtersPDF_vs150.slnPDF_vs150.vcxprojPDF_vs150.vcxproj.filtersPDF_vs160.slnPDF_vs160.vcxprojPDF_vs160.vcxproj.filtersPDF_vs90.slnPDF_vs90.vcproj
cmake
dependencies
include
samples
src
testsuite
PageCompiler
PocoDoc
ProGen
ProGen.progenProGen_vs140.slnProGen_vs140.vcxprojProGen_vs140.vcxproj.filtersProGen_vs150.slnProGen_vs150.vcxprojProGen_vs150.vcxproj.filtersProGen_vs160.slnProGen_vs160.vcxprojProGen_vs160.vcxproj.filtersProGen_vs90.slnProGen_vs90.vcprojprogen.batprogen.propertiesprogen32.batprogen64.batrebuildall32.batrebuildall64.bat
src
templates
vs140
vs150
vs160
READMEREADME.md
Redis
SevenZip
Util
CMakeLists.txtMakefileUtil.progenUtil_vs140.slnUtil_vs140.vcxprojUtil_vs140.vcxproj.filtersUtil_vs150.slnUtil_vs150.vcxprojUtil_vs150.vcxproj.filtersUtil_vs160.slnUtil_vs160.vcxprojUtil_vs160.vcxproj.filtersUtil_vs90.slnUtil_vs90.vcproj
cmake
dependencies
include
samples
src
testsuite
VERSION
XML
CMakeLists.txtMakefileXML.progenXML_vs140.slnXML_vs140.vcxprojXML_vs140.vcxproj.filtersXML_vs150.slnXML_vs150.vcxprojXML_vs150.vcxproj.filtersXML_vs160.slnXML_vs160.vcxprojXML_vs160.vcxproj.filtersXML_vs90.slnXML_vs90.vcproj
cmake
dependencies
include
samples
src
testsuite
Zip
CMakeLists.txtMakefileZip.progenZip_vs140.slnZip_vs140.vcxprojZip_vs140.vcxproj.filtersZip_vs150.slnZip_vs150.vcxprojZip_vs150.vcxproj.filtersZip_vs160.slnZip_vs160.vcxprojZip_vs160.vcxproj.filtersZip_vs90.slnZip_vs90.vcproj
cmake
dependencies
doc
include
samples
src
testsuite
appveyor.yml
appveyor
build
build_cmake.cmdbuild_cmake.shbuild_vs140.cmdbuild_vs150.cmdbuild_vs160.cmdbuildwin.cmdbuildwin.ps1
cmake
componentsconfigure
contrib
cppignore.lnxcppignore.win
doc
env.batenv.shlibversion
packaging
patches
release
travis
SimpleIni
Squirrel
TinyDir

@ -0,0 +1,238 @@
//
// Clock.h
//
// Library: Foundation
// Package: DateTime
// Module: Clock
//
// Definition of the Clock class.
//
// Copyright (c) 2013, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Clock_INCLUDED
#define Foundation_Clock_INCLUDED
#include "Poco/Foundation.h"
namespace Poco {
class Foundation_API Clock
/// A Clock stores a monotonic* clock value
/// with (theoretical) microseconds resolution.
/// Clocks can be compared with each other
/// and simple arithmetic is supported.
///
/// [*] Note that Clock values are only monotonic if
/// the operating system provides a monotonic clock.
/// The monotonic() function can be used to check whether
/// the system's clock is monotonic.
///
/// Monotonic Clock is available on Windows, Linux, OS X
/// and on POSIX platforms supporting clock_gettime() with CLOCK_MONOTONIC.
///
/// Clock values are relative to a system-dependent epoch time
/// (usually the system's startup time) and have no relation
/// to the time of day.
{
public:
typedef Int64 ClockVal;
/// Monotonic clock value in microsecond resolution.
typedef Int64 ClockDiff;
/// Difference between two ClockVal values in microseconds.
static const ClockVal CLOCKVAL_MIN; /// Minimum clock value.
static const ClockVal CLOCKVAL_MAX; /// Maximum clock value.
Clock();
/// Creates a Clock with the current system clock value.
Clock(ClockVal tv);
/// Creates a Clock from the given clock value.
Clock(const Clock& other);
/// Copy constructor.
~Clock();
/// Destroys the Clock.
Clock& operator = (const Clock& other);
Clock& operator = (ClockVal tv);
void swap(Clock& clock);
/// Swaps the Clock with another one.
void update();
/// Updates the Clock with the current system clock.
bool operator == (const Clock& ts) const;
bool operator != (const Clock& ts) const;
bool operator > (const Clock& ts) const;
bool operator >= (const Clock& ts) const;
bool operator < (const Clock& ts) const;
bool operator <= (const Clock& ts) const;
Clock operator + (ClockDiff d) const;
Clock operator - (ClockDiff d) const;
ClockDiff operator - (const Clock& ts) const;
Clock& operator += (ClockDiff d);
Clock& operator -= (ClockDiff d);
ClockVal microseconds() const;
/// Returns the clock value expressed in microseconds
/// since the system-specific epoch time (usually system
/// startup).
ClockVal raw() const;
/// Returns the clock value expressed in microseconds
/// since the system-specific epoch time (usually system
/// startup).
///
/// Same as microseconds().
ClockDiff elapsed() const;
/// Returns the time elapsed since the time denoted by
/// the Clock instance. Equivalent to Clock() - *this.
bool isElapsed(ClockDiff interval) const;
/// Returns true iff the given interval has passed
/// since the time denoted by the Clock instance.
static ClockDiff resolution();
/// Returns the resolution in units per second.
/// Since the Clock class has microsecond resolution,
/// the returned value is always 1000000.
static ClockDiff accuracy();
/// Returns the system's clock accuracy in microseconds.
static bool monotonic();
/// Returns true iff the system's clock is monotonic.
private:
ClockVal _clock;
};
//
// inlines
//
inline bool Clock::operator == (const Clock& ts) const
{
return _clock == ts._clock;
}
inline bool Clock::operator != (const Clock& ts) const
{
return _clock != ts._clock;
}
inline bool Clock::operator > (const Clock& ts) const
{
return _clock > ts._clock;
}
inline bool Clock::operator >= (const Clock& ts) const
{
return _clock >= ts._clock;
}
inline bool Clock::operator < (const Clock& ts) const
{
return _clock < ts._clock;
}
inline bool Clock::operator <= (const Clock& ts) const
{
return _clock <= ts._clock;
}
inline Clock Clock::operator + (Clock::ClockDiff d) const
{
return Clock(_clock + d);
}
inline Clock Clock::operator - (Clock::ClockDiff d) const
{
return Clock(_clock - d);
}
inline Clock::ClockDiff Clock::operator - (const Clock& ts) const
{
return _clock - ts._clock;
}
inline Clock& Clock::operator += (Clock::ClockDiff d)
{
_clock += d;
return *this;
}
inline Clock& Clock::operator -= (Clock::ClockDiff d)
{
_clock -= d;
return *this;
}
inline Clock::ClockVal Clock::microseconds() const
{
return _clock;
}
inline Clock::ClockDiff Clock::elapsed() const
{
Clock now;
return now - *this;
}
inline bool Clock::isElapsed(Clock::ClockDiff interval) const
{
Clock now;
Clock::ClockDiff diff = now - *this;
return diff >= interval;
}
inline Clock::ClockDiff Clock::resolution()
{
return 1000000;
}
inline void swap(Clock& s1, Clock& s2)
{
s1.swap(s2);
}
inline Clock::ClockVal Clock::raw() const
{
return _clock;
}
} // namespace Poco
#endif // Foundation_Clock_INCLUDED