text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_prefix|>//
// TimedNotificationQueue.h
//
// Library: Foundation
// Package: Notifications
// Module: TimedNotificationQueue
//
// Definition of the TimedNotificationQueue class.
//
// Copyright (c) 2009, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
/... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>s template class implements an adapter that sits between
/// a Timer and an object's method invoked by the timer.
/// It is quite similar in concept to the RunnableAdapter, but provides
/// some Timer specific additional methods.
/// See the Timer class for information on how
/// to use this template clas... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Timespan.h
//
// Library: Foundation
// Package: DateTime
// Module: Timespan
//
// Definition of the Timespan class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Timespan_INCLUDED
#... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>:TimeDiff interval) const
{
Timestamp now;
Timestamp::TimeDiff diff = now - *this;
return diff >= interval;
}
inline Timestamp::TimeDiff Timestamp::resolution()
{
return 1000000;
}
inline void swap(Timestamp & s1, Timestamp & s2)
{
s1.swap(s2);
}
inline Timestamp::TimeVal Timesta... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Timezone.h
//
// Library: Foundation
// Package: DateTime
// Module: Timezone
//
// Definition of the Timezone class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Timezone_INCLUDED
#... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>e token.
virtual Int64 asInteger64() const;
/// Returns a 64-bit integer representation of the token.
virtual UInt64 asUnsignedInteger64() const;
/// Returns an unsigned 64-bit integer representation of the token.
virtual int asInteger() const;
/// Returns an integer representat... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Tuple.h
//
// Library: Foundation
// Package: Core
// Module: Tuple
//
// Definition of the Tuple class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Tuple_INCLUDED
#define Foundatio... | fim | ClickHouse/ClickHouse | c |
//
// TypeList.h
//
// Library: Foundation
// Package: Core
// Module: TypeList
//
// Implementation of the TypeList template.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// Portions extracted and adapted from
// The Loki Library
// Copyright (c) 2001 by Andrei Alex... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>nt16;
typedef unsigned short UInt16;
typedef signed int Int32;
typedef unsigned int UInt32;
typedef signed long IntPtr;
typedef unsigned long UIntPtr;
# if defined(__LP64__)
# define POCO_PTR_IS_64_BIT 1
# define POCO_LONG_IS_64_BIT 1
typedef signed long Int64;
typedef unsigne... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// URI.h
//
// Library: Foundation
// Package: URI
// Module: URI
//
// Definition of the URI class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_URI_INCLUDED
#define Foundation_URI_INC... | fim | ClickHouse/ClickHouse | c |
//
// URIStreamFactory.h
//
// Library: Foundation
// Package: URI
// Module: URIStreamFactory
//
// Definition of the URIStreamFactory class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_URIStreamFacto... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// URIStreamOpener.h
//
// Library: Foundation
// Package: URI
// Module: URIStreamOpener
//
// Definition of the URIStreamOpener class.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_URI... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>
static const CharacterMap _charMap;
};
} // namespace Poco
#endif // Foundation_UTF16Encoding_INCLUDED
<|fim_prefix|>//
// UTF16Encoding.h
//
// Library: Foundation
// Package: Text
// Module: UTF16Encoding
//
// Definition of the UTF16Encoding class.
//
// Copyright (c) 2004-2007, Applied Infor... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>gth) const;
int sequenceLength(const unsigned char * bytes, int length) const;
protected:
static int safeToInt(Poco::UInt32 value)
{
if (value <= 0x10FFFF)
return static_cast<int>(value);
else
return -1;
}
private:
bool _flipBytes;
static const char * _names[];
static const ... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// UTF8Encoding.h
//
// Library: Foundation
// Package: Text
// Module: UTF8Encoding
//
// Definition of the UTF8Encoding class.
//
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_UTF8Encodin... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|> str);
/// Remove the UTF-8 Byte Order Mark sequence (0xEF, 0xBB, 0xBF)
/// from the beginning of the string, if it's there.
static std::string escape(const std::string & s, bool strictJSON = false);
/// Escapes a string. Special characters like tab, backslash, ... are
/// escaped. Un... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>= n;
s2 += n;
for (; n; --n)
assign(*--s1, *--s2);
}
return r;
}
static char_type * copy(char_type * s1, const char_type * s2, std::size_t n)
{
poco_assert(s2 < s1 || s2 >= s1 + n);
char_type * r = s1;
for (; n; -... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>Returns a null/nil UUID.
static const UUID & dns();
/// Returns the namespace identifier for the DNS namespace.
static const UUID & uri();
/// Returns the namespace identifier for the URI (former URL) namespace.
static const UUID & oid();
/// Returns the namespace identifier for... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>me, DigestEngine & de, UUID::Version version);
/// Creates a name-based UUID, using the given digest engine and version.
UUID createRandom();
/// Creates a random UUID.
UUID createOne();
/// Tries to create and return a time-based UUID (see create()), and,
/// if that does not wo... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// UnufferedStreamBuf.h
//
// Library: Foundation
// Package: Streams
// Module: StreamBuf
//
// Definition of template BasicUnbufferedStreamBuf and class UnbufferedStreamBuf.
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifi... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Unicode.h
//
// Library: Foundation
// Package: Text
// Module: Unicode
//
// Definition of the Unicode class.
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Unicode_INCLUDED
#define Founda... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>utf16String);
/// Converts the given UTF-8 encoded string into an UTF-16 encoded wide string.
static void convert(const char * utf8String, std::size_t length, UTF16String & utf16String);
/// Converts the given UTF-8 encoded character sequence into an UTF-16 encoded wide string.
static vo... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>essExpireStrategy<TKey, TValue>())
{
}
~UniqueAccessExpireCache() { }
private:
UniqueAccessExpireCache(const UniqueAccessExpireCache & aCache);
UniqueAccessExpireCache & operator=(const UniqueAccessExpireCache & aCache);
};
} // namespace Poco
#endif // Foundation_UniqueAccessExp... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// UniqueAccessExpireLRUCache.h
//
// Library: Foundation
// Package: Cache
// Module: UniqueAccessExpireLRUCache
//
// Definition of the UniqueAccessExpireLRUCache class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// UniqueAccessExpireStrategy.h
//
// Library: Foundation
// Package: Cache
// Module: UniqueAccessExpireStrategy
//
// Definition of the UniqueAccessExpireStrategy class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// UniqueExpireCache.h
//
// Library: Foundation
// Package: Cache
// Module: UniqueExpireCache
//
// Definition of the UniqueExpireCache class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// UniqueExpireLRUCache.h
//
// Library: Foundation
// Package: Cache
// Module: UniqueExpireLRUCache
//
// Definition of the UniqueExpireLRUCache class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Fo... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>>second);
_keys.erase(it);
}
}
void onGet(const void *, const TKey & key)
{
// get triggers no changes in an expire
}
void onClear(const void *, const EventArgs & args)
{
_keys.clear();
_keyIndex.clear();
}
void onIsValid(const... | fim | ClickHouse/ClickHouse | c |
<|fim_suffix|>st { return _isValid; }
void invalidate() { _isValid = false; }
protected:
const TKey & _key;
bool _isValid;
private:
ValidArgs & operator=(const ValidArgs & args);
};
} // namespace Poco
#endif // Foundation_ValidArgs_INCLUDED
<|fim_prefix|>//
// ValidArgs.h
//
// Library: Foundati... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Version.h
//
// Library: Foundation
// Package: Core
// Module: Version
//
// Version information for the POCO C++ Libraries.
//
// Copyright (c) 2004-2016, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#ifndef Foundation_Version_INC... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// Void.h
//
// Library: Foundation
// Package: Core
// Module: Void
//
// Definition of the Void class.
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#i<|fim_suffix|>oid.
///
/// The philosophical aspe... | fim | ClickHouse/ClickHouse | c |
<|fim_prefix|>//
// ASCIIEncoding.cpp
//
// Library: Foundation
// Package: Text
// Module: ASCIIEncoding
//
// Copyright (c) 2004-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/ASCIIEncoding.h"
#include "Poco/String.h"
namespace P... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// A<|fim_suffix|>H.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/AbstractObserver.h"
namespace Poco {
AbstractObserver::AbstractObserver()
{
}
AbstractObserver::AbstractObserver(const AbstractObserver& observer)
{
}
AbstractObserver::~AbstractObserver()
{
}
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// ActiveDispatcher.cpp
//
// Library: Foundation
// Package: Threading
// Module: ActiveObjects
//
// Copyright (c) 2006-2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/ActiveDispatcher.h"
#include "Poco/Notification... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>rategy
//
ArchiveByNumberStrategy::ArchiveByNumberStrategy()
{
}
ArchiveByNumberStrategy::~ArchiveByNumberStrategy()
{
}
LogFile* ArchiveByNumberStrategy::archive(LogFile* pFile, bool streamCompress)
{
std::string base = pFile->path();
std::string ext = "";
if (base.ends_with(".lz4"))
{
base.... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Ascii.cpp
//
// Library: Foundation
// Package: Core
// Module: Ascii
//
// Copyright (c) 2010, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Ascii.h"
namespace Poco {
const int Ascii::CHARACTER_PROPERTIES[128] =
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>, const std::string& value)
{
if (name == "channel")
setChannel(LoggingRegistry::defaultRegistry().channelForName(value));
else if (name == "priority")
setPriority(value);
else
Channel::setProperty(name, value);
}
void AsyncChannel::run()
{
AutoPtr<Notification> nf = _queue.waitDequeueNotifica... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>tomicCounter& AtomicCounter::operator = (AtomicCounter::ValueType value)
{
_counter = value;
return *this;
}
#elif defined(POCO_HAVE_GCC_ATOMICS)
//
// GCC 4.1+ atomic builtins.
//
AtomicCounter::AtomicCounter():
_counter(0)
{
}
AtomicCounter::AtomicCounter(AtomicCounter::ValueType initialValue):
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>for (unsigned i = 0; i < sizeof(Base64EncoderBuf::OUT_ENCODING_URL); i++)
{
IN_ENCODING_URL[Base64EncoderBuf::OUT_ENCODING_URL[i]] = i;
}
IN_ENCODING_URL[static_cast<unsigned char>('=')] = '\0';
IN_ENCODING_URL_INIT = true;
}
}
else
{
if (!IN_ENCODING_INIT)
{
for (unsigned i = ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Base64Encoder.cpp
//
// Library: Foundation
// Package: Streams
// Module: Base64
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Base64Encoder.h"
namespace Poco {
const unsigned char B... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// BinaryReader.cpp
//
// Library: Foundation
// Package: Streams
// Module: BinaryReaderWriter
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/BinaryReader.h"
#include "Poco/ByteOrder.h"
#inc... | fim | ClickHouse/ClickHouse | cpp |
//
// BinaryWriter.cpp
//
// Library: Foundation
// Package: Streams
// Module: BinaryReaderWriter
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/BinaryWriter.h"
#include "Poco/ByteOrder.h"
#include "Poco/Tex... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Bugcheck.cpp
//
// Library: Foundation
// Package: Core
// Module: Bugcheck
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Bugcheck.h"
#include "Poco/Debugger.h"
#include "Poco/Exception.h... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ier: BSL-1.0
//
#include "Poco/ByteOrder.h"
<|fim_prefix|>//
// ByteOrder.cpp
//
// Library: Foundation
// Pac<|fim_middle|>kage: Core
// Module: ByteOrder
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identif<|endoftext|> | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>e Poco
<|fim_prefix|>//
// Channel.cpp
//
// Library: Foundation
// Package: Logging
// Module: Channel
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Channel.h"
namespace Poco {
Channel::Ch... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Checksum.cpp
//
// Library: Foundation
// Package: Core
// Module: Checksum
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Checksum.h"
#if defined(POCO_UNBUNDLED)
#include <zlib.h>
#else
#inclu... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Clock.cpp
//
// Library: Foundation
// Package: DateTime
// Module: Clock
//
// Copyright (c) 2013, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Clock.h"
#include "Poco/Exception.h"
#include "Poco/Timestamp.h"
#if def... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ur_buffer_size = in_capacity;
while (_buffer.capacity() < LZ4F_compressBound(cur_buffer_size, &_kPrefs))
cur_buffer_size /= 2;
size_t compressed_size = LZ4F_compressUpdate(
_ctx,
static_cast<void *>(_buffer.begin()),
_buffer.capacity(),
static_cast<const void *>(in_data),
cur_buffe... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>/ SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Condition.h"
namespace Poco {
Condition::Condition()
{
}
Condition::~Condition()
{
}
void Condition::signal()
{
FastMutex::ScopedLock lock(_mutex);
if (!_waitQueue.empty())
{
_waitQueue.front()->set();
dequeue();
}
}
void Condition:... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> // namespace Poco
<|fim_prefix|>//
// Configurable.cpp
//
// Library: Foundation
// Package: Logging
// Module: Configurable
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering <|fim_middle|>GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Configu... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// ConsoleChannel.cpp
//
// Library: Foundation
// Package: Logging
// Module: ConsoleChannel
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/ConsoleChannel.h"
#include "Poco/M<|fim_suffix|>GH... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// CountingStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: CountingStream
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/CountingStream.h"
namespace Poco {
CountingStr... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> DateTime::operator + (const Timespan& span) const
{
return DateTime(_utcTime, span.totalMicroseconds());
}
DateTime DateTime::operator - (const Timespan& span) const
{
return DateTime(_utcTime, -span.totalMicroseconds());
}
Timespan DateTime::operator - (const DateTime& dateTime) const
{
return Ti... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>-%y %H:%M:%S %Z");
const std::string DateTimeFormat::RFC1036_FORMAT("%W, %e %b %y %H:%M:%S %Z");
const std::string DateTimeFormat::ASCTIME_FORMAT("%w %b %f %H:%M:%S %Y");
const std::string DateTimeFormat::SORTABLE_FORMAT("%Y-%m-%d %H:%M:%S");
const std::string DateTimeFormat::WEEKDAY_NAMES[] =
{
"Sunda... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// DateTimeFormatter.cpp
//
// Library: Foundation
// Package: DateTime
// Module: DateTimeFormatter
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/DateTimeFormatter.h"
#include "Poco/DateTim... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// DateTimeParser.cpp
//
// Library: Foundation
// Package: DateTime
// Module: DateTimeParser
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/DateTimeParser.h"
#include "Poco/DateTimeFormat.h... | fim | ClickHouse/ClickHouse | cpp |
//
// Debugger.cpp
//
// Library: Foundation
// Package: Core
// Module: Debugger
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Debugger.h"
#include <sstream>
#include <cstdlib>
#include <cstdio>
#if defin... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>r, windowBits, level)
{
}
DeflatingInputStream::~DeflatingInputStream()
{
}
} // namespace Poco
<|fim_prefix|>//
// DeflatingStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: ZLibStream
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// DigestEngine.cpp
//
// Library: Foundation
// Package: Crypt
// Module: DigestEngine
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/DigestEngine.h"
#include "Poco/Exception.h"
namespace ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>(&_buf);
}
DigestIOS::~DigestIOS()
{
}
DigestBuf* DigestIOS::rdbuf()
{
return &_buf;
}
DigestInputStream::DigestInputStream(DigestEngine& eng, std::istream& istr):
DigestIOS(eng, istr),
std::istream(&_buf)
{
poco_ios_init(&_buf);
}
DigestInputStream::~DigestInputStream()
{
}
DigestOutputStre... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// DirectoryIterator.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: DirectoryIterator
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/DirectoryIterator.h"
#if defined(POCO... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// RecursiveDirectoryIteratorStategies.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: RecursiveDirectoryIterator
//
// Copyright (c) 2012, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/DirectoryIteratorSt... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// DirectoryIterator_UNIX.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: DirectoryIterator
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/DirectoryIterator_UNIX.h"
#include "... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>td::string(result);
}
void Environment::nodeId(NodeId& id)
{
return EnvironmentImpl::nodeIdImpl(id);
}
unsigned Environment::processorCount()
{
return EnvironmentImpl::processorCountImpl();
}
Poco::UInt32 Environment::libraryVersion()
{
return POCO_VERSION;
}
Poco::Int32 Environment::os()
{
re... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ar;
std::memset(&ar, 0, sizeof(ar));
struct sockaddr_in* pAddr = reinterpret_cast<struct sockaddr_in*>(&ar.arp_pa);
pAddr->sin_family = AF_INET;
std::memcpy(&pAddr->sin_addr, *pHost->h_addr_list, sizeof(struct in_addr));
int rc = ioctl(s, SIOCGARP, &ar);
close(s);
if (rc < 0) return;
std::memcpy(&... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Error.cpp
//
// Library: Foundation
// Package: Core
// Module: Error
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Foundation.h"
#include "Poco/U<|fim_suffix|> {
_buffer[0] = 0;
#if ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>n");
}
void ErrorHandler::handle(const Exception& exc)
{
FastMutex::ScopedLock lock(_mutex);
try
{
_pHandler->exception(exc);
}
catch (...)
{
}
}
void ErrorHandler::handle(const std::exception& exc)
{
FastMutex::ScopedLock lock(_mutex);
try
{
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Event.cpp
//
// Library: Foundation
// Package: Threading
// Module: Event
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Event.h"
#include "Event_POSIX.cpp"
namespace Poco {
Event::... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|> GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/EventArgs.h"
namespace Poco {
EventArgs::EventArgs()
{
}
EventArgs::~EventArgs()
{
}
} // namespace Poco
<|fim_prefix|>//
// EventArgs.cpp
//
// Library: Foundation
// Package: Events
// Module: EventArgs
//
//... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>annel::log(const Message& msg)
{
messageLogged(this, msg);
}
} // namespace Poco
<|fim_prefix|>//
// EventChannel.cpp
//
// Library: Foundation
// Package: Logging
// Module: EventChannel
//
// Copyright (c) 2015, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-I... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>d_cond_init(&_cond, &attr))
{
pthread_condattr_destroy(&attr);
pthread_mutex_destroy(&_mutex);
throw SystemException("cannot create event (condition)");
}
pthread_condattr_destroy(&attr);
#else
if (pthread_cond_init(&_cond, NULL))
{
pthread_mutex_destroy(&_mutex);
throw SystemException("can... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Exception.cpp
//
// Library: Foundation
// Package: Core
// Module: Exception
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Exception.h"
#include <typeinfo>
namespace Poco {
Exception... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>
FIFOBufferStream::~FIFOBufferStream()
{
}
} // namespace Poco
<|fim_prefix|>//
// FIFOBufferStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: FIFOBufferStream
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Ident... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>his;
}
void FPEnvironment::keepCurrent()
{
keepCurrentImpl();
}
void FPEnvironment::clearFlags()
{
clearFlagsImpl();
}
} // namespace Poco
<|fim_prefix|>//
// FPEnvironment.cpp
//
// Library: Foundation
// Package: Core
// Module: FPEnvironment
//
// Copyright (c) 2004-2006, Applied Informatics S... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>::copySignImpl(long double target, long double source)
{
return (source >= 0 && target >= 0) || (source < 0 && target < 0) ? target : -target;
}
} // namespace Poco
<|fim_prefix|>//
// FPEnv<|fim_middle|>ironment_C99.cpp
//
// Library: Foundation
// Package: Core
// Module: FPEnvironment
//
// Copyrig... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// FPEnvironment_SUN.cpp
//
// Library: Foundation
// Package: Core
// Module: FPEnvironment
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include <math.h>
#include "Poco/FPEnvironment_SUN.h"
namespace ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// File.cpp
//
// Library: Foundation
// Package: Filesystem
// Module: File
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/File.h"
#include "Poco/Path.h"
#include "Poco/DirectoryIterator.h"
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// FileChannel.cpp
//
// Library: Foundation
// Package: Logging
// Module: FileChannel
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/FileChannel.h"
#include "Poco/ArchiveStrategy.h"
#includ... | fim | ClickHouse/ClickHouse | cpp |
//
// FileStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: FileStream
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/FileStream.h"
#include "Poco/Exception.h"
#include "FileStream_POSIX.cpp"
n... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// FileStreamFactory.cpp
//
// Library: Foundation
// Package: URI
// Module: FileStreamFactory
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/FileStreamFactory.h"
#include "Poco/URI.h"
#incl... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// FileStream_POSIX.cpp
//
// Library: Foundation
// Package: Streams
// Module: FileStream
//
// Copyright (c) 2007, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/FileStream.h"
#include "Poco/File.h"
#include "Poco/Excep... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>l::handleLastErrorImpl(const std::string& path)
{
switch (errno)
{
case EIO:
throw IOException(path, errno);
case EPERM:
throw FileAccessDeniedException("insufficient permissions", path, errno);
case EACCES:
throw FileAccessDeniedException(path, errno);
case ENOENT:
throw FileNotFoundExcepti... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>onst Any& value6, const Any& value7)
{
std::vector<Any> args;
args.push_back(value1);
args.push_back(value2);
args.push_back(value3);
args.push_back(value4);
args.push_back(value5);
args.push_back(value6);
args.push_back(value7);
formatVector(result, fmt, args);
}
void format(std::string& resul... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Formatter.cpp
//
// Library: Foundation
// Package: Logging
// Module: Formatter
/<|fim_suffix|>ion.h"
namespace Poco {
Formatter::Formatter()
{
}
Formatter::~Formatter()
{
}
void Formatter::setProperty(const std::string& name, const std::string& value)
{
throw PropertyNotSupportedExceptio... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>pChannel(0)
{
}
FormattingChannel::FormattingChannel(Formatter* pFormatter):
_pFormatter(pFormatter),
_pChannel(0)
{
if (_pFormatter) _pFormatter->duplicate();
}
FormattingChannel::FormattingChannel(Formatter* pFormatter, Channel* pChannel):
_pFormatter(pFormatter),
_pChannel(pChannel)
{
if ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ackslash must be followed by character in glob pattern");
}
int first = *itp;
int last = first;
if (++itp != endp && *itp == '-')
{
if (++itp != endp)
last = *itp++;
else
throw SyntaxException("bad range syntax in glob pattern");
}
if (_options & GLOB_CASELESS)
{
first = ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Hash.cpp
//
// Library: Foundation
// Package: Hashing
/<|fim_suffix|>ntifier: BSL-1.0
//
#include "Poco/Hash.h"
namespace Poco {
std::size_t hash(const std::string& str)
{
std::size_t h = 0;
std::string::const_iterator it = str.begin();
std::string::const_iterator end = str.end();
while ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// HashStatistic.cpp
//
// Library: Foundation
// Package: Hashing
// Module: HashStatistic
//
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/HashStatistic.h"
#include <sstream>
namespace Poco {
H... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>~HexBinaryDecoderIOS()
{
}
HexBinaryDecoderBuf* HexBinaryDecoderIOS::rdbuf()
{
return &_buf;
}
HexBinaryDecoder::HexBinaryDecoder(std::istream& istr): HexBinaryDecoderIOS(istr), std::istream(&_buf)
{
poco_ios_init(&_buf);
}
HexBinaryDecoder::~HexBinaryDecoder()
{
}
} // namespace Poco
<|fim_pref... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// HexBinaryEncoder.cpp
//
// Library: Foundation
// Package: Streams
// Module: HexBinary
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/HexBinaryEncoder.h"
namespace Poco {
HexBinaryEnc... | fim | ClickHouse/ClickHouse | cpp |
//
// InflatingStream.cpp
//
// Library: Foundation
// Package: Streams
// Module: ZLibStream
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/InflatingStream.h"
#include "Poco/Exception.h"
#include <cstring>
... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// String.h
//
// Library: Foundation
// Package: Core
// Module: String
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// <|fim_suffix|>ue.begin(), value.end(), true);
(obj.*write)(str.c_str(), str.size());
}
else
{
for(std::string::const_iterator it = value.begi... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// LineEndingConverter.cpp
//
// Library: Foundation
// Package: Streams
// Module: LineEndingConverter
//
// Copyright (c) 2005-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/LineEndingConverter.h"
namespace Poco ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// LocalDateTime.cpp
//
// Library: Foundation
// Package: DateTime
// Module: LocalDateTime
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/LocalDateTime.h"
#include "Poco/Timezone.h"
#includ... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>le_STD.cpp"
namespace Poco {
LogFile::LogFile(const std::string& path): LogFileImpl(path)
{
}
LogFile::~LogFile()
{
}
} // namespace Poco
<|fim_prefix|>//
// LogFile.cpp
//
// Library: Foundation
// Package: Log<|fim_middle|>ging
// Module: LogFile
//
// Copyright (c) 2004-2006, Applied Informati... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// LogFile_STD.cpp
//
// Library: Foundation
// Package: Logging
// Module: LogFile
//
// Copyright (c) 2004-2006, Applied Informatics<|fim_suffix|> size_t size, bool flush)
{
_str.write(data, size);
if (flush) _str.flush();
if (!_str.good()) throw WriteFileException(_path);
}
UInt64 LogFileImpl::... | fim | ClickHouse/ClickHouse | cpp |
<|fim_prefix|>//
// Logger.cpp
//
// Library: Foundation
// Package: Logging
// Module: Logger
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0
//
#include "Poco/Logger.h"
#include "Poco/LoggingRegistry.h"
#include "Poco/Excepti... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>gisterClass("SyslogChannel", new Instantiator<SyslogChannel, Channel>);
#endif
#endif
_formatterFactory.registerClass("PatternFormatter", new Instantiator<PatternFormatter, Formatter>);
}
} // namespace Poco
<|fim_prefix|>//
// LoggingFactory.cpp
//
// Library: Foundation
// Package: Logging
// Module... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>egistry()
{
return *sh.get();
}
} // namespace Poco
<|fim_prefix|>//
// LoggingRegistry.cpp
//
// Library: Foundation
// Package: Logging
// Module: LoggingRegistry
//
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
// and Contributors.
//
// SPDX-License-Identifier: BSL-1.0... | fim | ClickHouse/ClickHouse | cpp |
<|fim_suffix|>ize_t len)
{
unsigned int i, j;
for (i = 0, j = 0; j < len; i++, j += 4)
output[i] = ((UInt32)input[j]) | (((UInt32)input[j+1]) << 8) |
(((UInt32)input[j+2]) << 16) | (((UInt32)input[j+3]) << 24);
}
} // namespace Poco
<|fim_prefix|>//
// MD5Engine.cpp
//
// Library: Foundation
// Pac... | fim | ClickHouse/ClickHouse | cpp |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.