/* UpTools v8.6
 *
 * Copyright (c) 2005-2013 Fundacion Universidad de Palermo (Argentina).
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *
 * 3. Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * 4. Redistributions of any form whatsoever must retain the following
 *    acknowledgment: 'This product includes software developed by the
 *    "Universidad de Palermo, Argentina" (http://www.palermo.edu/).'
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
 * TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

------------------------------------------------------------------------------

UpTools v8.6

UpTools is an open source development library in C++. It originated from the
needs of the research and development projects of the Electronics and
Communications department of the School of Engineering of the University of
Palermo. Its license allows the library to be included both in commercial
closed source and open source projects.

UpTools contains powerful tools to facilitate and accelerate the following
aspects of modern application development:

1. High performance computing (HPC)
1.1 Load distribution and parallel processing in transactional applications.
1.2 Algorithms and scientific applications parallelization and acceleration.

UpTools facilitates workload partition and parallelization. The programmer
has to define the data space partition criteria and the processing algorithms
to run over the partitions, then UpTools divides the processing in jobs among
the threads and also handles the consolidation of the results of each thread's
job. It also manages and enables parallelism in transactional servers.

2. Multi-threading
2.1 Threads
2.2 Mutual exclusion (mutex), semaphores, read/write locks, scope auto locking
2.3 Conditions
2.4 Thread-specific data

Internally UpTools multithreading classes and templates use Posix threads, but
show a clear and simple interface to the C++ developer, considerably reducing
errors and development time.

3. Time and timers
3.1 Time handling.
3.2 Timers and multithreading

It defines classes and methods for time handling. It reliably and orderly
manages timers in multithreaded environments.

4. Memory management
4.1 Smart pointers and objects.
4.2 Easy management and tracking of objects.in memory.

The library includes smart pointers to manage the life of the objects in memory
in multi-threaded environments. It has memory debug options, and allows tracking
at runtime of the objects in memory.

5. Text and strings
5.1 Operators on strings
5.2 Regular expressions, substitutions
5.3 Configuration file parsing and management

UpTools includes multiple operators between strings and other types to
facilitate text handling. It provides a powerful C++ interface for Posix
regular expressions and substitutions. It manages application configuration
files.

6. Databases
6.1 Common interface for different vendor databases.
6.2 Database access in multithreaded environment.

The library allows to access different databases without the need to alter the
source code of the programs. It currently supports Postgresql and MySql, but it
is expected to support also DB2 and others. It allows automatic management of
backup database servers and transparently provides unique connections for each
thread.

7. Networking
7.1 IP host and network address handling.
7.2 DNS queries
7.3 Asynchronus DNS queries.
7.4 Sockets
7.5 SSL and TLS
7.6 Simplified management of events in multiple simultaneous communications.

UpTools enables a fast and simple handling of host and network addresses and
sockets. Because of the long delays (in cpu time) of DNS queries, the library
enables asynchronous DNS queries, running in parallel to the application
threads, associating code for the processing of the results, to the event of
receiving the answer from the server. It allows encrypted communications using
TLS and SSL, with minimal changes to programs already coded without encryption.
It also allows certificate handling.

The Linux version of the UpTools library can be downloaded from the following
link: http://www.palermo.edu/ingenieria/uptools_ingles.html

The library distribution contains numerous examples (in directory doc/examples)
using of the different classes and templates, to demonstrate its capacities
and usage

For more information, coments and feedback please write to: uptools@palermo.edu


##############################################################################

Please refer to include files for basic reference and examples.

See below for example programs using UpTools.


##############################################################################
UpTools usage examples

// Parallelism examples
testUpThreadWorkDistributor.cc This example shows how to distribute transactions or tasks to a pool of threads
testUpThreadWorkSplittable.cc  This example shows how to parallelize a single job by splitting the work space
testUpThread.cc                This is a simple UpThreads and UpMutex example
testUpCondition.cc             This example shows how to use conditions for thread synchronization
testUpThreadSpecificPtr.cc     This shows how to make specific thread memory objects

// networking examples
testUpInet.cc                  This example shows how to manipulate UpAddresses, UpSockets, UpSockAddr's, UpHosts, etc
testUpSelect.cc                This example shows how to concurrently manage events on various sockets.
testUpAddress2.cc              This example shows IPv4 and IPv6 address manipulations
testUpSockAddrMaps2.cc         This two examples show how to use UpSockAddr's for indexing
testUpSockAddrMaps.cc          This two examples show how to use UpSockAddr's for indexing
testUpSockAddr.cc              This example shows simple usages for UpSockAddr
testUpSslServer.cc             This shows a simple https server
testUpRoute.cc						 This example shows how to use UpTools fast IP4 and IP6 route tables

// dns blocking and non-blocking examples
testUpResolver.cc              This shows how to make asynchronus (non-blocking) dns queries
testUpResolverSimple.cc        This shows how to make blocking queries
testUpDnsRbl.cc                This example shows how to check dns blocking lists
testNaptrAlgorithm2.cc         These two examples show how to process naptr dns queries,
testNaptrAlgorithm.cc           in blocking and nonblocking ways.

// database examples (see also UpSqlConnPools)
testUpMysql.cc                 This example shows how to use UpTools to interface a mysql database
testUpPgsql.cc                 This example shows how to use UpTools to interface a postgresql database

// smart pointer usage
testUpSmartLinkPtr.cc          This is an example showing smart pointer usage in the library.

// time and timer examples
testUpTimer.cc                 This shows how to set simple action timers
testUpTimeVal.cc               This shows how to use simple UpTimeVals for interval measurements.

// text manipulation examples
testUpRegex.cc                 This example shows how to do regular expresions using UpTools
testUpSubstitute.cc            This shows haw to make text subtitutions

// misc examples
testUpConf.cc                  This example shows how to process configuration files
testUpLine.cc                  This example shows input line manipulations
testUpLog.cc                   This is an example to show the library logging facilities

##############################################################################
classes in libUpTools.a or libUpTools.so
 class UpAddress
 class UpSockAddr
 class UpHost
 class UpSocket
 class UpNet
 class UpRoute
 class UpTimeVal
 class UpLine
 class UpRegex
 class UpSubstitute
 class UpConf
 class DnsQueryType
 class UpTimerManager          (needs -lpthread)
 class UpThread                (needs -lpthread)
 class UpWork                  (needs -lpthread)
 class UpWorkSplittable        (needs -lpthread)
 class UpThreadWorkDistributor (needs -lpthread)
 class UpResolver       (needs -lpthread /usr/lib/libresolv.a)
 class UpDnsQuery       (needs -lpthread /usr/lib/libresolv.a)
 class UpNaptrQuery     (needs -lpthread /usr/lib/libresolv.a)
 class UpResolverSimple (needs /usr/lib/libresolv.a)
 class UpDnsQuerySimple (needs -/usr/lib/libresolv.a)
 class UpResourceRecord (needs -lpthread /usr/lib/libresolv.a)
 class UpSqlQuery
 class UpSqlConn
 class UpSqlConnPool
 class UpSqlConnMysql               (needs -L/usr/lib/mysql -lmysqlclient)
 class UpSqlConnPgsql               (needs -lpq)
 class UpCryptoSslLibMultithreading (needs -lcrypto -lssl -lpthread)
 class UpCryptoSslLib               (needs -lcrypto -lssl)
 class UpSslContext                 (needs -lcrypto -lssl)
 class UpSsl                        (needs -lcrypto -lssl)
 class UpRsa                        (needs -lcrypto -lssl)
 class UpX509                       (needs -lcrypto -lssl)


Inline classes:
 class    UpHash
 class    UpEq
 class    UpLessThan
 class    StrStrHashMap;
 class    StrStrHashMultiMap;
 class    StrStrMap;
 class    StrStrMultiMap;
 class    StrHashSet;
 class    StrHashMultiSet;
 class    StrSet;
 class    StrMultiSet;
 class    UpTimer                  (needs -lpthread)
 class    UpMutex                  (needs -lpthread)
 class    UpRWLock                 (needs -lpthread)
 class    UpScopedLock             (needs -lpthread)
 class    UpSemaphore              (needs -lpthread)
 template UpCondition              (needs -lpthread)
 template UpThreadSpecificPtr      (needs -lpthread)
 template UpThreadSpecificSmartPtr (needs -lpthread)
 template UpBuf
 template UpSelect
 template UpSmartLinkPtr  (needs -lpthread if compiled with -DDEBUGSMARTPTR)
 class    UpLinkable      (needs -lpthread if compiled with -DDEBUGSMARTPTR)

global operators and functions:
 UpOp.h   for string interactions

(in 64 bit architectures use /usr/lib64/... instead of /usr/lib/...)
