Adbase
Adinf C++ base library V2
|
Classes | |
struct | Comp |
class | File |
class | FixedBuffer |
struct | Localtime |
struct | Transition |
Functions | |
template<typename T > | |
size_t | convert (char buf[], T value) |
size_t | convertHex (char buf[], uintptr_t value) |
void | acceptHandler (int fd, short evt, void *arg) |
void | handlerConnector (int sockfd, short evt, void *arg) |
void | eventCallback (struct bufferevent *, short events, void *ptr) |
void | readCallback (struct bufferevent *, void *ptr) |
void | writeCallback (struct bufferevent *, void *ptr) |
void | defaultConnectionCallback (const TcpConnectionPtr &conn) |
void | defaultMessageCallback (const TcpConnectionPtr &conn, evbuffer *buffer, Timestamp receiveTime) |
void | pipeHandler (int, short evt, void *arg) |
void | timerHandler (int, short, void *arg) |
int | getJulianDayNumber (int year, int month, int day) |
algorithm and explanation see: http://www.faqs.org/faqs/calendars/faq/part2/ More... | |
struct Date::YearMonthDay | getYearMonthDay (int julianDayNumber) |
static void | reset (uint32_t digest[], std::string &buffer, uint64_t &transforms) |
static uint32_t | rol (const uint32_t value, const size_t bits) |
static uint32_t | blk (const uint32_t block[BLOCK_INTS], const size_t i) |
static void | R0 (const uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i) |
static void | R1 (uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i) |
static void | R2 (uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i) |
static void | R3 (uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i) |
static void | R4 (uint32_t block[BLOCK_INTS], const uint32_t v, uint32_t &w, const uint32_t x, const uint32_t y, uint32_t &z, const size_t i) |
static void | transform (uint32_t digest[], uint32_t block[BLOCK_INTS], uint64_t &transforms) |
static void | buffer_to_block (const std::string &buffer, uint32_t block[BLOCK_INTS]) |
void | fillHMS (unsigned seconds, struct tm *utc) |
bool | readTimeZoneFile (const char *zonefile, struct TimeZone::Data *data) |
const Localtime * | findLocaltime (const TimeZone::Data &data, Transition sentry, Comp comp) |
Variables | |
const char | digits [] = "9876543210123456789" |
const char | digitsHex [] = "0123456789ABCDEF" |
const char * | zero = digits + 9 |
const int | kSmallBuffer = 4000 |
const int | kLargeBuffer = 4000 * 4000 |
static const size_t | BLOCK_INTS = 16 |
static const size_t | BLOCK_BYTES = BLOCK_INTS * 4 |
void adbase::detail::acceptHandler | ( | int | fd, |
short | evt, | ||
void * | arg | ||
) |
Definition at line 8 of file Acceptor.cpp.
References adbase::sockets::accept(), adbase::Acceptor::acceptHandler(), LOG_DEBUG, and LOG_ERROR.
Referenced by adbase::Acceptor::init().
|
static |
|
static |
Definition at line 199 of file Sha1.cpp.
References BLOCK_INTS.
Referenced by adbase::Sha1::final(), and adbase::Sha1::update().
size_t adbase::detail::convert | ( | char | buf[], |
T | value | ||
) |
Definition at line 20 of file LogStream.cpp.
Referenced by adbase::detail::FixedBuffer< SIZE >::debugString().
size_t adbase::detail::convertHex | ( | char | buf[], |
uintptr_t | value | ||
) |
Definition at line 41 of file LogStream.cpp.
Referenced by adbase::LogStream::operator<<().
void adbase::detail::defaultConnectionCallback | ( | const TcpConnectionPtr & | conn | ) |
Definition at line 32 of file TcpConnection.cpp.
References LOG_TRACE.
void adbase::detail::defaultMessageCallback | ( | const TcpConnectionPtr & | conn, |
evbuffer * | buffer, | ||
Timestamp | receiveTime | ||
) |
Definition at line 40 of file TcpConnection.cpp.
void adbase::detail::eventCallback | ( | struct bufferevent * | , |
short | events, | ||
void * | ptr | ||
) |
Definition at line 8 of file TcpConnection.cpp.
References adbase::TcpConnection::eventCallback().
Referenced by adbase::TcpConnection::init(), and adbase::TcpConnection::peerAddress().
|
inline |
Definition at line 63 of file TimeZone.cpp.
Referenced by adbase::TimeZone::toUtcTime().
const Localtime* adbase::detail::findLocaltime | ( | const TimeZone::Data & | data, |
Transition | sentry, | ||
Comp | comp | ||
) |
Definition at line 188 of file TimeZone.cpp.
References adbase::detail::Comp::equal(), adbase::TimeZone::Data::localtimes, and adbase::TimeZone::Data::transitions.
Referenced by adbase::TimeZone::fromLocalTime(), and adbase::TimeZone::toLocalTime().
int adbase::detail::getJulianDayNumber | ( | int | year, |
int | month, | ||
int | day | ||
) |
algorithm and explanation see: http://www.faqs.org/faqs/calendars/faq/part2/
Definition at line 12 of file Date.cpp.
Referenced by getYearMonthDay().
struct Date::YearMonthDay adbase::detail::getYearMonthDay | ( | int | julianDayNumber | ) |
Definition at line 22 of file Date.cpp.
References adbase::Date::YearMonthDay::day, getJulianDayNumber(), adbase::Date::kJulianDayOf1970_01_01, adbase::Date::YearMonthDay::month, and adbase::Date::YearMonthDay::year.
Referenced by adbase::Date::yearMonthDay().
void adbase::detail::handlerConnector | ( | int | sockfd, |
short | evt, | ||
void * | arg | ||
) |
Definition at line 8 of file Connector.cpp.
References adbase::Connector::handleError(), and adbase::Connector::handleWrite().
Referenced by adbase::Connector::restart().
void adbase::detail::pipeHandler | ( | int | , |
short | evt, | ||
void * | arg | ||
) |
Definition at line 9 of file TcpWorker.cpp.
References LOG_DEBUG, LOG_ERROR, and adbase::TcpWorker::pipeHandler().
Referenced by adbase::TcpWorker::getConnectionNum(), and adbase::TcpWorker::start().
|
static |
|
static |
|
static |
|
static |
|
static |
void adbase::detail::readCallback | ( | struct bufferevent * | , |
void * | ptr | ||
) |
Definition at line 16 of file TcpConnection.cpp.
References adbase::TcpConnection::readCallback().
Referenced by adbase::TcpConnection::init(), and adbase::TcpConnection::peerAddress().
bool adbase::detail::readTimeZoneFile | ( | const char * | zonefile, |
struct TimeZone::Data * | data | ||
) |
Definition at line 125 of file TimeZone.cpp.
References adbase::TimeZone::Data::abbreviation, adbase::detail::Transition::localtime, adbase::TimeZone::Data::localtimes, adbase::detail::File::readBytes(), adbase::detail::File::readInt32(), adbase::detail::File::readUInt8(), adbase::detail::Transition::Transition(), adbase::TimeZone::Data::transitions, and adbase::detail::File::valid().
Referenced by adbase::TimeZone::TimeZone().
|
static |
Definition at line 15 of file Sha1.cpp.
Referenced by adbase::Sha1::final(), and adbase::Sha1::Sha1().
|
static |
void adbase::detail::timerHandler | ( | int | , |
short | , | ||
void * | arg | ||
) |
Definition at line 9 of file Timer.cpp.
References adbase::TimerItem::timerHandler().
Referenced by adbase::TimerItem::TimerItem().
|
static |
Definition at line 95 of file Sha1.cpp.
References R0(), R1(), R2(), R3(), and R4().
Referenced by adbase::Sha1::final(), and adbase::Sha1::update().
void adbase::detail::writeCallback | ( | struct bufferevent * | , |
void * | ptr | ||
) |
Definition at line 24 of file TcpConnection.cpp.
References adbase::TcpConnection::writeCallback().
Referenced by adbase::TcpConnection::init(), and adbase::TcpConnection::peerAddress().
|
static |
Definition at line 12 of file Sha1.cpp.
Referenced by adbase::Sha1::final(), and adbase::Sha1::update().
|
static |
Definition at line 11 of file Sha1.cpp.
Referenced by buffer_to_block(), adbase::Sha1::final(), and adbase::Sha1::update().
const char adbase::detail::digits[] = "9876543210123456789" |
Definition at line 13 of file LogStream.cpp.
const char adbase::detail::digitsHex[] = "0123456789ABCDEF" |
Definition at line 15 of file LogStream.cpp.
const int adbase::detail::kLargeBuffer = 4000 * 4000 |
Definition at line 22 of file LogStream.hpp.
const int adbase::detail::kSmallBuffer = 4000 |
Definition at line 21 of file LogStream.hpp.
const char* adbase::detail::zero = digits + 9 |
Definition at line 17 of file LogStream.cpp.