text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_prefix|>//
// MemoryStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: MemoryStream
//
// Copyright (c) 2009, Applied Informatics Software Engineeri<|fim_suffix|>// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/MemoryStream.h"
namespace Poco {
MemoryIOS::MemoryIOS(char* pBuffer, std::... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>
void Message::setFormatString(std::string_view fmt_str)
{
_fmt_str = fmt_str;
}
const std::vector<std::string>& Message::getFormatStringArgs() const
{
return _fmt_str_args;
}
void Message::setFormatStringArgs(const std::vector<std::string>& fmt_str_args)
{
_fmt_str_args = fmt_str_args;
}
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>utors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Mutex.h"
#include "Mutex_POSIX.cpp"
namespace Poco {
Mutex::Mutex()
{
}
Mutex::~Mutex()
{
}
FastMutex::FastMutex()
{
}
FastMutex::~FastMutex()
{
}
} // namespace Poco
<|fim_prefix|>/<|fim_middle|>/
// Mutex.cpp
//
// Library: ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Mutex_POSIX.cpp
//
// Library: Foundation
// Package: Threading
// Module: Mutex
//
// Copyright (c) 2004-2008, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-I<|fim_suffix|>0;
abstime.tv_nsec = tv.tv_usec*1000 + (milliseconds % 1000)*1000000;
if (abstime.t... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>std::string& name):
NamedEventImpl(name)
{
}
NamedEvent::~NamedEvent()
{
}
} // namespace Poco
<|fim_prefix|>//
// NamedEvent<|fim_middle|>.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedEvent
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and C... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>}
void NamedEventImpl::waitImpl()
{
throw NotImplementedException("NamedEvent::wait() not available on Android");
}
} // namespace Poco
<|fim_prefix|>//
// NamedEvent_Android.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedEvent
//
// Copyright (c<|fim_middle|>) 2004-2011, Applie... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// NamedEvent_UNIX.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedEvent
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NamedEvent_UNIX.h"
#include "Poco/Format.h"
#includ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// NamedMutex.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedMutex
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and<|fim_suffix|>//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NamedMutex.h"
#if POCO_OS == POCO_OS_ANDROID
#include... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// NamedMutex_Android.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedMutex
//
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include<|fim_suffix|>pl::~NamedMutexImpl()
{
}
void NamedMut... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// NamedMutex_UNIX.cpp
//
// Library: Foundation
// Package: Processes
// Module: NamedMutex
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NamedMutex_UNIX.h"
#include "Poco/Format.h"
#includ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// NestedDiagnosticContext.cpp
//
// Library: Foundation
// Package: Core
// Module: NestedDiagnosticContext
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NestedDiagnosticContext.h"
#include... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ypeid(*this).name();
}
} // namespace Poco
<|fim_prefix|>//
// Notification.cpp
//
// Library: Foundation
// Package: Notifications
// Module: Notification
//
// Copyright (c<|fim_middle|>) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL... | fim | ClickHouse/ClickHouse | cpp |
//
// NotificationCenter.cpp
//
// Library: Foundation
// Package: Notifications
// Module: NotificationCenter
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NotificationCenter.h"
#include "Poco/Notification.... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// NotificationQueue.cpp
//
// Library: Foundation
// Package: Notifications
// Module: NotificationQueue
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NotificationQueue.h"
#include "Poco/No... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ullChannel::setProperty(const std::string&, const std::string&)
{
}
} // namespace Poco
<|fim_prefix|>//
// NullChannel.cpp
//
// Library: Foundation
// Package: Logging
// Module: NullChannel
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-... | fim | ClickHouse/ClickHouse | cpp |
//
// NullStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: NullStream
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NullStream.h"
namespace Poco {
NullStreamBuf::NullStreamBuf()
{
}
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>g long value, int width)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t sz = NF_MAX_INT_STRING_LEN;
intToStr(value, 10, result, sz, false, width, '0');
str.append(result, sz);
}
void NumberFormatter::appendHex(std::string& str, long long value)
{
char result[NF_MAX_INT_STRING_LEN];
std::size_t ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// NumberParser.cpp
//
// Library: Foundation
// Package: Core
// Module: NumberParser
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/NumberParser.h"
#include "Poco/Exception.h"
#include "Poc... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>te(result) &&
!FPEnvironment::isNaN(result);
}
} // namespace Poco
<|fim_prefix|>//
// NumericString.h
//
// Library: Foundation
// Package: Core
// Module: NumericString
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> }
if (it != end && *it != ']') ++it;
}
if (it == end) throw PathSyntaxException(path);
++it;
}
}
_name.clear();
}
while (it != end && *it != ';') _name += *it++;
}
else _name = name;
if (it != end && *it == ';')
{
++it;
while (... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Path_UNIX.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: Path
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Path_UNIX.h"
#include "Poco/Exception.h"
#include "Poco/Enviro... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// PatternFormatter.cpp
//
// Library: Foundation
// Package: Logging
// Module: PatternFormatter
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/PatternFormatter.h"
#include "Poco/Message.h"
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> &pipe)
{
_pImpl->release();
_pImpl = pipe._pImpl;
_pImpl->duplicate();
}
return *this;
}
void Pipe::close(CloseMode mode)
{
switch (mode)
{
case CLOSE_READ:
_pImpl->closeRead();
break;
case CLOSE_WRITE:
_pImpl->closeWrite();
break;
default:
_pImpl->closeRead();
_pImpl->closeWr... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// PipeImpl.cpp
//
// Library: Foundation
// Package: Processes
// Module: PipeImpl
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: <|fim_suffix|>NIX)
#include "PipeImpl_POSIX.cpp"
#else
#include "PipeImpl_DUMMY.cpp"
#en... | fim | ClickHouse/ClickHouse | cpp |
//
// PipeImpl_POSIX.cpp
//
// Library: Foundation
// Package: Processes
// Module: PipeImpl
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/PipeImpl_POSIX.h"
#include "Poco/Exception.h"
#include <sys/types.h>... | fim | ClickHouse/ClickHouse | cpp |
//
// PriorityNotificationQueue.cpp
//
// Library: Foundation
// Package: Notifications
// Module: PriorityNotificationQueue
//
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/PriorityNotificationQueue.h"
#include "Po... | fim | ClickHouse/ClickHouse | cpp |
//
// Process.cpp
//
// Library: Foundation
// Package: Processes
// Module: Process
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Process.h"
#include "Poco/Environment.h"
namespace
{
std::vector<char> ge... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>
bool ProcessImpl::isRunningImpl(PIDImpl pid)
{
if (kill(pid, 0) == 0)
{
return true;
}
else
{
return false;
}
}
void ProcessImpl::requestTerminationImpl(PIDImpl pid)
{
if (kill(pid, SIGINT) != 0)
{
switch (errno)
{
case ESRCH:
throw NotFoundException("cannot terminate pr... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>path).setSize(0);
return;
}
auto purge_it = files.begin();
auto it = files.begin();
for (++it; it != files.end(); ++it)
if (it->getLastModified() < purge_it->getLastModified())
purge_it = it;
purge_it->remove();
}
} // namespace Poco
<|fim_prefix|>//
// Pu... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// RWLock.cpp
//
// L<|fim_suffix|>nclude "RWLock_POSIX.cpp"
#endif
namespace Poco {
RWLock::RWLock()
{
}
RWLock::~RWLock()
{
}
} // namespace Poco
<|fim_middle|>ibrary: Foundation
// Package: Threading
// Module: RWLock
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering ... | fim | ClickHouse/ClickHouse | cpp |
//
// RWLock_Android.cpp
//
// Library: Foundation
// Package: Threading
// Module: RWLock
//
// Copyright (c) 2004-2011, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/RWLock_Android.h"
namespace Poco {
RWLockImpl::RWLockImpl()
{
pth... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// RWLock_POSIX.cpp
//
// Library: Foundation
// Package: Threading
// Module: RWLock
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-<|fim_suffix|>
#include "Poco/RWLock_POSIX.h"
namespace Poco {
RWLockImpl::RWLockImpl()
{
if (pthread... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Random.cpp
//
// Library: Foundation
// Package: Crypt
// Module: Random
//
// Definition of class Random.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
//
// Based on the FreeBSD random number generator.... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// RandomStream.cpp
//
// Library: Foundation
// Package: Crypt
// Module: RandomStream
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/RandomStream.h"
#include "Poco/Random.h"
#include "Poco/... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// RefCountedObject.cpp
//
<|fim_suffix|>rary: Foundation
// Package: Core
// Module: RefCountedObject
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/RefCountedObject.h"
namespace Poco {
... | fim | ClickHouse/ClickHouse | cpp |
//
// RegularExpression.h
//
// Library: Foundation
// Package: RegExp
// Module: RegularExpression
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/RegularExpression.h"
#include "Poco/Exception.h"
#include <ss... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// RotateStrategy.cpp
//
// Library: Foundation
// Package: Logging
// Module: FileChannel
//
// Copyright (c) 2004-2006, Applied Informa<|fim_suffix|> (pFile->size() != 0)
{
Poco::FileInputStream istr(pFile->path());
std::string tag;
std::getline(istr, tag);
if (tag.compare(0, ROTATE_TE... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Runnable.cpp
//
// Library: Foundation
// Package: Threading
// Module: Thread
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/<|fim_suffix|>unnable.h"
#include "Poco/Thread.h"
namespace ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ubRound3( 40 ); subRound3( 41 ); subRound3( 42 ); subRound3( 43 );
subRound3( 44 ); subRound3( 45 ); subRound3( 46 ); subRound3( 47 );
subRound3( 48 ); subRound3( 49 ); subRound3( 50 ); subRound3( 51 );
subRound3( 52 ); subRound3( 53 ); subRound3( 54 ); subRound3( 55 );
subRound3( 56 ); subRound3( 57 ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>emaphore()
{
}
} // namespace Poco
<|fim_prefix|>//
// Semaphore.cpp
//
// Library: Foundation
// Package: Threading
// Module: Semaphore
//
// Copyright <|fim_middle|>(c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> not available before Mac OS 10.12/iOS 10
#define POCO_HAVE_CLOCK_GETTIME
#endif
#endif
#endif
namespace Poco {
SemaphoreImpl::SemaphoreImpl(int n, int max): _n(n), _max(max)
{
poco_assert (n >= 0 && max > 0 && n <= max);
if (pthread_mutex_init(&_mutex, NULL))
throw SystemException("cannot ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SharedLibrary.cpp
//
// Library: Foundation
// Package: SharedLibrary
// Module: SharedLibrary
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SharedLibrary.h"
#include "Poco/Exception.h"
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SharedLibrary_UNIX.cpp
//
// Library: Foundation
// Package: SharedLibrary
// Module: SharedLibrary
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SharedLibrary_UNIX.h"
#include "Poco/Exce... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>y::operator = (const SharedMemory& other)
{
SharedMemory tmp(other);
swap(tmp);
return *this;
}
char* SharedMemory::begin() const
{
if (_pImpl)
return _pImpl->begin();
else
return 0;
}
char* SharedMemory::end() const
{
if (_pImpl)
return _pImpl->end();
else
return 0;
}
} // namespace ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ct size for the segment
if (_server && -1 == ::ftruncate(_fd, size))
{
::close(_fd);
_fd = -1;
::shm_unlink(_name.c_str());
throw SystemException("Cannot resize shared memory object", _name);
}
map(addrHint);
}
SharedMemoryImpl::SharedMemoryImpl(const Poco::File& file, SharedMemory::AccessMo... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SignalHandler.cpp
//
// Library: Foundation
// Package: Threading
// Module: SignalHandler
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SignalHandler.h"
#if defined(POCO_OS_FAMILY_UNIX... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SimpleFileChannel.cpp
//
// Library: Foundation
// Package: Logging
// Module: SimpleFileChannel
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SimpleFileChannel.h"
#include "Poco/LogFile.... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>, _files.end());
}
void SortedDirectoryIterator::next()
{
DirectoryIterator end_it;
if (!_directories.empty())
{
_path.assign(_directories.front());
_directories.pop_front();
_file = _path;
}
else if (!_files.empty())
{
_path.assign(_files.front());
_files.pop_front();
_file = _path;
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>e Channel::setProperty(name, value);
}
void SplitterChannel::log(const Message& msg)
{
FastMutex::ScopedLock lock(_mutex);
for (ChannelVec::iterator it = _channels.begin(); it != _channels.end(); ++it)
{
(*it)->log(msg);
}
}
void SplitterChannel::close()
{
FastMutex::ScopedLock lock(_mutex);
... | fim | ClickHouse/ClickHouse | cpp |
//
// Stopwatch.cpp
//
// Library: Foundation
// Package: DateTime
// Module: Stopwatch
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Stopwatch.h"
namespace Poco {
Stopwatch::Stopwatch(): _elapsed(0), _r... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// StreamChannel.cpp
//
// Library: Foundation
// Package: Logging
// Module: StreamChannel
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
//<|fim_suffix|>l::StreamChannel(std::ostream& str): _str(str)
{
}
StreamChannel::~StreamChannel()
{
}
void StreamChannel::log(c... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ostream(&_buf)
{
poco_ios_init(&_buf);
}
OutputStreamConverter::~OutputStreamConverter()
{
}
} // namespace Poco
<|fim_prefix|>//
// StreamConverter.cpp
//
// Library: Foundation
// Package: Text
// Module: StreamConverter
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// StreamCopier.cpp
//
// Library: Foundation
// Package: Streams
// Module: StreamCopier
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/StreamCopier.h"
#include "Poco/Buffer.h"
namespace P... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// String.h
//
// Library: Foundation
// Package: Core
// Module: String
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/String.h"
namespace Poco {
#if defined(POCO_NO_TEMPLATE_ICOMPARE)
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// StringTokenizer.cpp
//
// Library: Foundation
// Package: Core
// Module: StringTokenizer
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/StringTokenizer.h"
#include "Poco/Ascii.h"
#include ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// SyslogChannel.cpp
//
// Library: Foundation
// Package: Logging
// Module: SyslogChannel
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/SyslogChannel.h"
#include "Poco/Message.h"
#include ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ask();
}
catch (Exception& exc)
{
if (pOwner)
pOwner->taskFailed(this, exc);
}
catch (std::exception& exc)
{
if (pOwner)
pOwner->taskFailed(this, SystemException(exc.what()));
}
catch (...)
{
if (pOwner)
pOwner->taskFailed(this, SystemException("unknown exception"));
}
_state = T... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>pNf)
{
_nc.postNotification(pNf);
}
void TaskManager::taskStarted(Task* pTask)
{
_nc.postNotification(new TaskStartedNotification(pTask));
}
void TaskManager::taskProgress(Task* pTask, float progress)
{
ScopedLockWithUnlock<FastMutex> lock(_mutex);
if (_lastProgressNotification.isElapsed(MIN_PROG... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>k, float progress):
TaskNotification(pTask),
_progress(progress)
{
}
TaskProgressNotification::~TaskProgressNotification()
{
}
} // namespace Poco
<|fim_prefix|>//
// TaskNotification.cpp
//
// Library: Foundation
// Package: Tasks
// Module: Tasks
//
// Copyright (c) 2004-2006, Applied Informatic... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>uf)
{
poco_ios_init(&_buf);
}
TeeOutputStream::TeeOutputStream(std::ostream& ostr): TeeIOS(ostr), std::ostream(&_buf)
{
}
TeeOutputStream::~TeeOutputStream()
{
}
} // namespace Poco
<|fim_prefix|>//
// TeeStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: TeeStream
//
// Copyright... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> count++;
mutex.unlock();
name << (tempDir.empty() ? Path::temp() : tempDir);
if (name.str().at(name.str().size() - 1) != Path::separator())
{
name << Path::separator();
}
name << "tmp" << Process::id();
for (int i = 0; i < 6; ++i)
{
name << char('a' + (n % 26));
n /= 26;
}
return name.str... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// TextBufferIterator.cpp
//
// Library: Foundation
// Package: Text
// Module: TextBufferIterator
//
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/TextBufferIterator.h"
#include "Poco/TextEncoding.... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// TextConverter.cpp
//
// Librar<|fim_suffix|>n, Transform trans)
{
poco_check_ptr (source);
int errors = 0;
const unsigned char* it = (const unsigned char*) source;
const unsigned char* end = (const unsigned char*) source + length;
unsigned char buffer[TextEncoding::MAX_SEQUENCE_LENGTH];
wh... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>xtEncodingManager& TextEncoding::manager()
{
return *sh.get();
}
} // namespace Poco
<|fim_prefix|>//
// TextEncoding.cpp
//
// Library: Foundation
// Package: Text
// Module: TextEncoding
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-Lic... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// TextIterator.cpp
//
// Library: Foundation
// Package: Text
// Module: TextIterator
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/TextIterator.h"
#include "Poco/TextEncoding.h"
#include <... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>}
} // namespace Poco
<|fim_prefix|>//
// Thread.cpp
//
// Library: Foundation
// Package: Threading
// Module: Thread
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Thread.h"
#include "Poco/M... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ce Poco {
TLSAbstractSlot::TLSAbstractSlot()
{
}
TLSAbstractSlot::~TLSAbstractSlot()
{
}
ThreadLocalStorage::ThreadLocalStorage()
{
}
ThreadLocalStorage::~ThreadLocalStorage()
{
for (TLSMap::iterator it = _map.begin(); it != _map.end(); ++it)
{
delete it->second;
}
}
TLSAbstractSlot*& Thre... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>}
void ThreadPool::startWithPriority(Thread::Priority priority, Runnable& target)
{
getThread()->start(priority, target);
}
void ThreadPool::startWithPriority(Thread::Priority priority, Runnable& target, const std::string& name)
{
getThread()->start(priority, target, name);
}
void ThreadPool::stop... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>od)
{
}
ThreadTarget::ThreadTarget(const ThreadTarget& te): _method(te._method)
{
}
ThreadTarget& ThreadTarget::operator = (const ThreadTarget& te)
{
_method = te._method;
return *this;
}
ThreadTarget::~ThreadTarget()
{
}
} // namespace Poco
<|fim_prefix|>//
// ThreadTarget.cpp
//
// Library: F... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>emainingTime)
remainingTime -= waited;
else
remainingTime = 0;
}
}
while (remainingTime > 0 && rc < 0 && errno == EINTR);
if (rc < 0 && remainingTime > 0) throw Poco::SystemException("Thread::sleep(): select() failed");
#endif
}
void* ThreadImpl::runnableEntry(void* pThread)
{
_currentT... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// TimedNotificationQueue.cpp
//
// Library: Foundation
// Package: Notifications
// Module: TimedNotificationQueue
//
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/TimedNotificationQueue.h"
#includ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Timer.cpp
//
// Library: Foundation
// Package: Threading
// Module: Timer
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Timer.h"
#include "Poco/ThreadPool.h"
#include "Poco/Exception.h"
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Timespan.cpp
//
// Library: Foundation
// Package: DateTime
// Module: Timespan
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contribu<|fim_suffix|>(0)
{
}
Timespan::Timespan(TimeDiff microSeconds):
_span(microSeconds)
{
}
Timespan::Timespan(long seconds... | fim | ClickHouse/ClickHouse | cpp |
//
// Timestamp.cpp
//
// Library: Foundation
// Package: DateTime
// Module: Timestamp
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Timestamp.h"
#include "Poco/Timespan.h"
#include "Poco/Exception.h"
#incl... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Timezone.cpp
//
// Library: Foundation
// Package: DateTime
// Module: Timezone
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
<|fim_suffix|>clude "Timezone_UNIX.cpp"
namespace Poco {
int Timezone::tzd()
{
return utcOffset() + dst();
}
} //... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>if (!tms) throw Poco::SystemException("cannot get local time DST flag");
return tms->tm_isdst > 0;
}
std::string Timezone::name()
{
return std::string(tzInfo.name(dst() != 0));
}
std::string Timezone::standardName()
{
return std::string(tzInfo.name(false));
}
std::string Timezone::dstName()
{
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ce Poco
<|fim_prefix|>//
// Token.cpp
/<|fim_middle|>/
// Library: Foundation
// Package: Streams
// Module: StringTokenizer
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Token.h"
#include "Poc... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> host += *it++;
if (it == end) throw URISyntaxException("unterminated IPv6 address");
++it;
}
else
{
while (it != end && *it != ':') host += *it++;
}
if (it != end && *it == ':')
{
++it;
std::string port;
while (it != end) port += *it++;
if (!port.empty())
{
int nport = 0;
if (... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>dir)
{
URIRedirection tmp(redir);
swap(tmp);
return *this;
}
void URIRedirection::swap(URIRedirection& redir)
{
std::swap(_uri, redir._uri);
}
} // namespace Poco
<|fim_prefix|>//
// URIStreamFactory.cpp
//
// Library: Foundation
// Package: URI
// Module: URIStreamFactory
//
// Copyright (c) 200... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// URIStreamOpener.cpp
//
// Library: Foundation
// Package: URI
// Module: URIStreamOpener
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/URIStreamOpener.h"
#include "Poco/URIStreamFactory.h... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>eturn 2;
}
else
{
if (bytes && length >= 4)
{
int ch1 = ch - 0x10000;
UInt16 w1 = 0xD800 + ((ch1 >> 10) & 0x3FF);
UInt16 w2 = 0xDC00 + (ch1 & 0x3FF);
if (_flipBytes)
{
w1 = ByteOrder::flipBytes(w1);
w2 = ByteOrder::flipBytes(w2);
}
unsigned char* p = (unsigned char*) &w... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// UTF32Encoding.cpp
//
// Library: Foundation
// Package: Text
// Module: UTF32Encoding
//
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/UTF32Encoding.h"
#include "Poco/ByteOrder.h"
#include "... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// UTF8Encoding.cpp
//
// Library: Foundation
// Package: Text
// Module: UTF8Encoding
//
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/UTF8Encoding.h"
#include "Poco/String.h"
namespace Poco... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>d::string::size_type pos, const std::string::value_type* ptr)
{
return icompare(str, pos, str.size() - pos, ptr);
}
int UTF8::icompare(const std::string& str, const std::string::value_type* ptr)
{
return icompare(str, 0, str.size(), ptr);
}
std::string UTF8::toUpper(const std::string& str)
{
std::s... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// UUID.cpp
//
// Library: Foundation
<|fim_suffix|>6ba7b812-9dad-11d1-80b4-00c04fd430c8");
static UUID uuidX500("6ba7b814-9dad-11d1-80b4-00c04fd430c8");
}
const UUID& UUID::null()
{
return uuidNull;
}
const UUID& UUID::dns()
{
return uuidDNS;
}
const UUID& UUID::uri()
{
return uuidURI;
}
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// UUIDGenerator.cpp
//
// Library: Foundation
// Package: UUID
// Module: UUID
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/UUIDGenerator.h"
#include "Poco/Thread.h"
#include "Poco/RandomS... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Unicode.cpp
//
// Library: Foundation
// Package: Text
// Module: <|fim_suffix|>void Unicode::properties(int ch, CharacterProperties& props)
{
if (ch < 0 || ch > UCP_MAX_CODEPOINT) ch = 0;
const ucd_record* ucd = GET_UCD(ch);
props.category = static_cast<CharacterCategory>(_pcre_ucp_gentype[ucd->... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// UnicodeConverter.cpp
//
// Library: Foundation
// Package: Text
// Module: UnicodeConverter
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/UnicodeConverter.h"
#include "Poco/TextConverter.h"
#i... | fim | ClickHouse/ClickHouse | cpp |
//
// Var.cpp
//
// Library: Foundation
// Package: Core
// Module: Var
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Dynamic/Var.h"
#include "Poco/Dynamic/Struct.h"
#include <algorithm>
#include <cctype>
#includ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>r& any)
{
return appendJSONString(val, any);
}
void appendJSONValue(std::string& val, const Var& any)
{
if (any.isEmpty())
{
val.append("null");
}
else
{
bool isStr = isJSONString(any);
if (isStr)
{
appendJSONString(val, any.convert<std::string>());
}
else
{
val.append(any.conv... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>Iterator::operator - (std::size_t diff) const
{
if (diff > _position) throw RangeException("Invalid position argument.");
VarIterator ri(*this);
ri.setPosition(_position - diff);
return ri;
}
} } // namespace Poco::Dynamic
<|fim_prefix|>//
// VarIterator.cpp
//
// Library: Foundation
// Package: Dyn... | fim | ClickHouse/ClickHouse | cpp |
//
// Void.cpp
//
// Library: Foundation
// Package: Core
// Module: Void
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Void.h"
namespace Poco {
Void::Void()
{
}
Void::Void(const Void&)
{
}
Void::~Void()
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Windows1250Encoding.cpp
//
// Library: Foundation
// Package: Text
// Module: Windows1250Encoding
//
// Copyright (c) 2005-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Windows1250Encoding.h"
#include "Poco/Strin... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>/*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* This is the public header file for the PCRE library, to be #included by
applications that call the PCRE functions.
Copyright (c) 1997-201... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>/*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>/*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* This file contains character tables that are used when no external tables
are passed to PCRE by the application that calls it. The tables are used on... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>ILE_PCRE16 || defined COMPILE_PCRE32
*((int *)where) = 0;
return PCRE_ERROR_BADOPTION;
#else
#if defined SUPPORT_UTF
*((int *)where) = 1;
#else
*((int *)where) = 0;
#endif
break;
#endif
case PCRE_CONFIG_UTF16:
#if defined COMPILE_PCRE8 || defined COMPILE_PCRE32
*((int *)where) = 0;
return... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* PCRE is written in Standard C, but there are a few non-standard things it
can cope with, allowing it to run on SunOS4 and other "close to standard"
systems.
In environments that ... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>EQCHSET) != 0)? (int)re->req_char : -1;
break;
case PCRE_INFO_REQUIREDCHAR:
*((pcre_uint32 *)where) =
((re->flags & PCRE_REQCHSET) != 0) ? re->req_char : 0;
break;
case PCRE_INFO_REQUIREDCHARFLAGS:
*((int *)where) =
((re->flags & PCRE_REQCHSET) != 0);
break;
case PCR... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>/*************************************************
* Perl-Compatible Regular Expressions *
*************************************************/
/* PCRE is a library of functions to support regular expressions whose syntax
and semantics are as close as possible to those of the Perl 5 language.
... | fim | ClickHouse/ClickHouse | c |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.